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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1ebb2c8d6a37b25eafd728049e97db8f79eb703
4
- data.tar.gz: a65aa8c25a07e5065a46c2ba23b0505c686c87a8
3
+ metadata.gz: 038caab730253b977ea49f6bdcdfffd9f4781db5
4
+ data.tar.gz: 33a5cce8cb7515dacc6b696017d47b13d5a27885
5
5
  SHA512:
6
- metadata.gz: 5f031b65040ad23b8883ed58ce268f3b7f643026b2675677b317d60d570cbab181a14eaf488847c5f6cd67ace02de275d7f98cae7e589b9c937c383ee271f9a4
7
- data.tar.gz: c20c561ff2b8f1c68426248cc9245197965747da30730c92e3316dd6d1a88b52be75fcf21a6da8b7deb3d8bbd8b38954caac0bdc054edc8bf447167df995885f
6
+ metadata.gz: 80788f5ecdca5d258fde467185c672d9b15df9a9f10b3d894ebad92621afeea3829e96f629467010cfb103a75f0b0f931895f8a9e18d46f777434cb412115cb0
7
+ data.tar.gz: 3edd8fbed54e78146f1eeda6bc741ca5f1e67c5d7323cd355f7568f09876a0a39abf7a17957b24aef0a637a68396206179c0c4286410be19daf82404e31c0ace
@@ -58,18 +58,19 @@ module WxPay
58
58
  params
59
59
  end
60
60
 
61
- GENERATE_JS_PAY_REQ_REQUIRED_FIELDS = [:appid, :noncestr, :package]
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
 
@@ -1,3 +1,3 @@
1
1
  module WxPay
2
- VERSION = "0.9.1"
2
+ VERSION = "0.10"
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.9.1
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-08-18 00:00:00.000000000 Z
11
+ date: 2016-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client