yl_alipay 0.15.2 → 0.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7746331657f8f9f8e18482d1fab0c29506187ddc
4
- data.tar.gz: 4a3e6b0d11c95e8e34be4f36fb9d253f5934a03d
3
+ metadata.gz: eff6fd19c86487ec1eda288692af3a30eaf55e7c
4
+ data.tar.gz: 891cab740a2c55dab5c615dd6f56d717055841f9
5
5
  SHA512:
6
- metadata.gz: 7fff30a979004687ee466691f25478c69f6ca3e00f05bb58c8eadd1a787d0f0aa68c788ce88e621dafd61edaf2c1ccd169b30f65b146d4fed92563c5ba9ce58b
7
- data.tar.gz: 7d9b0f7e8cde2b049f1022e14b841d7509f4f39cb4dc803d1513ed1921ea6174e40725c2eec618a534d49fc74a0d55aecae1e923f1e1249977b5bf26ffd56bc9
6
+ metadata.gz: 4266886d035ec0865c4cdaf7429d025ed0a46fbb93d427faf0ac0b9d1c7b1f213a6e6cea6a9231ca9368066f2345421b97944926ca7a0892988e871fffcaecd7
7
+ data.tar.gz: 302e01c5028c5b6287e040b15d2d90ca3ca1b3eb03a601da6b255add8f46a2009b5ce89ab384cce7a8afc3e028a481f86f813fc59d4365278a9fe0aed5f94ecf
@@ -29,6 +29,7 @@ module Alipay
29
29
  params.merge('sign' => sign)
30
30
  end
31
31
 
32
+ # APP支付
32
33
  ALIPAY_TRADE_APP_PAY_REQUIRED_PARAMS = %w( app_id biz_content notify_url )
33
34
  def self.alipay_trade_app_pay(params, options = {})
34
35
  params = Utils.stringify_keys(params)
@@ -38,6 +39,8 @@ module Alipay
38
39
  Alipay::App::Sign.params_to_encoded_string params
39
40
  end
40
41
 
42
+ # 退款
43
+ # 参考文档:https://docs.open.alipay.com/api_1/alipay.trade.refund/
41
44
  ALIPAY_TRADE_REFUND_REQUIRED_PARAMS = %w( app_id biz_content )
42
45
  def self.alipay_trade_refund_url(params, options = {})
43
46
  params = Utils.stringify_keys(params)
@@ -47,6 +50,17 @@ module Alipay
47
50
  request_uri(params)
48
51
  end
49
52
 
53
+ # 退款查询
54
+ # 参考文档:https://docs.open.alipay.com/api_1/alipay.trade.fastpay.refund.query/
55
+ ALIPAY_TRADE_REFUND_QUERY_REQUIRED_PARAMS = %w( app_id biz_content )
56
+ def self.alipay_trade_refund_query_url(params, options = {})
57
+ params = Utils.stringify_keys(params)
58
+ Alipay::Service.check_required_params(params, ALIPAY_TRADE_REFUND_QUERY_REQUIRED_PARAMS)
59
+ params = params.merge('method' => 'alipay.trade.fastpay.refund.query')
60
+ params = prepare_params(params, options)
61
+ request_uri(params)
62
+ end
63
+
50
64
  def self.request_uri(params)
51
65
  uri = URI(GATEWAY_URL)
52
66
  uri.query = URI.encode_www_form(params)
@@ -1,3 +1,3 @@
1
1
  module Alipay
2
- VERSION = "0.15.2"
2
+ VERSION = "0.15.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yl_alipay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.2
4
+ version: 0.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-17 00:00:00.000000000 Z
11
+ date: 2017-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler