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 +4 -4
- data/lib/offsite_payments/integrations/bit_pay.rb +8 -6
- data/lib/offsite_payments/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4213158bdf6bb96d6ede38f1865b9450eea0b83098e0924d6c6aec9f036f33eb
|
4
|
+
data.tar.gz: cd17f05f747ac7fdc854f698eb90ee1a511d01d53b2b32effcb42f828f6e6f21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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 =
|
152
|
+
posted_json = comparable_data
|
155
153
|
parse(response.body)
|
156
|
-
retrieved_json =
|
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
|
|
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.
|
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-
|
11
|
+
date: 2019-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|