solidus_afterpay 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -0
- data/Gemfile +6 -3
- data/README.md +55 -23
- data/app/assets/javascripts/solidus_afterpay/afterpay_checkout.js +11 -11
- data/app/assets/javascripts/solidus_afterpay/afterpay_checkout_button.js +85 -0
- data/app/assets/javascripts/solidus_afterpay/afterpay_init.js +12 -0
- data/app/assets/javascripts/solidus_afterpay/backend/afterpay_autocomplete.js +9 -0
- data/app/assets/javascripts/spree/backend/solidus_afterpay.js +3 -1
- data/app/assets/javascripts/spree/frontend/solidus_afterpay.js +2 -0
- data/app/controllers/solidus_afterpay/callbacks_controller.rb +5 -1
- data/app/controllers/solidus_afterpay/checkouts_controller.rb +8 -2
- data/app/controllers/solidus_afterpay/express_callbacks_controller.rb +65 -0
- data/app/decorators/controllers/solidus_afterpay/spree/orders_controller_decorator.rb +13 -0
- data/app/helpers/solidus_afterpay/afterpay_helper.rb +5 -4
- data/app/models/solidus_afterpay/gateway.rb +37 -10
- data/app/models/solidus_afterpay/order_component_builder.rb +34 -5
- data/app/models/solidus_afterpay/payment_method.rb +43 -10
- data/app/models/solidus_afterpay/payment_source.rb +1 -1
- data/app/presentes/solidus_afterpay/order_presenter.rb +17 -0
- data/app/presentes/solidus_afterpay/shipping_rate_presenter.rb +28 -0
- data/app/services/solidus_afterpay/base_service.rb +13 -0
- data/app/services/solidus_afterpay/shipping_rate_builder_service.rb +32 -0
- data/app/services/solidus_afterpay/update_order_addresses_service.rb +45 -0
- data/app/services/solidus_afterpay/update_order_attributes_service.rb +49 -0
- data/app/views/solidus_afterpay/_afterpay_checkout_button.html.erb +9 -0
- data/app/views/solidus_afterpay/_afterpay_javascript.html.erb +4 -1
- data/app/views/spree/api/payments/source_views/_afterpay.json.jbuilder +1 -1
- data/app/views/spree/shared/_afterpay_messaging.html.erb +14 -12
- data/bin/sandbox +1 -1
- data/config/locales/en.yml +4 -0
- data/config/routes.rb +2 -0
- data/lib/generators/solidus_afterpay/install/templates/initializer.rb +12 -0
- data/lib/solidus_afterpay/configuration.rb +29 -0
- data/lib/solidus_afterpay/engine.rb +1 -1
- data/lib/solidus_afterpay/testing_support/factories.rb +20 -0
- data/lib/solidus_afterpay/version.rb +1 -1
- data/solidus_afterpay.gemspec +4 -4
- metadata +23 -73
- data/spec/fixtures/vcr_casettes/create_checkout/invalid.yml +0 -65
- data/spec/fixtures/vcr_casettes/create_checkout/valid.yml +0 -64
- data/spec/fixtures/vcr_casettes/credit/invalid.yml +0 -61
- data/spec/fixtures/vcr_casettes/credit/valid.yml +0 -63
- data/spec/fixtures/vcr_casettes/deferred/authorize/declined_payment.yml +0 -120
- data/spec/fixtures/vcr_casettes/deferred/authorize/invalid.yml +0 -61
- data/spec/fixtures/vcr_casettes/deferred/authorize/valid.yml +0 -120
- data/spec/fixtures/vcr_casettes/deferred/capture/invalid.yml +0 -61
- data/spec/fixtures/vcr_casettes/deferred/capture/valid.yml +0 -140
- data/spec/fixtures/vcr_casettes/deferred/void/invalid.yml +0 -61
- data/spec/fixtures/vcr_casettes/deferred/void/valid.yml +0 -137
- data/spec/fixtures/vcr_casettes/find_payment/invalid.yml +0 -61
- data/spec/fixtures/vcr_casettes/find_payment/valid.yml +0 -140
- data/spec/fixtures/vcr_casettes/immediate/capture/declined_payment.yml +0 -120
- data/spec/fixtures/vcr_casettes/immediate/capture/invalid.yml +0 -61
- data/spec/fixtures/vcr_casettes/immediate/capture/valid.yml +0 -134
- data/spec/fixtures/vcr_casettes/retrieve_configuration/valid.yml +0 -67
- data/spec/helpers/solidus_afterpay/afterpay_helper_spec.rb +0 -23
- data/spec/models/solidus_afterpay/gateway_spec.rb +0 -418
- data/spec/models/solidus_afterpay/order_component_builder_spec.rb +0 -137
- data/spec/models/solidus_afterpay/payment_method_spec.rb +0 -143
- data/spec/models/solidus_afterpay/payment_source_spec.rb +0 -61
- data/spec/models/solidus_afterpay/user_agent_generator_spec.rb +0 -22
- data/spec/models/spree/order_spec.rb +0 -158
- data/spec/requests/solidus_afterpay/callbacks_controller_spec.rb +0 -127
- data/spec/requests/solidus_afterpay/checkouts_controller_spec.rb +0 -190
- data/spec/spec_helper.rb +0 -31
- data/spec/support/auth.rb +0 -15
- data/spec/support/preferences.rb +0 -33
- data/spec/support/vcr.rb +0 -18
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_afterpay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Rimondi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-07-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: afterpay
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.
|
20
|
+
version: 0.6.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.
|
27
|
+
version: 0.6.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: solidus_core
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -32,9 +32,6 @@ dependencies:
|
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: 2.0.0
|
35
|
-
- - "<"
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '4'
|
38
35
|
type: :runtime
|
39
36
|
prerelease: false
|
40
37
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,9 +39,6 @@ dependencies:
|
|
42
39
|
- - ">="
|
43
40
|
- !ruby/object:Gem::Version
|
44
41
|
version: 2.0.0
|
45
|
-
- - "<"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '4'
|
48
42
|
- !ruby/object:Gem::Dependency
|
49
43
|
name: solidus_support
|
50
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,6 +114,9 @@ files:
|
|
120
114
|
- README.md
|
121
115
|
- Rakefile
|
122
116
|
- app/assets/javascripts/solidus_afterpay/afterpay_checkout.js
|
117
|
+
- app/assets/javascripts/solidus_afterpay/afterpay_checkout_button.js
|
118
|
+
- app/assets/javascripts/solidus_afterpay/afterpay_init.js
|
119
|
+
- app/assets/javascripts/solidus_afterpay/backend/afterpay_autocomplete.js
|
123
120
|
- app/assets/javascripts/spree/backend/solidus_afterpay.js
|
124
121
|
- app/assets/javascripts/spree/frontend/solidus_afterpay.js
|
125
122
|
- app/assets/stylesheets/spree/backend/solidus_afterpay.css
|
@@ -127,7 +124,9 @@ files:
|
|
127
124
|
- app/controllers/solidus_afterpay/base_controller.rb
|
128
125
|
- app/controllers/solidus_afterpay/callbacks_controller.rb
|
129
126
|
- app/controllers/solidus_afterpay/checkouts_controller.rb
|
127
|
+
- app/controllers/solidus_afterpay/express_callbacks_controller.rb
|
130
128
|
- app/decorators/controllers/solidus_afterpay/spree/checkout_controller_decorator.rb
|
129
|
+
- app/decorators/controllers/solidus_afterpay/spree/orders_controller_decorator.rb
|
131
130
|
- app/decorators/models/solidus_afterpay/spree/order_decorator.rb
|
132
131
|
- app/helpers/solidus_afterpay/afterpay_helper.rb
|
133
132
|
- app/models/solidus_afterpay/gateway.rb
|
@@ -135,6 +134,13 @@ files:
|
|
135
134
|
- app/models/solidus_afterpay/payment_method.rb
|
136
135
|
- app/models/solidus_afterpay/payment_source.rb
|
137
136
|
- app/models/solidus_afterpay/user_agent_generator.rb
|
137
|
+
- app/presentes/solidus_afterpay/order_presenter.rb
|
138
|
+
- app/presentes/solidus_afterpay/shipping_rate_presenter.rb
|
139
|
+
- app/services/solidus_afterpay/base_service.rb
|
140
|
+
- app/services/solidus_afterpay/shipping_rate_builder_service.rb
|
141
|
+
- app/services/solidus_afterpay/update_order_addresses_service.rb
|
142
|
+
- app/services/solidus_afterpay/update_order_attributes_service.rb
|
143
|
+
- app/views/solidus_afterpay/_afterpay_checkout_button.html.erb
|
138
144
|
- app/views/solidus_afterpay/_afterpay_javascript.html.erb
|
139
145
|
- app/views/spree/admin/payments/source_forms/_afterpay.html.erb
|
140
146
|
- app/views/spree/admin/payments/source_views/_afterpay.html.erb
|
@@ -160,36 +166,6 @@ files:
|
|
160
166
|
- lib/solidus_afterpay/testing_support/factories.rb
|
161
167
|
- lib/solidus_afterpay/version.rb
|
162
168
|
- solidus_afterpay.gemspec
|
163
|
-
- spec/fixtures/vcr_casettes/create_checkout/invalid.yml
|
164
|
-
- spec/fixtures/vcr_casettes/create_checkout/valid.yml
|
165
|
-
- spec/fixtures/vcr_casettes/credit/invalid.yml
|
166
|
-
- spec/fixtures/vcr_casettes/credit/valid.yml
|
167
|
-
- spec/fixtures/vcr_casettes/deferred/authorize/declined_payment.yml
|
168
|
-
- spec/fixtures/vcr_casettes/deferred/authorize/invalid.yml
|
169
|
-
- spec/fixtures/vcr_casettes/deferred/authorize/valid.yml
|
170
|
-
- spec/fixtures/vcr_casettes/deferred/capture/invalid.yml
|
171
|
-
- spec/fixtures/vcr_casettes/deferred/capture/valid.yml
|
172
|
-
- spec/fixtures/vcr_casettes/deferred/void/invalid.yml
|
173
|
-
- spec/fixtures/vcr_casettes/deferred/void/valid.yml
|
174
|
-
- spec/fixtures/vcr_casettes/find_payment/invalid.yml
|
175
|
-
- spec/fixtures/vcr_casettes/find_payment/valid.yml
|
176
|
-
- spec/fixtures/vcr_casettes/immediate/capture/declined_payment.yml
|
177
|
-
- spec/fixtures/vcr_casettes/immediate/capture/invalid.yml
|
178
|
-
- spec/fixtures/vcr_casettes/immediate/capture/valid.yml
|
179
|
-
- spec/fixtures/vcr_casettes/retrieve_configuration/valid.yml
|
180
|
-
- spec/helpers/solidus_afterpay/afterpay_helper_spec.rb
|
181
|
-
- spec/models/solidus_afterpay/gateway_spec.rb
|
182
|
-
- spec/models/solidus_afterpay/order_component_builder_spec.rb
|
183
|
-
- spec/models/solidus_afterpay/payment_method_spec.rb
|
184
|
-
- spec/models/solidus_afterpay/payment_source_spec.rb
|
185
|
-
- spec/models/solidus_afterpay/user_agent_generator_spec.rb
|
186
|
-
- spec/models/spree/order_spec.rb
|
187
|
-
- spec/requests/solidus_afterpay/callbacks_controller_spec.rb
|
188
|
-
- spec/requests/solidus_afterpay/checkouts_controller_spec.rb
|
189
|
-
- spec/spec_helper.rb
|
190
|
-
- spec/support/auth.rb
|
191
|
-
- spec/support/preferences.rb
|
192
|
-
- spec/support/vcr.rb
|
193
169
|
homepage: https://github.com/solidusio-contrib/solidus_afterpay#readme
|
194
170
|
licenses:
|
195
171
|
- Apache-2.0
|
@@ -197,53 +173,27 @@ metadata:
|
|
197
173
|
homepage_uri: https://github.com/solidusio-contrib/solidus_afterpay#readme
|
198
174
|
source_code_uri: https://github.com/solidusio-contrib/solidus_afterpay
|
199
175
|
changelog_uri: https://github.com/solidusio-contrib/solidus_afterpay/blob/master/CHANGELOG.md
|
176
|
+
rubygems_mfa_required: 'true'
|
200
177
|
post_install_message:
|
201
178
|
rdoc_options: []
|
202
179
|
require_paths:
|
203
180
|
- lib
|
204
181
|
required_ruby_version: !ruby/object:Gem::Requirement
|
205
182
|
requirements:
|
206
|
-
- - "
|
183
|
+
- - ">="
|
207
184
|
- !ruby/object:Gem::Version
|
208
185
|
version: '2.5'
|
186
|
+
- - "<"
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '4'
|
209
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
190
|
requirements:
|
211
191
|
- - ">="
|
212
192
|
- !ruby/object:Gem::Version
|
213
193
|
version: '0'
|
214
194
|
requirements: []
|
215
|
-
rubygems_version: 3.
|
195
|
+
rubygems_version: 3.5.13
|
216
196
|
signing_key:
|
217
197
|
specification_version: 4
|
218
198
|
summary: Solidus extension for using Afterpay in your store.
|
219
|
-
test_files:
|
220
|
-
- spec/fixtures/vcr_casettes/create_checkout/invalid.yml
|
221
|
-
- spec/fixtures/vcr_casettes/create_checkout/valid.yml
|
222
|
-
- spec/fixtures/vcr_casettes/credit/invalid.yml
|
223
|
-
- spec/fixtures/vcr_casettes/credit/valid.yml
|
224
|
-
- spec/fixtures/vcr_casettes/deferred/authorize/declined_payment.yml
|
225
|
-
- spec/fixtures/vcr_casettes/deferred/authorize/invalid.yml
|
226
|
-
- spec/fixtures/vcr_casettes/deferred/authorize/valid.yml
|
227
|
-
- spec/fixtures/vcr_casettes/deferred/capture/invalid.yml
|
228
|
-
- spec/fixtures/vcr_casettes/deferred/capture/valid.yml
|
229
|
-
- spec/fixtures/vcr_casettes/deferred/void/invalid.yml
|
230
|
-
- spec/fixtures/vcr_casettes/deferred/void/valid.yml
|
231
|
-
- spec/fixtures/vcr_casettes/find_payment/invalid.yml
|
232
|
-
- spec/fixtures/vcr_casettes/find_payment/valid.yml
|
233
|
-
- spec/fixtures/vcr_casettes/immediate/capture/declined_payment.yml
|
234
|
-
- spec/fixtures/vcr_casettes/immediate/capture/invalid.yml
|
235
|
-
- spec/fixtures/vcr_casettes/immediate/capture/valid.yml
|
236
|
-
- spec/fixtures/vcr_casettes/retrieve_configuration/valid.yml
|
237
|
-
- spec/helpers/solidus_afterpay/afterpay_helper_spec.rb
|
238
|
-
- spec/models/solidus_afterpay/gateway_spec.rb
|
239
|
-
- spec/models/solidus_afterpay/order_component_builder_spec.rb
|
240
|
-
- spec/models/solidus_afterpay/payment_method_spec.rb
|
241
|
-
- spec/models/solidus_afterpay/payment_source_spec.rb
|
242
|
-
- spec/models/solidus_afterpay/user_agent_generator_spec.rb
|
243
|
-
- spec/models/spree/order_spec.rb
|
244
|
-
- spec/requests/solidus_afterpay/callbacks_controller_spec.rb
|
245
|
-
- spec/requests/solidus_afterpay/checkouts_controller_spec.rb
|
246
|
-
- spec/spec_helper.rb
|
247
|
-
- spec/support/auth.rb
|
248
|
-
- spec/support/preferences.rb
|
249
|
-
- spec/support/vcr.rb
|
199
|
+
test_files: []
|
@@ -1,65 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://global-api-sandbox.afterpay.com/v2/checkouts
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"amount":{"amount":"110.0","currency":"USD"},"consumer":{"phoneNumber":null,"givenNames":"John","surname":"Von
|
9
|
-
Doe","email":"email1@example.com"},"billing":{"name":"John Von Doe","line1":"PO
|
10
|
-
Box 1337","line2":"Northwest","area1":"Herndon","area2":null,"region":"AL","postcode":"10001","countryCode":null,"phoneNumber":"555-555-0199"},"shipping":{"name":"John
|
11
|
-
Von Doe","line1":"A Different Road","line2":"Northwest","area1":"Herndon","area2":null,"region":"AL","postcode":"10002","countryCode":null,"phoneNumber":"555-555-0199"},"courier":null,"items":[{"name":"Product
|
12
|
-
#1 - 4517","sku":"SKU-1","pageUrl":null,"imageUrl":null,"quantity":1,"price":{"amount":"10.0","currency":"USD"},"categories":null,"estimatedShipmentDate":null}],"discounts":null,"merchant":{"redirectConfirmUrl":"INVALID_URL","redirectCancelUrl":"https://merchantsite.com/cancel"},"paymentType":null,"merchantReference":"R454538030","taxAmount":null,"shippingAmount":null}'
|
13
|
-
headers:
|
14
|
-
User-Agent:
|
15
|
-
- SolidusAfterpay/0.0.1 (Solidus/3.0.1; Ruby/2.6.6; Merchant/100101481) https://
|
16
|
-
Authorization:
|
17
|
-
- Basic <ENCODED_AUTH_HEADER>
|
18
|
-
Content-Type:
|
19
|
-
- application/json
|
20
|
-
Accept-Encoding:
|
21
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
22
|
-
Accept:
|
23
|
-
- "*/*"
|
24
|
-
response:
|
25
|
-
status:
|
26
|
-
code: 422
|
27
|
-
message: Unprocessable Entity
|
28
|
-
headers:
|
29
|
-
Date:
|
30
|
-
- Wed, 25 Aug 2021 14:56:00 GMT
|
31
|
-
Content-Type:
|
32
|
-
- application/json
|
33
|
-
Content-Length:
|
34
|
-
- '161'
|
35
|
-
Connection:
|
36
|
-
- keep-alive
|
37
|
-
Http-Correlation-Id:
|
38
|
-
- wcojzlfj2rfkqm4w6ayrvuynnq
|
39
|
-
X-Envoy-Upstream-Service-Time:
|
40
|
-
- '1'
|
41
|
-
Cf-Cache-Status:
|
42
|
-
- DYNAMIC
|
43
|
-
Expect-Ct:
|
44
|
-
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
45
|
-
Set-Cookie:
|
46
|
-
- __cf_bm=458888e7b4f03e70f12df97baec05158b5a76852-1629903360-1800-AQkZgFhWlLVhjIocg7r7deIfz1lAUyyEaisx9bXg9Ocwas501JwTxgqXWs2R9DAqrFXrRyfdIntHiY5D3U7kGXrmhCgTFYrDxPixPtLPZ+1b;
|
47
|
-
path=/; expires=Wed, 25-Aug-21 15:26:00 GMT; domain=.afterpay.com; HttpOnly;
|
48
|
-
Secure; SameSite=None
|
49
|
-
Strict-Transport-Security:
|
50
|
-
- max-age=31536000; includeSubDomains; preload
|
51
|
-
Server:
|
52
|
-
- cloudflare
|
53
|
-
Cf-Ray:
|
54
|
-
- 6845aa213deecd3a-FCO
|
55
|
-
body:
|
56
|
-
encoding: UTF-8
|
57
|
-
string: |-
|
58
|
-
{
|
59
|
-
"errorCode" : "invalid_object",
|
60
|
-
"errorId" : "6a7240c88a0d76d5",
|
61
|
-
"message" : "merchant.redirectConfirmUrl must be a valid URL",
|
62
|
-
"httpStatusCode" : 422
|
63
|
-
}
|
64
|
-
recorded_at: Wed, 25 Aug 2021 14:56:00 GMT
|
65
|
-
recorded_with: VCR 6.0.0
|
@@ -1,64 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://global-api-sandbox.afterpay.com/v2/checkouts
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"amount":{"amount":"110.0","currency":"USD"},"consumer":{"phoneNumber":null,"givenNames":"John","surname":"Von
|
9
|
-
Doe","email":"email3@example.com"},"billing":{"name":"John Von Doe","line1":"PO
|
10
|
-
Box 1337","line2":"Northwest","area1":"Herndon","area2":null,"region":"AL","postcode":"10005","countryCode":null,"phoneNumber":"555-555-0199"},"shipping":{"name":"John
|
11
|
-
Von Doe","line1":"A Different Road","line2":"Northwest","area1":"Herndon","area2":null,"region":"AL","postcode":"10006","countryCode":null,"phoneNumber":"555-555-0199"},"courier":null,"items":[{"name":"Product
|
12
|
-
#3 - 9548","sku":"SKU-3","pageUrl":null,"imageUrl":null,"quantity":1,"price":{"amount":"10.0","currency":"USD"},"categories":null,"estimatedShipmentDate":null}],"discounts":null,"merchant":{"redirectConfirmUrl":"https://merchantsite.com/confirm","redirectCancelUrl":"https://merchantsite.com/cancel"},"paymentType":null,"merchantReference":"R444808561","taxAmount":null,"shippingAmount":null}'
|
13
|
-
headers:
|
14
|
-
User-Agent:
|
15
|
-
- SolidusAfterpay/0.0.1 (Solidus/3.0.1; Ruby/2.6.6; Merchant/100101481) https://
|
16
|
-
Authorization:
|
17
|
-
- Basic <ENCODED_AUTH_HEADER>
|
18
|
-
Content-Type:
|
19
|
-
- application/json
|
20
|
-
Accept-Encoding:
|
21
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
22
|
-
Accept:
|
23
|
-
- "*/*"
|
24
|
-
response:
|
25
|
-
status:
|
26
|
-
code: 201
|
27
|
-
message: Created
|
28
|
-
headers:
|
29
|
-
Date:
|
30
|
-
- Wed, 25 Aug 2021 14:56:00 GMT
|
31
|
-
Content-Type:
|
32
|
-
- application/json
|
33
|
-
Content-Length:
|
34
|
-
- '249'
|
35
|
-
Connection:
|
36
|
-
- keep-alive
|
37
|
-
Http-Correlation-Id:
|
38
|
-
- rdpkhcwkeqlv2irhiask3pltjm
|
39
|
-
X-Envoy-Upstream-Service-Time:
|
40
|
-
- '37'
|
41
|
-
Cf-Cache-Status:
|
42
|
-
- DYNAMIC
|
43
|
-
Expect-Ct:
|
44
|
-
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
45
|
-
Set-Cookie:
|
46
|
-
- __cf_bm=f6c4d0cdcaa29e5fddf69187d3f8669a0ff92516-1629903360-1800-AROMdFTai3kYVqaapy1FVuhHoAKL/UoScijdZgg9OdkkdqwLfjx1l7Cxk6Yqm0qHyKkjCQ7NGmcCyeB39rNMBT1lETNAwhlDqfY+CJ6kAb6/;
|
47
|
-
path=/; expires=Wed, 25-Aug-21 15:26:00 GMT; domain=.afterpay.com; HttpOnly;
|
48
|
-
Secure; SameSite=None
|
49
|
-
Strict-Transport-Security:
|
50
|
-
- max-age=31536000; includeSubDomains; preload
|
51
|
-
Server:
|
52
|
-
- cloudflare
|
53
|
-
Cf-Ray:
|
54
|
-
- 6845aa243bb0fc89-FCO
|
55
|
-
body:
|
56
|
-
encoding: UTF-8
|
57
|
-
string: |-
|
58
|
-
{
|
59
|
-
"token" : "002.nq5oa41fisldkbfvtfjqc9nl1c6jhjna0b92osmstabi2lse",
|
60
|
-
"expires" : "2021-08-25T17:56:00.817Z",
|
61
|
-
"redirectCheckoutUrl" : "https://portal.sandbox.afterpay.com/us/checkout/?token=002.nq5oa41fisldkbfvtfjqc9nl1c6jhjna0b92osmstabi2lse"
|
62
|
-
}
|
63
|
-
recorded_at: Wed, 25 Aug 2021 14:56:00 GMT
|
64
|
-
recorded_with: VCR 6.0.0
|
@@ -1,61 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://global-api-sandbox.afterpay.com/v2/payments/INVALID_RESPONSE_CODE/refund
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"requestId":null,"merchantReference":null,"refundMerchantReference":null,"amount":{"amount":"10.0","currency":"USD"}}'
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- SolidusAfterpay/0.0.1 (Solidus/3.0.1; Ruby/2.6.6; Merchant/100101481) https://
|
12
|
-
Authorization:
|
13
|
-
- Basic <ENCODED_AUTH_HEADER>
|
14
|
-
Content-Type:
|
15
|
-
- application/json
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
-
Accept:
|
19
|
-
- "*/*"
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 404
|
23
|
-
message: Not Found
|
24
|
-
headers:
|
25
|
-
Date:
|
26
|
-
- Wed, 25 Aug 2021 14:56:01 GMT
|
27
|
-
Content-Type:
|
28
|
-
- application/json
|
29
|
-
Transfer-Encoding:
|
30
|
-
- chunked
|
31
|
-
Connection:
|
32
|
-
- keep-alive
|
33
|
-
Http-Correlation-Id:
|
34
|
-
- niezt4yj2dkazwuaxcylyctiia
|
35
|
-
X-Envoy-Upstream-Service-Time:
|
36
|
-
- '5'
|
37
|
-
Cf-Cache-Status:
|
38
|
-
- DYNAMIC
|
39
|
-
Expect-Ct:
|
40
|
-
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
41
|
-
Set-Cookie:
|
42
|
-
- __cf_bm=81e813f9b6a9b6041a3d539ff719c1362dbee0d7-1629903361-1800-AVFdNDg4AQvJHpdIrmZWTC4rShEPzouH1zIL4mzM59aQ+YuVenlK7OdUtpsPgycODEOuYbUcqh368D3EFoYFQLmPl8XrO0VfJz5ZC/d+lxpP;
|
43
|
-
path=/; expires=Wed, 25-Aug-21 15:26:01 GMT; domain=.afterpay.com; HttpOnly;
|
44
|
-
Secure; SameSite=None
|
45
|
-
Strict-Transport-Security:
|
46
|
-
- max-age=31536000; includeSubDomains; preload
|
47
|
-
Server:
|
48
|
-
- cloudflare
|
49
|
-
Cf-Ray:
|
50
|
-
- 6845aa2a69d4cd26-FCO
|
51
|
-
body:
|
52
|
-
encoding: ASCII-8BIT
|
53
|
-
string: |-
|
54
|
-
{
|
55
|
-
"errorCode" : "not_found",
|
56
|
-
"errorId" : "c7585eb6f53f5af5",
|
57
|
-
"message" : "Afterpay payment ID not found.",
|
58
|
-
"httpStatusCode" : 404
|
59
|
-
}
|
60
|
-
recorded_at: Wed, 25 Aug 2021 14:56:01 GMT
|
61
|
-
recorded_with: VCR 6.0.0
|
@@ -1,63 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://global-api-sandbox.afterpay.com/v2/payments/100101768366/refund
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"requestId":null,"merchantReference":null,"refundMerchantReference":null,"amount":{"amount":"10.0","currency":"USD"}}'
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- SolidusAfterpay/0.0.1 (Solidus/3.0.1; Ruby/2.6.6; Merchant/100101481) https://
|
12
|
-
Authorization:
|
13
|
-
- Basic <ENCODED_AUTH_HEADER>
|
14
|
-
Content-Type:
|
15
|
-
- application/json
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
-
Accept:
|
19
|
-
- "*/*"
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 201
|
23
|
-
message: Created
|
24
|
-
headers:
|
25
|
-
Date:
|
26
|
-
- Wed, 25 Aug 2021 14:56:33 GMT
|
27
|
-
Content-Type:
|
28
|
-
- application/json
|
29
|
-
Content-Length:
|
30
|
-
- '140'
|
31
|
-
Connection:
|
32
|
-
- keep-alive
|
33
|
-
Http-Correlation-Id:
|
34
|
-
- 24wpvce67xhgrrg5pqe3fgduda
|
35
|
-
X-Envoy-Upstream-Service-Time:
|
36
|
-
- '54'
|
37
|
-
Cf-Cache-Status:
|
38
|
-
- DYNAMIC
|
39
|
-
Expect-Ct:
|
40
|
-
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
41
|
-
Set-Cookie:
|
42
|
-
- __cf_bm=e9f4b17314baa927279640073ce9b4ff5a20400f-1629903393-1800-ATEYxDJqfplwOhv7PEuvKTFvzf0cFIA+ctvgNlZuMf4O535a4edKPQ9QImknp0pT7qSY2FRZdUqe/b84LTROEUWm/jP2XhxTGtcGJcCBLyDH;
|
43
|
-
path=/; expires=Wed, 25-Aug-21 15:26:33 GMT; domain=.afterpay.com; HttpOnly;
|
44
|
-
Secure; SameSite=None
|
45
|
-
Strict-Transport-Security:
|
46
|
-
- max-age=31536000; includeSubDomains; preload
|
47
|
-
Server:
|
48
|
-
- cloudflare
|
49
|
-
Cf-Ray:
|
50
|
-
- 6845aaf1fb7fcd42-FCO
|
51
|
-
body:
|
52
|
-
encoding: UTF-8
|
53
|
-
string: |-
|
54
|
-
{
|
55
|
-
"amount" : {
|
56
|
-
"amount" : "10.00",
|
57
|
-
"currency" : "USD"
|
58
|
-
},
|
59
|
-
"refundId" : "1934419",
|
60
|
-
"refundedAt" : "2021-08-25T14:56:33.753Z"
|
61
|
-
}
|
62
|
-
recorded_at: Wed, 25 Aug 2021 14:56:33 GMT
|
63
|
-
recorded_with: VCR 6.0.0
|
@@ -1,120 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://global-api-sandbox.afterpay.com/v2/payments/auth
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"token":"002.ijlqnvko1o4ou45uabplrl9pqao8u2v52njs2972r24hje65","merchantReference":null,"amount":null}'
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- SolidusAfterpay/0.0.1 (Solidus/3.0.1; Ruby/2.6.6; Merchant/100101481) https://
|
12
|
-
Authorization:
|
13
|
-
- Basic <ENCODED_AUTH_HEADER>
|
14
|
-
Content-Type:
|
15
|
-
- application/json
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
-
Accept:
|
19
|
-
- "*/*"
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 402
|
23
|
-
message: Payment Required
|
24
|
-
headers:
|
25
|
-
Date:
|
26
|
-
- Thu, 26 Aug 2021 16:49:57 GMT
|
27
|
-
Content-Type:
|
28
|
-
- application/json
|
29
|
-
Content-Length:
|
30
|
-
- '1560'
|
31
|
-
Connection:
|
32
|
-
- keep-alive
|
33
|
-
Http-Correlation-Id:
|
34
|
-
- gnficlh6g2sky5fijzcyzjocta
|
35
|
-
X-Envoy-Upstream-Service-Time:
|
36
|
-
- '253'
|
37
|
-
Cf-Cache-Status:
|
38
|
-
- DYNAMIC
|
39
|
-
Expect-Ct:
|
40
|
-
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
41
|
-
Set-Cookie:
|
42
|
-
- __cf_bm=31c51aeac48376bb2857541c183d592f37a9981f-1629996597-1800-AfkfX/fwd9Fk1ug6hM4M7hUbmXnPGPs/TsRRzQpRiOKMXHPB+aSZGP/W8kEANiDEwlrN4o7uSWrXdx8PhQ2U8xuv304GDZXXaLoY1qOwSYCk;
|
43
|
-
path=/; expires=Thu, 26-Aug-21 17:19:57 GMT; domain=.afterpay.com; HttpOnly;
|
44
|
-
Secure; SameSite=None
|
45
|
-
Strict-Transport-Security:
|
46
|
-
- max-age=31536000; includeSubDomains; preload
|
47
|
-
Server:
|
48
|
-
- cloudflare
|
49
|
-
Cf-Ray:
|
50
|
-
- 684e8e68ba79cd26-FCO
|
51
|
-
body:
|
52
|
-
encoding: UTF-8
|
53
|
-
string: |-
|
54
|
-
{
|
55
|
-
"id" : "100101773585",
|
56
|
-
"token" : "002.ijlqnvko1o4ou45uabplrl9pqao8u2v52njs2972r24hje65",
|
57
|
-
"status" : "DECLINED",
|
58
|
-
"created" : "2021-08-26T16:47:46.907Z",
|
59
|
-
"originalAmount" : {
|
60
|
-
"amount" : "26.24",
|
61
|
-
"currency" : "USD"
|
62
|
-
},
|
63
|
-
"openToCaptureAmount" : {
|
64
|
-
"amount" : "26.24",
|
65
|
-
"currency" : "USD"
|
66
|
-
},
|
67
|
-
"paymentState" : "AUTH_DECLINED",
|
68
|
-
"merchantReference" : "R735670701",
|
69
|
-
"refunds" : [ ],
|
70
|
-
"orderDetails" : {
|
71
|
-
"consumer" : {
|
72
|
-
"phoneNumber" : "",
|
73
|
-
"givenNames" : "Christian",
|
74
|
-
"surname" : "Rimondi",
|
75
|
-
"email" : "admin@example.com"
|
76
|
-
},
|
77
|
-
"billing" : {
|
78
|
-
"name" : "Christian Rimondi",
|
79
|
-
"line1" : "1313 Broadway",
|
80
|
-
"line2" : "",
|
81
|
-
"area1" : "New York",
|
82
|
-
"region" : "NY",
|
83
|
-
"postcode" : "10001",
|
84
|
-
"phoneNumber" : "12524264421"
|
85
|
-
},
|
86
|
-
"shipping" : {
|
87
|
-
"name" : "Christian Rimondi",
|
88
|
-
"line1" : "1313 Broadway",
|
89
|
-
"line2" : "",
|
90
|
-
"area1" : "New York",
|
91
|
-
"region" : "NY",
|
92
|
-
"postcode" : "10001",
|
93
|
-
"phoneNumber" : "12524264421"
|
94
|
-
},
|
95
|
-
"courier" : { },
|
96
|
-
"items" : [ {
|
97
|
-
"name" : "Solidus T-Shirt",
|
98
|
-
"sku" : "SOL-00003",
|
99
|
-
"quantity" : 1,
|
100
|
-
"price" : {
|
101
|
-
"amount" : "19.99",
|
102
|
-
"currency" : "USD"
|
103
|
-
}
|
104
|
-
} ],
|
105
|
-
"discounts" : [ ]
|
106
|
-
},
|
107
|
-
"events" : [ {
|
108
|
-
"id" : "1xH0Ei1o80ZUK4uYjCo3FMilGdK",
|
109
|
-
"created" : "2021-08-26T16:49:56.938Z",
|
110
|
-
"expires" : null,
|
111
|
-
"type" : "AUTH_DECLINED",
|
112
|
-
"amount" : {
|
113
|
-
"amount" : "26.24",
|
114
|
-
"currency" : "USD"
|
115
|
-
},
|
116
|
-
"paymentEventMerchantReference" : null
|
117
|
-
} ]
|
118
|
-
}
|
119
|
-
recorded_at: Thu, 26 Aug 2021 16:49:57 GMT
|
120
|
-
recorded_with: VCR 6.0.0
|
@@ -1,61 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://global-api-sandbox.afterpay.com/v2/payments/auth
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"token":"INVALID_TOKEN","merchantReference":null,"amount":null}'
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- SolidusAfterpay/0.0.1 (Solidus/3.0.1; Ruby/2.6.6; Merchant/100101481) https://
|
12
|
-
Authorization:
|
13
|
-
- Basic <ENCODED_AUTH_HEADER>
|
14
|
-
Content-Type:
|
15
|
-
- application/json
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
-
Accept:
|
19
|
-
- "*/*"
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 402
|
23
|
-
message: Payment Required
|
24
|
-
headers:
|
25
|
-
Date:
|
26
|
-
- Thu, 26 Aug 2021 16:19:00 GMT
|
27
|
-
Content-Type:
|
28
|
-
- application/json
|
29
|
-
Content-Length:
|
30
|
-
- '163'
|
31
|
-
Connection:
|
32
|
-
- keep-alive
|
33
|
-
Http-Correlation-Id:
|
34
|
-
- mivm6ycf3d6giix6nilde7b3la
|
35
|
-
X-Envoy-Upstream-Service-Time:
|
36
|
-
- '51'
|
37
|
-
Cf-Cache-Status:
|
38
|
-
- DYNAMIC
|
39
|
-
Expect-Ct:
|
40
|
-
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
41
|
-
Set-Cookie:
|
42
|
-
- __cf_bm=3076ec6d5b7ae1f855435d84bd9181ad152c1dd2-1629994740-1800-AeR2AoddlKoTBWSilLJ48iLmiitkT+fC7xdM6BPEk4DBMXg2MxyWWeIkC/URWsvWm6Y43l/oslizLmaG0h4j1MwM5dMX9hu6BQfGSI2ecCRa;
|
43
|
-
path=/; expires=Thu, 26-Aug-21 16:49:00 GMT; domain=.afterpay.com; HttpOnly;
|
44
|
-
Secure; SameSite=None
|
45
|
-
Strict-Transport-Security:
|
46
|
-
- max-age=31536000; includeSubDomains; preload
|
47
|
-
Server:
|
48
|
-
- cloudflare
|
49
|
-
Cf-Ray:
|
50
|
-
- 684e61182d2ecd3a-FCO
|
51
|
-
body:
|
52
|
-
encoding: UTF-8
|
53
|
-
string: |-
|
54
|
-
{
|
55
|
-
"errorCode" : "invalid_token",
|
56
|
-
"errorId" : "bff68cc7fdcdca58",
|
57
|
-
"message" : "Cannot complete payment, expired or invalid token.",
|
58
|
-
"httpStatusCode" : 402
|
59
|
-
}
|
60
|
-
recorded_at: Thu, 26 Aug 2021 16:19:00 GMT
|
61
|
-
recorded_with: VCR 6.0.0
|