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 +4 -4
- data/lib/wx_pay/service.rb +44 -0
- data/lib/wx_pay/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e4ff8a9db77a3f0ffc5f688dbcd0bbac1822269
|
4
|
+
data.tar.gz: b18cab6268a175308bb8da33319baa0946b49f6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d04e10f3a41f1ed112af69f212c545b88d13c1d69a390ff1f9ed423d7d38e4daec0d5c2dbc83e2528d567ede86a57d2d3956e9539f83b6208d3a0f47afa1bcf3
|
7
|
+
data.tar.gz: f189bf78b1623317aab634f591f3f5175c8c5ef3e9414bb95e224a4a4d7dad7b81085a030daf65b61591312e10416949c44466f6fdadc4b27c508e68f6ca5743
|
data/lib/wx_pay/service.rb
CHANGED
@@ -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
|
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.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:
|
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.
|
135
|
+
rubygems_version: 2.5.1
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: An unofficial simple wechat pay gem
|