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 +4 -4
- data/lib/wx_pay/service.rb +4 -2
- data/lib/wx_pay/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58a6b1dc23e2ff537f96b76577cf18a66d14a4af
|
4
|
+
data.tar.gz: 73b335f2e39b73e5e9947931166fbaf610dbdf6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2863bff013fe17fd06e8fdf8f42652362c90ca03851ac9394eb10a752390720749decf367f45d208a2fcf127025bce06da2e089113110cadc8e2d5b1dadb48a
|
7
|
+
data.tar.gz: 91f2705e8d4d05441f8accee69fdaddb41f0d451b718970c00b7c354ed960b5cb047364e6c5169f990b8640547a3a64604f8c4c1542c6b8962d697d5115b038b
|
data/lib/wx_pay/service.rb
CHANGED
@@ -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
|
-
|
166
|
-
|
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
|
|
data/lib/wx_pay/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|