wx_pay 0.9.1 → 0.10
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 +5 -4
- 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: 038caab730253b977ea49f6bdcdfffd9f4781db5
|
4
|
+
data.tar.gz: 33a5cce8cb7515dacc6b696017d47b13d5a27885
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80788f5ecdca5d258fde467185c672d9b15df9a9f10b3d894ebad92621afeea3829e96f629467010cfb103a75f0b0f931895f8a9e18d46f777434cb412115cb0
|
7
|
+
data.tar.gz: 3edd8fbed54e78146f1eeda6bc741ca5f1e67c5d7323cd355f7568f09876a0a39abf7a17957b24aef0a637a68396206179c0c4286410be19daf82404e31c0ace
|
data/lib/wx_pay/service.rb
CHANGED
@@ -58,18 +58,19 @@ module WxPay
|
|
58
58
|
params
|
59
59
|
end
|
60
60
|
|
61
|
-
GENERATE_JS_PAY_REQ_REQUIRED_FIELDS = [:
|
61
|
+
GENERATE_JS_PAY_REQ_REQUIRED_FIELDS = [:prepayid, :noncestr]
|
62
62
|
def self.generate_js_pay_req(params, options = {})
|
63
|
+
check_required_options(params, GENERATE_JS_PAY_REQ_REQUIRED_FIELDS)
|
64
|
+
|
63
65
|
params = {
|
64
66
|
appId: options.delete(:appid) || WxPay.appid,
|
67
|
+
package: "prepay_id=#{params.delete(:prepayid)}",
|
68
|
+
nonceStr: params.delete(:noncestr),
|
65
69
|
timeStamp: Time.now.to_i.to_s,
|
66
70
|
signType: 'MD5'
|
67
71
|
}.merge(params)
|
68
72
|
|
69
|
-
check_required_options(params, GENERATE_JS_PAY_REQ_REQUIRED_FIELDS)
|
70
|
-
|
71
73
|
params[:paySign] = WxPay::Sign.generate(params)
|
72
|
-
|
73
74
|
params
|
74
75
|
end
|
75
76
|
|
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.
|
4
|
+
version: '0.10'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jasl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|