solidus_afterpay 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -0
- data/Gemfile +6 -3
- data/README.md +3 -0
- data/app/controllers/solidus_afterpay/callbacks_controller.rb +5 -1
- data/app/controllers/solidus_afterpay/express_callbacks_controller.rb +5 -1
- data/app/models/solidus_afterpay/order_component_builder.rb +1 -1
- data/bin/sandbox +1 -1
- data/lib/solidus_afterpay/configuration.rb +9 -2
- data/lib/solidus_afterpay/engine.rb +1 -1
- data/lib/solidus_afterpay/testing_support/factories.rb +1 -1
- data/lib/solidus_afterpay/version.rb +1 -1
- data/solidus_afterpay.gemspec +4 -4
- metadata +11 -99
- 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_order/invalid.yml +0 -64
- data/spec/fixtures/vcr_casettes/find_order/valid.yml +0 -120
- 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 -39
- data/spec/models/solidus_afterpay/gateway_spec.rb +0 -492
- data/spec/models/solidus_afterpay/order_component_builder_spec.rb +0 -198
- data/spec/models/solidus_afterpay/payment_method_spec.rb +0 -207
- 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/presenters/solidus_afterpay/order_presenter_spec.rb +0 -34
- data/spec/presenters/solidus_afterpay/shipping_rate_presenter_spec.rb +0 -28
- data/spec/requests/solidus_afterpay/callbacks_controller_spec.rb +0 -127
- data/spec/requests/solidus_afterpay/checkouts_controller_spec.rb +0 -258
- data/spec/requests/solidus_afterpay/express_callbacks_controller_spec.rb +0 -167
- data/spec/services/solidus_afterpay/base_service_spec.rb +0 -13
- data/spec/services/solidus_afterpay/shipping_rate_builder_service_spec.rb +0 -34
- data/spec/services/solidus_afterpay/update_order_addresses_service_spec.rb +0 -82
- data/spec/services/solidus_afterpay/update_order_attributes_service_spec.rb +0 -58
- data/spec/spec_helper.rb +0 -31
- data/spec/support/auth.rb +0 -15
- data/spec/support/cache.rb +0 -5
- data/spec/support/preferences.rb +0 -33
- data/spec/support/solidus.rb +0 -1
- data/spec/support/vcr.rb +0 -18
- data/spec/views/solidus_afterpay/express_checkout_button_spec.rb +0 -33
- data/spec/views/spree/shared/afterpay_messaging_spec.rb +0 -44
@@ -1,137 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://global-api-sandbox.afterpay.com/v2/payments/100101785223/void
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"token":null,"merchantReference":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
|
-
- Tue, 31 Aug 2021 10:22:03 GMT
|
27
|
-
Content-Type:
|
28
|
-
- application/json
|
29
|
-
Content-Length:
|
30
|
-
- '1993'
|
31
|
-
Connection:
|
32
|
-
- keep-alive
|
33
|
-
Http-Correlation-Id:
|
34
|
-
- 3djladyckq4eyixzpg25kpstqu
|
35
|
-
X-Envoy-Upstream-Service-Time:
|
36
|
-
- '59'
|
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=fccd84a710b94b8835e58821b8d3c0ad1a209709-1630405323-1800-AYRVwW5QoB3nL1+7aXeNkU5GPWIIR9p7HJ8Xb+bPGzsIxsn4/9+CICpHFq0kc8GfVcOqp4DVI8LmsaGeOmIX8vwPlIuoLaZxsJHCFx18Vmje;
|
43
|
-
path=/; expires=Tue, 31-Aug-21 10:52:03 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
|
-
- 68758912f9d66f64-FCO
|
51
|
-
body:
|
52
|
-
encoding: UTF-8
|
53
|
-
string: |-
|
54
|
-
{
|
55
|
-
"id" : "100101785223",
|
56
|
-
"token" : "002.e247pp0rcn2fp1qvkfga4dtnnjk1858p389alt6738j5flm9",
|
57
|
-
"status" : "APPROVED",
|
58
|
-
"created" : "2021-08-31T10:21:04.482Z",
|
59
|
-
"originalAmount" : {
|
60
|
-
"amount" : "26.24",
|
61
|
-
"currency" : "USD"
|
62
|
-
},
|
63
|
-
"openToCaptureAmount" : {
|
64
|
-
"amount" : "16.24",
|
65
|
-
"currency" : "USD"
|
66
|
-
},
|
67
|
-
"paymentState" : "AUTH_APPROVED",
|
68
|
-
"merchantReference" : "R435232519",
|
69
|
-
"refunds" : [ {
|
70
|
-
"amount" : {
|
71
|
-
"amount" : "10.00",
|
72
|
-
"currency" : "USD"
|
73
|
-
},
|
74
|
-
"refundId" : "1948421",
|
75
|
-
"refundedAt" : "2021-08-31T10:22:02.911Z"
|
76
|
-
} ],
|
77
|
-
"orderDetails" : {
|
78
|
-
"consumer" : {
|
79
|
-
"phoneNumber" : "",
|
80
|
-
"givenNames" : "Christian",
|
81
|
-
"surname" : "Rimondi",
|
82
|
-
"email" : "admin@example.com"
|
83
|
-
},
|
84
|
-
"billing" : {
|
85
|
-
"name" : "Christian Rimondi",
|
86
|
-
"line1" : "1313 Broadway",
|
87
|
-
"line2" : "",
|
88
|
-
"area1" : "New York",
|
89
|
-
"region" : "NY",
|
90
|
-
"postcode" : "10001",
|
91
|
-
"phoneNumber" : "12524264421"
|
92
|
-
},
|
93
|
-
"shipping" : {
|
94
|
-
"name" : "Christian Rimondi",
|
95
|
-
"line1" : "1313 Broadway",
|
96
|
-
"line2" : "",
|
97
|
-
"area1" : "New York",
|
98
|
-
"region" : "NY",
|
99
|
-
"postcode" : "10001",
|
100
|
-
"phoneNumber" : "12524264421"
|
101
|
-
},
|
102
|
-
"courier" : { },
|
103
|
-
"items" : [ {
|
104
|
-
"name" : "Solidus T-Shirt",
|
105
|
-
"sku" : "SOL-00003",
|
106
|
-
"quantity" : 1,
|
107
|
-
"price" : {
|
108
|
-
"amount" : "19.99",
|
109
|
-
"currency" : "USD"
|
110
|
-
}
|
111
|
-
} ],
|
112
|
-
"discounts" : [ ]
|
113
|
-
},
|
114
|
-
"events" : [ {
|
115
|
-
"id" : "1xUMc5a8zg55pFQOS3AIRh8Aozs",
|
116
|
-
"created" : "2021-08-31T10:21:29.045Z",
|
117
|
-
"expires" : "2021-09-07T10:21:29.044Z",
|
118
|
-
"type" : "AUTH_APPROVED",
|
119
|
-
"amount" : {
|
120
|
-
"amount" : "26.24",
|
121
|
-
"currency" : "USD"
|
122
|
-
},
|
123
|
-
"paymentEventMerchantReference" : null
|
124
|
-
}, {
|
125
|
-
"id" : "1xUMgHuj1jjX1bYsQRYhUjVK9Gz",
|
126
|
-
"created" : "2021-08-31T10:22:02.927Z",
|
127
|
-
"expires" : null,
|
128
|
-
"type" : "VOIDED",
|
129
|
-
"amount" : {
|
130
|
-
"amount" : "10.00",
|
131
|
-
"currency" : "USD"
|
132
|
-
},
|
133
|
-
"paymentEventMerchantReference" : null
|
134
|
-
} ]
|
135
|
-
}
|
136
|
-
recorded_at: Tue, 31 Aug 2021 10:22:03 GMT
|
137
|
-
recorded_with: VCR 6.0.0
|
@@ -1,64 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://global-api-sandbox.afterpay.com/v2/checkouts/INVALID_TOKEN
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- SolidusAfterpay/0.1.0 (Solidus/3.1.0.alpha; Ruby/2.7.3; Merchant/100101481)
|
12
|
-
https://
|
13
|
-
Authorization:
|
14
|
-
- Basic <ENCODED_AUTH_HEADER>
|
15
|
-
Accept-Encoding:
|
16
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
17
|
-
Accept:
|
18
|
-
- "*/*"
|
19
|
-
response:
|
20
|
-
status:
|
21
|
-
code: 412
|
22
|
-
message: Precondition Failed
|
23
|
-
headers:
|
24
|
-
Date:
|
25
|
-
- Fri, 10 Sep 2021 12:55:37 GMT
|
26
|
-
Content-Type:
|
27
|
-
- application/json
|
28
|
-
Content-Length:
|
29
|
-
- '126'
|
30
|
-
Connection:
|
31
|
-
- keep-alive
|
32
|
-
Cf-Ray:
|
33
|
-
- 68c8cfcace07cd42-FCO
|
34
|
-
Cache-Control:
|
35
|
-
- private, no-cache, no-store, no-transform, must-revalidate, max-age=0
|
36
|
-
Strict-Transport-Security:
|
37
|
-
- max-age=31536000; includeSubDomains; preload
|
38
|
-
Cf-Cache-Status:
|
39
|
-
- DYNAMIC
|
40
|
-
Expect-Ct:
|
41
|
-
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
42
|
-
Http-Correlation-Id:
|
43
|
-
- n77tvm4ti5ngv6qbdz2o5vxan4
|
44
|
-
X-Envoy-Upstream-Service-Time:
|
45
|
-
- '9'
|
46
|
-
Set-Cookie:
|
47
|
-
- __cf_bm=u7iiZFdsOy9xrjOBMLoGsG1bhrLVARFRB1GlF.L_jLk-1631278537-0-ASztXHMHJmoTvt4gncQmxFsGkLaaD5ce0qXpvrva6GUGea4Y1iCdSXmzKOC2oEv/fB5Bj5W5TM3wHOEwof0LGNyGsWp0Oqb/cdPCJnsypwQJ;
|
48
|
-
path=/; expires=Fri, 10-Sep-21 13:25:37 GMT; domain=.afterpay.com; HttpOnly;
|
49
|
-
Secure; SameSite=None
|
50
|
-
Vary:
|
51
|
-
- Accept-Encoding
|
52
|
-
Server:
|
53
|
-
- cloudflare
|
54
|
-
body:
|
55
|
-
encoding: UTF-8
|
56
|
-
string: |-
|
57
|
-
{
|
58
|
-
"errorCode" : "invalid_token",
|
59
|
-
"errorId" : "632c34635772cf87",
|
60
|
-
"message" : "Invalid token",
|
61
|
-
"httpStatusCode" : 412
|
62
|
-
}
|
63
|
-
recorded_at: Fri, 10 Sep 2021 12:55:37 GMT
|
64
|
-
recorded_with: VCR 6.0.0
|
@@ -1,120 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://global-api-sandbox.afterpay.com/v2/checkouts/002.cb9qevbs1o4el3adh817hqkotkbv4b8u1jkekofd3nb2m8lu
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- SolidusAfterpay/0.1.0 (Solidus/3.1.0.alpha; Ruby/2.7.3; Merchant/100101481)
|
12
|
-
https://
|
13
|
-
Authorization:
|
14
|
-
- Basic <ENCODED_AUTH_HEADER>
|
15
|
-
Accept-Encoding:
|
16
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
17
|
-
Accept:
|
18
|
-
- "*/*"
|
19
|
-
response:
|
20
|
-
status:
|
21
|
-
code: 200
|
22
|
-
message: OK
|
23
|
-
headers:
|
24
|
-
Date:
|
25
|
-
- Fri, 10 Sep 2021 12:55:37 GMT
|
26
|
-
Content-Type:
|
27
|
-
- application/json
|
28
|
-
Content-Length:
|
29
|
-
- '658'
|
30
|
-
Connection:
|
31
|
-
- keep-alive
|
32
|
-
Cf-Ray:
|
33
|
-
- 68c8cfcc9ab2cd22-FCO
|
34
|
-
Cache-Control:
|
35
|
-
- private, no-cache, no-store, no-transform, must-revalidate, max-age=0
|
36
|
-
Strict-Transport-Security:
|
37
|
-
- max-age=31536000; includeSubDomains; preload
|
38
|
-
Vary:
|
39
|
-
- Accept-Encoding
|
40
|
-
Cf-Cache-Status:
|
41
|
-
- DYNAMIC
|
42
|
-
Expect-Ct:
|
43
|
-
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
44
|
-
Http-Correlation-Id:
|
45
|
-
- rphr5wjy4lhxns243hqra4me7i
|
46
|
-
X-Envoy-Upstream-Service-Time:
|
47
|
-
- '10'
|
48
|
-
Set-Cookie:
|
49
|
-
- __cf_bm=QktDNLQZpZjhjrQQdeOBa7v_55ZFkHI18nQLWFQE6IE-1631278537-0-ASrEesj20zPAWBG+xXE/Kv0XFWsFTxlokJ+G3tawp7KedkMaZ08Sw78BcT+MQ1oDDQySJopfnSAXUwdlQ+canyDEGn3Q3nChBOb4BZyrwhky;
|
50
|
-
path=/; expires=Fri, 10-Sep-21 13:25:37 GMT; domain=.afterpay.com; HttpOnly;
|
51
|
-
Secure; SameSite=None
|
52
|
-
Server:
|
53
|
-
- cloudflare
|
54
|
-
body:
|
55
|
-
encoding: ASCII-8BIT
|
56
|
-
string: |-
|
57
|
-
{
|
58
|
-
"token" : "002.cb9qevbs1o4el3adh817hqkotkbv4b8u1jkekofd3nb2m8lu",
|
59
|
-
"expires" : "2021-09-10T15:54:05.463Z",
|
60
|
-
"redirectCheckoutUrl" : "https://portal.sandbox.afterpay.com/us/checkout/?token=002.cb9qevbs1o4el3adh817hqkotkbv4b8u1jkekofd3nb2m8lu",
|
61
|
-
"amount" : {
|
62
|
-
"amount" : "53.53",
|
63
|
-
"currency" : "USD"
|
64
|
-
},
|
65
|
-
"consumer" : {
|
66
|
-
"phoneNumber" : "",
|
67
|
-
"givenNames" : "John",
|
68
|
-
"surname" : "Doe",
|
69
|
-
"email" : "andreavassallo@nebulab.com"
|
70
|
-
},
|
71
|
-
"billing" : {
|
72
|
-
"name" : "John Doe",
|
73
|
-
"line1" : "8125 Centre St",
|
74
|
-
"line2" : "",
|
75
|
-
"area1" : "Citronelle",
|
76
|
-
"region" : "AL",
|
77
|
-
"postcode" : "36522",
|
78
|
-
"phoneNumber" : "12123234223"
|
79
|
-
},
|
80
|
-
"shipping" : {
|
81
|
-
"name" : "John Doe",
|
82
|
-
"line1" : "8125 Centre St",
|
83
|
-
"area1" : "Citronelle",
|
84
|
-
"region" : "AL",
|
85
|
-
"postcode" : "36522",
|
86
|
-
"countryCode" : "US",
|
87
|
-
"phoneNumber" : "12123234223"
|
88
|
-
},
|
89
|
-
"courier" : { },
|
90
|
-
"items" : [ {
|
91
|
-
"name" : "Solidus T-Shirt",
|
92
|
-
"sku" : "SOL-00003",
|
93
|
-
"quantity" : 1,
|
94
|
-
"price" : {
|
95
|
-
"amount" : "19.99",
|
96
|
-
"currency" : "USD"
|
97
|
-
}
|
98
|
-
}, {
|
99
|
-
"name" : "Solidus Snapback Cap",
|
100
|
-
"sku" : "SOL-SNC01",
|
101
|
-
"quantity" : 1,
|
102
|
-
"price" : {
|
103
|
-
"amount" : "15.99",
|
104
|
-
"currency" : "USD"
|
105
|
-
}
|
106
|
-
} ],
|
107
|
-
"merchant" : {
|
108
|
-
"redirectConfirmUrl" : "http://localhost:5000/solidus_afterpay/callbacks/confirm?order_number=R063381025&payment_method_id=4",
|
109
|
-
"redirectCancelUrl" : "http://localhost:5000/solidus_afterpay/callbacks/cancel?order_number=R063381025&payment_method_id=4",
|
110
|
-
"popupOriginUrl" : "http://localhost:5000/cart"
|
111
|
-
},
|
112
|
-
"discounts" : [ ],
|
113
|
-
"merchantReference" : "R063381025",
|
114
|
-
"shippingOptionIdentifier" : "999",
|
115
|
-
"shippingOptions" : {
|
116
|
-
"supportedShippingCountries" : [ ]
|
117
|
-
}
|
118
|
-
}
|
119
|
-
recorded_at: Fri, 10 Sep 2021 12:55:37 GMT
|
120
|
-
recorded_with: VCR 6.0.0
|
@@ -1,61 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://global-api-sandbox.afterpay.com/v2/payments/INVALID_ORDER_ID
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
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
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Accept:
|
17
|
-
- "*/*"
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 404
|
21
|
-
message: Not Found
|
22
|
-
headers:
|
23
|
-
Date:
|
24
|
-
- Tue, 31 Aug 2021 10:29:43 GMT
|
25
|
-
Content-Type:
|
26
|
-
- application/json
|
27
|
-
Content-Length:
|
28
|
-
- '139'
|
29
|
-
Connection:
|
30
|
-
- keep-alive
|
31
|
-
Cache-Control:
|
32
|
-
- private, no-cache, no-store, no-transform, must-revalidate, max-age=0
|
33
|
-
Http-Correlation-Id:
|
34
|
-
- kaml4u6rplasbgh7a7b5rjlb54
|
35
|
-
X-Envoy-Upstream-Service-Time:
|
36
|
-
- '1'
|
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=2a8d27b96b99f883d4c875d2738ef2bd439b2889-1630405783-1800-AcWs6EMnepVy0P/+XUdUdhOi5Bn2+V/vkl8GaDDbbJ8EOVHxNLgQqx/HCdoUvJX7wLItvtmnSqeSU48gKjoBGlRDOJswbXnI3DJf7wKcjU5h;
|
43
|
-
path=/; expires=Tue, 31-Aug-21 10:59:43 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
|
-
- 6875944f0808cd32-FCO
|
51
|
-
body:
|
52
|
-
encoding: UTF-8
|
53
|
-
string: |-
|
54
|
-
{
|
55
|
-
"errorCode" : "not_found",
|
56
|
-
"errorId" : "ede919d5808edf1d",
|
57
|
-
"message" : "Afterpay payment ID not found.",
|
58
|
-
"httpStatusCode" : 404
|
59
|
-
}
|
60
|
-
recorded_at: Tue, 31 Aug 2021 10:29:43 GMT
|
61
|
-
recorded_with: VCR 6.0.0
|
@@ -1,140 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://global-api-sandbox.afterpay.com/v2/payments/100101785223
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
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
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Accept:
|
17
|
-
- "*/*"
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Date:
|
24
|
-
- Tue, 31 Aug 2021 10:31:19 GMT
|
25
|
-
Content-Type:
|
26
|
-
- application/json
|
27
|
-
Content-Length:
|
28
|
-
- '707'
|
29
|
-
Connection:
|
30
|
-
- keep-alive
|
31
|
-
Cache-Control:
|
32
|
-
- private, no-cache, no-store, no-transform, must-revalidate, max-age=0
|
33
|
-
Http-Correlation-Id:
|
34
|
-
- xeul5ivqioaj5y4ejzttwad7z4
|
35
|
-
Vary:
|
36
|
-
- Accept-Encoding
|
37
|
-
X-Envoy-Upstream-Service-Time:
|
38
|
-
- '45'
|
39
|
-
Cf-Cache-Status:
|
40
|
-
- DYNAMIC
|
41
|
-
Expect-Ct:
|
42
|
-
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
43
|
-
Set-Cookie:
|
44
|
-
- __cf_bm=30cababe501d5e9120d02db9b623356df46461b9-1630405879-1800-AVBJk56ZgyTE8bHojNTP/qdQ0bXBD3tFiPBoSBU+t5mXm5oYqrWfzPQ2k28mScIwJ8iNCAyxwLj0qlr7J2hVXtRXToJ3yqevxO1/hGt5dJC/;
|
45
|
-
path=/; expires=Tue, 31-Aug-21 11:01:19 GMT; domain=.afterpay.com; HttpOnly;
|
46
|
-
Secure; SameSite=None
|
47
|
-
Strict-Transport-Security:
|
48
|
-
- max-age=31536000; includeSubDomains; preload
|
49
|
-
Server:
|
50
|
-
- cloudflare
|
51
|
-
Cf-Ray:
|
52
|
-
- 687596aa68a66f1c-FCO
|
53
|
-
body:
|
54
|
-
encoding: ASCII-8BIT
|
55
|
-
string: |-
|
56
|
-
{
|
57
|
-
"id" : "100101785223",
|
58
|
-
"token" : "002.e247pp0rcn2fp1qvkfga4dtnnjk1858p389alt6738j5flm9",
|
59
|
-
"status" : "APPROVED",
|
60
|
-
"created" : "2021-08-31T10:21:04.482Z",
|
61
|
-
"originalAmount" : {
|
62
|
-
"amount" : "26.24",
|
63
|
-
"currency" : "USD"
|
64
|
-
},
|
65
|
-
"openToCaptureAmount" : {
|
66
|
-
"amount" : "16.24",
|
67
|
-
"currency" : "USD"
|
68
|
-
},
|
69
|
-
"paymentState" : "AUTH_APPROVED",
|
70
|
-
"merchantReference" : "R435232519",
|
71
|
-
"refunds" : [ {
|
72
|
-
"amount" : {
|
73
|
-
"amount" : "10.00",
|
74
|
-
"currency" : "USD"
|
75
|
-
},
|
76
|
-
"refundId" : "1xUMgHuj1jjX1bYsQRYhUjVK9Gz",
|
77
|
-
"refundedAt" : "2021-08-31T10:22:02.927Z"
|
78
|
-
} ],
|
79
|
-
"orderDetails" : {
|
80
|
-
"consumer" : {
|
81
|
-
"phoneNumber" : "",
|
82
|
-
"givenNames" : "Christian",
|
83
|
-
"surname" : "Rimondi",
|
84
|
-
"email" : "admin@example.com"
|
85
|
-
},
|
86
|
-
"billing" : {
|
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
|
-
"shipping" : {
|
96
|
-
"name" : "Christian Rimondi",
|
97
|
-
"line1" : "1313 Broadway",
|
98
|
-
"line2" : "",
|
99
|
-
"area1" : "New York",
|
100
|
-
"region" : "NY",
|
101
|
-
"postcode" : "10001",
|
102
|
-
"phoneNumber" : "12524264421"
|
103
|
-
},
|
104
|
-
"courier" : { },
|
105
|
-
"items" : [ {
|
106
|
-
"name" : "Solidus T-Shirt",
|
107
|
-
"sku" : "SOL-00003",
|
108
|
-
"quantity" : 1,
|
109
|
-
"price" : {
|
110
|
-
"amount" : "19.99",
|
111
|
-
"currency" : "USD"
|
112
|
-
},
|
113
|
-
"categories" : [ ]
|
114
|
-
} ],
|
115
|
-
"discounts" : [ ]
|
116
|
-
},
|
117
|
-
"events" : [ {
|
118
|
-
"id" : "1xUMc5a8zg55pFQOS3AIRh8Aozs",
|
119
|
-
"created" : "2021-08-31T10:21:29.074Z",
|
120
|
-
"expires" : "2021-09-07T10:21:29.044Z",
|
121
|
-
"type" : "AUTH_APPROVED",
|
122
|
-
"amount" : {
|
123
|
-
"amount" : "26.24",
|
124
|
-
"currency" : "USD"
|
125
|
-
},
|
126
|
-
"paymentEventMerchantReference" : null
|
127
|
-
}, {
|
128
|
-
"id" : "1xUMgHuj1jjX1bYsQRYhUjVK9Gz",
|
129
|
-
"created" : "2021-08-31T10:22:02.927Z",
|
130
|
-
"expires" : null,
|
131
|
-
"type" : "VOIDED",
|
132
|
-
"amount" : {
|
133
|
-
"amount" : "10.00",
|
134
|
-
"currency" : "USD"
|
135
|
-
},
|
136
|
-
"paymentEventMerchantReference" : null
|
137
|
-
} ]
|
138
|
-
}
|
139
|
-
recorded_at: Tue, 31 Aug 2021 10:31:19 GMT
|
140
|
-
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/capture
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"token":"002.kj16plsn63eqfacueg767cp7l34e9ph5tms4ql14o2iid7l1","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: 201
|
23
|
-
message: Created
|
24
|
-
headers:
|
25
|
-
Date:
|
26
|
-
- Wed, 25 Aug 2021 14:57:17 GMT
|
27
|
-
Content-Type:
|
28
|
-
- application/json
|
29
|
-
Content-Length:
|
30
|
-
- '1560'
|
31
|
-
Connection:
|
32
|
-
- keep-alive
|
33
|
-
Http-Correlation-Id:
|
34
|
-
- wbzt22o3ajpm2efimhqfmwst6m
|
35
|
-
X-Envoy-Upstream-Service-Time:
|
36
|
-
- '69'
|
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=0f42003dd5d0a97e8093a1ca3845148197627dc7-1629903437-1800-AQmyscm4AU8yJ+HMdlqMUYCVIajsIsAS6CbHuihiQsKF0l/Un9e6mweBaPcPTkp5Wrwn6vMcDTsNPlHHVpRkvrDWTwuuKXuaZHFVFnR6WAEk;
|
43
|
-
path=/; expires=Wed, 25-Aug-21 15:27:17 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
|
-
- 6845ac04aaf6fc85-FCO
|
51
|
-
body:
|
52
|
-
encoding: UTF-8
|
53
|
-
string: |-
|
54
|
-
{
|
55
|
-
"id" : "100101770179",
|
56
|
-
"token" : "002.kj16plsn63eqfacueg767cp7l34e9ph5tms4ql14o2iid7l1",
|
57
|
-
"status" : "DECLINED",
|
58
|
-
"created" : "2021-08-25T09:46:39.126Z",
|
59
|
-
"originalAmount" : {
|
60
|
-
"amount" : "22.04",
|
61
|
-
"currency" : "USD"
|
62
|
-
},
|
63
|
-
"openToCaptureAmount" : {
|
64
|
-
"amount" : "22.04",
|
65
|
-
"currency" : "USD"
|
66
|
-
},
|
67
|
-
"paymentState" : "CAPTURE_DECLINED",
|
68
|
-
"merchantReference" : "R628448628",
|
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" : "Ruby Tote",
|
98
|
-
"sku" : "RUB-TOT01",
|
99
|
-
"quantity" : 1,
|
100
|
-
"price" : {
|
101
|
-
"amount" : "15.99",
|
102
|
-
"currency" : "USD"
|
103
|
-
}
|
104
|
-
} ],
|
105
|
-
"discounts" : [ ]
|
106
|
-
},
|
107
|
-
"events" : [ {
|
108
|
-
"id" : "1xDM3uHavfYqSFPWoQTNQgwrERa",
|
109
|
-
"created" : "2021-08-25T09:50:09.174Z",
|
110
|
-
"expires" : null,
|
111
|
-
"type" : "CAPTURE_DECLINED",
|
112
|
-
"amount" : {
|
113
|
-
"amount" : "22.04",
|
114
|
-
"currency" : "USD"
|
115
|
-
},
|
116
|
-
"paymentEventMerchantReference" : null
|
117
|
-
} ]
|
118
|
-
}
|
119
|
-
recorded_at: Wed, 25 Aug 2021 14:57:17 GMT
|
120
|
-
recorded_with: VCR 6.0.0
|