wx_pay 0.14.0 → 0.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7e8318f2567650e26b43b4c9f1b7594dcaabb7c
4
- data.tar.gz: 9610e9e623a151915298a4eb55679884e4a6da37
3
+ metadata.gz: 58a6b1dc23e2ff537f96b76577cf18a66d14a4af
4
+ data.tar.gz: 73b335f2e39b73e5e9947931166fbaf610dbdf6a
5
5
  SHA512:
6
- metadata.gz: 3fb994f095bdc4f49e0973f823a7cbe59d33c6601c0aed59e215c9db8d026517a1d92aa2018a8997f33be49197dff005798bd4e251f4df0da6d689ddd7c41c47
7
- data.tar.gz: 2e34d9369835f7f23d2a6063c37bb20a3f070addd511c5a8a4e6308b09864c6cd87fcc41bfa280499c065c63de6a12bc5d6a2683698f8e38a307d09f165e5052
6
+ metadata.gz: e2863bff013fe17fd06e8fdf8f42652362c90ca03851ac9394eb10a752390720749decf367f45d208a2fcf127025bce06da2e089113110cadc8e2d5b1dadb48a
7
+ data.tar.gz: 91f2705e8d4d05441f8accee69fdaddb41f0d451b718970c00b7c354ed960b5cb047364e6c5169f990b8640547a3a64604f8c4c1542c6b8962d697d5115b038b
@@ -95,6 +95,7 @@ module WxPay
95
95
  end
96
96
 
97
97
  INVOKE_REFUND_REQUIRED_FIELDS = [:out_refund_no, :total_fee, :refund_fee, :op_user_id]
98
+ # out_trade_no 和 transaction_id 是二选一(必填)
98
99
  def self.invoke_refund(params, options = {})
99
100
  params = {
100
101
  appid: options.delete(:appid) || WxPay.appid,
@@ -105,6 +106,7 @@ module WxPay
105
106
  params[:op_user_id] ||= params[:mch_id]
106
107
 
107
108
  check_required_options(params, INVOKE_REFUND_REQUIRED_FIELDS)
109
+ warn("WxPay Warn: missing required option: out_trade_no or transaction_id must have one") if ([:out_trade_no, :transaction_id] & params.keys) == []
108
110
 
109
111
  options = {
110
112
  ssl_client_cert: options.delete(:apiclient_cert) || WxPay.apiclient_cert,
@@ -162,8 +164,8 @@ module WxPay
162
164
  GETTRANSFERINFO_FIELDS = [:partner_trade_no]
163
165
  def self.gettransferinfo(params, options = {})
164
166
  params = {
165
- mch_appid: options.delete(:appid) || WxPay.appid,
166
- mchid: options.delete(:mch_id) || WxPay.mch_id,
167
+ appid: options.delete(:appid) || WxPay.appid,
168
+ mch_id: options.delete(:mch_id) || WxPay.mch_id,
167
169
  nonce_str: SecureRandom.uuid.tr('-', '')
168
170
  }.merge(params)
169
171
 
@@ -1,3 +1,3 @@
1
1
  module WxPay
2
- VERSION = '0.14.0'
2
+ VERSION = '0.14.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wx_pay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jasl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-20 00:00:00.000000000 Z
11
+ date: 2017-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client