wx_pay 0.10 → 0.11.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: 038caab730253b977ea49f6bdcdfffd9f4781db5
4
- data.tar.gz: 33a5cce8cb7515dacc6b696017d47b13d5a27885
3
+ metadata.gz: 4f7728aa39f6881fdc10e4f9ce5eb0ea4e8f1aa4
4
+ data.tar.gz: 06ef45d78a887b2472f7dc3fabe6a32432c18567
5
5
  SHA512:
6
- metadata.gz: 80788f5ecdca5d258fde467185c672d9b15df9a9f10b3d894ebad92621afeea3829e96f629467010cfb103a75f0b0f931895f8a9e18d46f777434cb412115cb0
7
- data.tar.gz: 3edd8fbed54e78146f1eeda6bc741ca5f1e67c5d7323cd355f7568f09876a0a39abf7a17957b24aef0a637a68396206179c0c4286410be19daf82404e31c0ace
6
+ metadata.gz: 7724c41f2256d30f2813bc2ab5a70e4917abe6627566e6cd9dd7ad6f9edf849690dfed287c8dd6ad018593fe0ac06a6babf8f83a455bfa8e4abb6fe344b261e7
7
+ data.tar.gz: 861bae20ef39e12fcaf639240c2aa3aa039ee7fdf765193bd69a789520ae972d98397b7882b2460ab690387ac6e601900692862be3d661cf09f638c4bdd00af6
@@ -16,7 +16,7 @@ module WxPay
16
16
 
17
17
  check_required_options(params, INVOKE_UNIFIEDORDER_REQUIRED_FIELDS)
18
18
 
19
- r = invoke_remote("#{GATEWAY_URL}/pay/unifiedorder", make_payload(params), options)
19
+ r = WxPay::Result.new(Hash.from_xml(invoke_remote("#{GATEWAY_URL}/pay/unifiedorder", make_payload(params), options)))
20
20
 
21
21
  yield r if block_given?
22
22
 
@@ -34,7 +34,7 @@ module WxPay
34
34
 
35
35
  check_required_options(params, INVOKE_CLOSEORDER_REQUIRED_FIELDS)
36
36
 
37
- r = invoke_remote("#{GATEWAY_URL}/pay/closeorder", make_payload(params), options)
37
+ r = WxPay::Result.new(Hash.from_xml(invoke_remote("#{GATEWAY_URL}/pay/closeorder", make_payload(params), options)))
38
38
 
39
39
  yield r if block_given?
40
40
 
@@ -92,7 +92,7 @@ module WxPay
92
92
  verify_ssl: OpenSSL::SSL::VERIFY_NONE
93
93
  }.merge(options)
94
94
 
95
- r = invoke_remote("#{GATEWAY_URL}/secapi/pay/refund", make_payload(params), options)
95
+ r = WxPay::Result.new(Hash.from_xml(invoke_remote("#{GATEWAY_URL}/secapi/pay/refund", make_payload(params), options)))
96
96
 
97
97
  yield r if block_given?
98
98
 
@@ -109,7 +109,7 @@ module WxPay
109
109
 
110
110
  check_required_options(params, ORDER_QUERY_REQUIRED_FIELDS)
111
111
 
112
- r = invoke_remote("#{GATEWAY_URL}/pay/refundquery", make_payload(params), options)
112
+ r = WxPay::Result.new(Hash.from_xml(invoke_remote("#{GATEWAY_URL}/pay/refundquery", make_payload(params), options)))
113
113
 
114
114
  yield r if block_given?
115
115
 
@@ -132,7 +132,7 @@ module WxPay
132
132
  verify_ssl: OpenSSL::SSL::VERIFY_NONE
133
133
  }.merge(options)
134
134
 
135
- r = invoke_remote("#{GATEWAY_URL}/mmpaymkttransfers/promotion/transfers", make_payload(params), options)
135
+ r = WxPay::Result.new(Hash.from_xml(invoke_remote("#{GATEWAY_URL}/mmpaymkttransfers/promotion/transfers", make_payload(params), options)))
136
136
 
137
137
  yield r if block_given?
138
138
 
@@ -155,7 +155,7 @@ module WxPay
155
155
  verify_ssl: OpenSSL::SSL::VERIFY_NONE
156
156
  }.merge(options)
157
157
 
158
- r = invoke_remote("#{GATEWAY_URL}/secapi/pay/reverse", make_payload(params), options)
158
+ r = WxPay::Result.new(Hash.from_xml(invoke_remote("#{GATEWAY_URL}/secapi/pay/reverse", make_payload(params), options)))
159
159
 
160
160
  yield r if block_given?
161
161
 
@@ -178,7 +178,7 @@ module WxPay
178
178
  verify_ssl: OpenSSL::SSL::VERIFY_NONE
179
179
  }.merge(options)
180
180
 
181
- r = invoke_remote("#{GATEWAY_URL}/pay/micropay", make_payload(params), options)
181
+ r = WxPay::Result.new(Hash.from_xml(invoke_remote("#{GATEWAY_URL}/pay/micropay", make_payload(params), options)))
182
182
 
183
183
  yield r if block_given?
184
184
 
@@ -195,7 +195,7 @@ module WxPay
195
195
 
196
196
  check_required_options(params, ORDER_QUERY_REQUIRED_FIELDS)
197
197
 
198
- r = invoke_remote("#{GATEWAY_URL}/pay/orderquery", make_payload(params), options)
198
+ r = WxPay::Result.new(Hash.from_xml(invoke_remote("#{GATEWAY_URL}/pay/orderquery", make_payload(params), options)))
199
199
 
200
200
  yield r if block_given?
201
201
 
@@ -234,7 +234,7 @@ module WxPay
234
234
  verify_ssl: OpenSSL::SSL::VERIFY_NONE
235
235
  }.merge(options)
236
236
 
237
- r = invoke_remote("#{GATEWAY_URL}/mmpaymkttransfers/sendgroupredpack", make_payload(params), options)
237
+ r = WxPay::Result.new(Hash.from_xml(invoke_remote("#{GATEWAY_URL}/mmpaymkttransfers/sendgroupredpack", make_payload(params), options)))
238
238
 
239
239
  yield r if block_given?
240
240
 
@@ -256,7 +256,7 @@ module WxPay
256
256
  verify_ssl: OpenSSL::SSL::VERIFY_NONE
257
257
  }.merge(options)
258
258
 
259
- r = invoke_remote("#{GATEWAY_URL}/mmpaymkttransfers/sendredpack", make_payload(params), options)
259
+ r = WxPay::Result.new(Hash.from_xml(invoke_remote("#{GATEWAY_URL}/mmpaymkttransfers/sendredpack", make_payload(params), options)))
260
260
 
261
261
  yield r if block_given?
262
262
 
@@ -282,7 +282,7 @@ module WxPay
282
282
  def invoke_remote(url, payload, options = {})
283
283
  options = WxPay.extra_rest_client_options.merge(options)
284
284
 
285
- r = RestClient::Request.execute(
285
+ RestClient::Request.execute(
286
286
  {
287
287
  method: :post,
288
288
  url: url,
@@ -290,8 +290,6 @@ module WxPay
290
290
  headers: { content_type: 'application/xml' }
291
291
  }.merge(options)
292
292
  )
293
-
294
- WxPay::Result.new(Hash.from_xml(r))
295
293
  end
296
294
  end
297
295
  end
@@ -1,3 +1,3 @@
1
1
  module WxPay
2
- VERSION = "0.10"
2
+ VERSION = "0.11.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.10'
4
+ version: 0.11.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-09-04 00:00:00.000000000 Z
11
+ date: 2016-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -141,4 +141,3 @@ test_files:
141
141
  - test/wx_pay/result_test.rb
142
142
  - test/wx_pay/service_test.rb
143
143
  - test/wx_pay/sign_test.rb
144
- has_rdoc: