wx_pay 0.13.0 → 0.14.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 +23 -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: d7e8318f2567650e26b43b4c9f1b7594dcaabb7c
|
4
|
+
data.tar.gz: 9610e9e623a151915298a4eb55679884e4a6da37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fb994f095bdc4f49e0973f823a7cbe59d33c6601c0aed59e215c9db8d026517a1d92aa2018a8997f33be49197dff005798bd4e251f4df0da6d689ddd7c41c47
|
7
|
+
data.tar.gz: 2e34d9369835f7f23d2a6063c37bb20a3f070addd511c5a8a4e6308b09864c6cd87fcc41bfa280499c065c63de6a12bc5d6a2683698f8e38a307d09f165e5052
|
data/lib/wx_pay/service.rb
CHANGED
@@ -159,6 +159,29 @@ module WxPay
|
|
159
159
|
r
|
160
160
|
end
|
161
161
|
|
162
|
+
GETTRANSFERINFO_FIELDS = [:partner_trade_no]
|
163
|
+
def self.gettransferinfo(params, options = {})
|
164
|
+
params = {
|
165
|
+
mch_appid: options.delete(:appid) || WxPay.appid,
|
166
|
+
mchid: options.delete(:mch_id) || WxPay.mch_id,
|
167
|
+
nonce_str: SecureRandom.uuid.tr('-', '')
|
168
|
+
}.merge(params)
|
169
|
+
|
170
|
+
check_required_options(params, GETTRANSFERINFO_FIELDS)
|
171
|
+
|
172
|
+
options = {
|
173
|
+
ssl_client_cert: options.delete(:apiclient_cert) || WxPay.apiclient_cert,
|
174
|
+
ssl_client_key: options.delete(:apiclient_key) || WxPay.apiclient_key,
|
175
|
+
verify_ssl: OpenSSL::SSL::VERIFY_NONE
|
176
|
+
}.merge(options)
|
177
|
+
|
178
|
+
r = WxPay::Result.new(Hash.from_xml(invoke_remote("#{GATEWAY_URL}/mmpaymkttransfers/gettransferinfo", make_payload(params), options)))
|
179
|
+
|
180
|
+
yield r if block_given?
|
181
|
+
|
182
|
+
r
|
183
|
+
end
|
184
|
+
|
162
185
|
INVOKE_REVERSE_REQUIRED_FIELDS = [:out_trade_no]
|
163
186
|
def self.invoke_reverse(params, options = {})
|
164
187
|
params = {
|
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.14.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: 2017-01-20 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.6.8
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: An unofficial simple wechat pay gem
|