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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e95db40ec493b67c02224e1893f3e803b9b3800a
4
- data.tar.gz: 84218553e6b09ffb68461be907206ccbeaf97bca
3
+ metadata.gz: d7e8318f2567650e26b43b4c9f1b7594dcaabb7c
4
+ data.tar.gz: 9610e9e623a151915298a4eb55679884e4a6da37
5
5
  SHA512:
6
- metadata.gz: faff8161f1aec80bac124717abe1c0b2df69412d85a504f71a128b558a0f6229cd7179729b46247fcdafcfb1a471426256029c27014128d6e681671dcbd5fe06
7
- data.tar.gz: 94d756ce877fc655e1adb6d403208673662ab8e039d7b296a52b4aab4053da0414446b46f233f5f91082b62cd253df414751778e5bb29f68f956b030a475bbda
6
+ metadata.gz: 3fb994f095bdc4f49e0973f823a7cbe59d33c6601c0aed59e215c9db8d026517a1d92aa2018a8997f33be49197dff005798bd4e251f4df0da6d689ddd7c41c47
7
+ data.tar.gz: 2e34d9369835f7f23d2a6063c37bb20a3f070addd511c5a8a4e6308b09864c6cd87fcc41bfa280499c065c63de6a12bc5d6a2683698f8e38a307d09f165e5052
@@ -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 = {
@@ -1,3 +1,3 @@
1
1
  module WxPay
2
- VERSION = "0.13.0"
2
+ VERSION = '0.14.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.13.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: 2016-11-08 00:00:00.000000000 Z
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.5.1
135
+ rubygems_version: 2.6.8
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: An unofficial simple wechat pay gem