offsite_payments 2.7.16 → 2.7.17

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
  SHA256:
3
- metadata.gz: a2e0672a8e0a12267fc92fcc1657e123f0aa8d94fd5304e63b582b3c59d80c81
4
- data.tar.gz: 66da21cdb630a27b398df38c11e969af216c37010474d24d490d35b27a9f8f75
3
+ metadata.gz: 4213158bdf6bb96d6ede38f1865b9450eea0b83098e0924d6c6aec9f036f33eb
4
+ data.tar.gz: cd17f05f747ac7fdc854f698eb90ee1a511d01d53b2b32effcb42f828f6e6f21
5
5
  SHA512:
6
- metadata.gz: 8c0ef98cf6af576f7cc57121980b2b0fdb56017dc3124607db61d3f686cd5b49c4cf2604b7bfb59f8e50b92e4bd456b4d70426bdfc37d8f2378aee48f293487d
7
- data.tar.gz: 5568e66d35842b06feb8a359d6c690ceb1d5a3c6621b289d38987122956ab1e0e812df5b224b6c93b22828df6531a3539921ed0f8ebcb4a703ac983c7a5f08ec
6
+ metadata.gz: cb3e96d540f52cb205fb52b9982b17e021d270e0f45e7addff0bd55914bf3517e0029944ed45b78dc853b3b1d9eaa2385eda2a4fdc0797316505e5a6c793d727
7
+ data.tar.gz: ae923e095b48379cea5ba42f486d4cb15e4a82d4e39caa84250c3a4b918492ee851d9dcdb36d313fdf7c3ea8551b31c28352a8285848e142c5f95c9826df2bcc
@@ -141,19 +141,17 @@ module OffsitePayments #:nodoc:
141
141
  end
142
142
 
143
143
  def acknowledge(authcode = nil)
144
- uri = URI.parse("#{OffsitePayments::Integrations::BitPay.invoicing_url(@options[:credential1])}/#{transaction_id}")
144
+ uri = URI.parse("#{OffsitePayments::Integrations::BitPay::API_V2_URL}/#{transaction_id}")
145
145
 
146
146
  http = Net::HTTP.new(uri.host, uri.port)
147
147
  http.use_ssl = true
148
148
 
149
149
  request = Net::HTTP::Get.new(uri.path)
150
- request.basic_auth @options[:credential1], ''
151
-
152
150
  response = http.request(request)
153
151
 
154
- posted_json = JSON.parse(@raw).tap { |j| j.delete('currentTime') }
152
+ posted_json = comparable_data
155
153
  parse(response.body)
156
- retrieved_json = JSON.parse(@raw).tap { |j| j.delete('currentTime') }
154
+ retrieved_json = comparable_data
157
155
 
158
156
  posted_json == retrieved_json
159
157
  end
@@ -161,7 +159,11 @@ module OffsitePayments #:nodoc:
161
159
  private
162
160
  def parse(body)
163
161
  @raw = body
164
- @params = JSON.parse(@raw)
162
+ @params = JSON.parse(@raw)['data']
163
+ end
164
+
165
+ def comparable_data
166
+ @params&.reject { |k, _v| k == 'currentTime' }
165
167
  end
166
168
  end
167
169
 
@@ -1,3 +1,3 @@
1
1
  module OffsitePayments
2
- VERSION = "2.7.16"
2
+ VERSION = "2.7.17"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: offsite_payments
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.16
4
+ version: 2.7.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-26 00:00:00.000000000 Z
11
+ date: 2019-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport