wx_pay 0.4.1 → 0.5.0

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: b0ec7cd89cdcd715c514eff188d209372a1a0d24
4
- data.tar.gz: 675f41d9b0b406395791238167cc8d53fcefe41b
3
+ metadata.gz: 9e4ff8a9db77a3f0ffc5f688dbcd0bbac1822269
4
+ data.tar.gz: b18cab6268a175308bb8da33319baa0946b49f6c
5
5
  SHA512:
6
- metadata.gz: 0090bbbed4b9582e79672c9d5cab77a82790c8f311ace9c0b7ad17eca4a08878ea7942fa8ef86a8fc5e2a576d6197d95b22a328900535aeb28429798354cda54
7
- data.tar.gz: d4f49e18e29b3164a8418fedfcecb9ca3cae255f32dd5f2b511e3db2a89adaebe06b170bc9dc477bc62acdeb04d478a77dce76cf857356a771d9baa8fc3f9948
6
+ metadata.gz: d04e10f3a41f1ed112af69f212c545b88d13c1d69a390ff1f9ed423d7d38e4daec0d5c2dbc83e2528d567ede86a57d2d3956e9539f83b6208d3a0f47afa1bcf3
7
+ data.tar.gz: f189bf78b1623317aab634f591f3f5175c8c5ef3e9414bb95e224a4a4d7dad7b81085a030daf65b61591312e10416949c44466f6fdadc4b27c508e68f6ca5743
@@ -148,6 +148,50 @@ module WxPay
148
148
 
149
149
  r
150
150
  end
151
+
152
+ def self.sendgroupredpack(params, options={})
153
+ params = {
154
+ wxappid: options.delete(:appid) || WxPay.appid,
155
+ mch_id: options.delete(:mch_id) || WxPay.mch_id,
156
+ nonce_str: SecureRandom.uuid.tr('-', '')
157
+ }.merge(params)
158
+
159
+ #check_required_options(params, INVOKE_MICROPAY_REQUIRED_FIELDS)
160
+
161
+ options = {
162
+ ssl_client_cert: options.delete(:apiclient_cert) || WxPay.apiclient_cert,
163
+ ssl_client_key: options.delete(:apiclient_key) || WxPay.apiclient_key,
164
+ verify_ssl: OpenSSL::SSL::VERIFY_NONE
165
+ }.merge(options)
166
+
167
+ r = invoke_remote("#{GATEWAY_URL}/mmpaymkttransfers/sendgroupredpack", make_payload(params), options)
168
+
169
+ yield r if block_given?
170
+
171
+ r
172
+ end
173
+
174
+ def self.sendredpack(params, options={})
175
+ params = {
176
+ wxappid: options.delete(:appid) || WxPay.appid,
177
+ mch_id: options.delete(:mch_id) || WxPay.mch_id,
178
+ nonce_str: SecureRandom.uuid.tr('-', '')
179
+ }.merge(params)
180
+
181
+ #check_required_options(params, INVOKE_MICROPAY_REQUIRED_FIELDS)
182
+
183
+ options = {
184
+ ssl_client_cert: options.delete(:apiclient_cert) || WxPay.apiclient_cert,
185
+ ssl_client_key: options.delete(:apiclient_key) || WxPay.apiclient_key,
186
+ verify_ssl: OpenSSL::SSL::VERIFY_NONE
187
+ }.merge(options)
188
+
189
+ r = invoke_remote("#{GATEWAY_URL}/mmpaymkttransfers/sendredpack", make_payload(params), options)
190
+
191
+ yield r if block_given?
192
+
193
+ r
194
+ end
151
195
 
152
196
  class << self
153
197
  private
@@ -1,3 +1,3 @@
1
1
  module WxPay
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
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.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jasl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-05 00:00:00.000000000 Z
11
+ date: 2016-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.4.8
135
+ rubygems_version: 2.5.1
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: An unofficial simple wechat pay gem