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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +9 -0
  3. data/Gemfile +6 -3
  4. data/README.md +3 -0
  5. data/app/controllers/solidus_afterpay/callbacks_controller.rb +5 -1
  6. data/app/controllers/solidus_afterpay/express_callbacks_controller.rb +5 -1
  7. data/app/models/solidus_afterpay/order_component_builder.rb +1 -1
  8. data/bin/sandbox +1 -1
  9. data/lib/solidus_afterpay/configuration.rb +9 -2
  10. data/lib/solidus_afterpay/engine.rb +1 -1
  11. data/lib/solidus_afterpay/testing_support/factories.rb +1 -1
  12. data/lib/solidus_afterpay/version.rb +1 -1
  13. data/solidus_afterpay.gemspec +4 -4
  14. metadata +11 -99
  15. data/spec/fixtures/vcr_casettes/create_checkout/invalid.yml +0 -65
  16. data/spec/fixtures/vcr_casettes/create_checkout/valid.yml +0 -64
  17. data/spec/fixtures/vcr_casettes/credit/invalid.yml +0 -61
  18. data/spec/fixtures/vcr_casettes/credit/valid.yml +0 -63
  19. data/spec/fixtures/vcr_casettes/deferred/authorize/declined_payment.yml +0 -120
  20. data/spec/fixtures/vcr_casettes/deferred/authorize/invalid.yml +0 -61
  21. data/spec/fixtures/vcr_casettes/deferred/authorize/valid.yml +0 -120
  22. data/spec/fixtures/vcr_casettes/deferred/capture/invalid.yml +0 -61
  23. data/spec/fixtures/vcr_casettes/deferred/capture/valid.yml +0 -140
  24. data/spec/fixtures/vcr_casettes/deferred/void/invalid.yml +0 -61
  25. data/spec/fixtures/vcr_casettes/deferred/void/valid.yml +0 -137
  26. data/spec/fixtures/vcr_casettes/find_order/invalid.yml +0 -64
  27. data/spec/fixtures/vcr_casettes/find_order/valid.yml +0 -120
  28. data/spec/fixtures/vcr_casettes/find_payment/invalid.yml +0 -61
  29. data/spec/fixtures/vcr_casettes/find_payment/valid.yml +0 -140
  30. data/spec/fixtures/vcr_casettes/immediate/capture/declined_payment.yml +0 -120
  31. data/spec/fixtures/vcr_casettes/immediate/capture/invalid.yml +0 -61
  32. data/spec/fixtures/vcr_casettes/immediate/capture/valid.yml +0 -134
  33. data/spec/fixtures/vcr_casettes/retrieve_configuration/valid.yml +0 -67
  34. data/spec/helpers/solidus_afterpay/afterpay_helper_spec.rb +0 -39
  35. data/spec/models/solidus_afterpay/gateway_spec.rb +0 -492
  36. data/spec/models/solidus_afterpay/order_component_builder_spec.rb +0 -198
  37. data/spec/models/solidus_afterpay/payment_method_spec.rb +0 -207
  38. data/spec/models/solidus_afterpay/payment_source_spec.rb +0 -61
  39. data/spec/models/solidus_afterpay/user_agent_generator_spec.rb +0 -22
  40. data/spec/models/spree/order_spec.rb +0 -158
  41. data/spec/presenters/solidus_afterpay/order_presenter_spec.rb +0 -34
  42. data/spec/presenters/solidus_afterpay/shipping_rate_presenter_spec.rb +0 -28
  43. data/spec/requests/solidus_afterpay/callbacks_controller_spec.rb +0 -127
  44. data/spec/requests/solidus_afterpay/checkouts_controller_spec.rb +0 -258
  45. data/spec/requests/solidus_afterpay/express_callbacks_controller_spec.rb +0 -167
  46. data/spec/services/solidus_afterpay/base_service_spec.rb +0 -13
  47. data/spec/services/solidus_afterpay/shipping_rate_builder_service_spec.rb +0 -34
  48. data/spec/services/solidus_afterpay/update_order_addresses_service_spec.rb +0 -82
  49. data/spec/services/solidus_afterpay/update_order_attributes_service_spec.rb +0 -58
  50. data/spec/spec_helper.rb +0 -31
  51. data/spec/support/auth.rb +0 -15
  52. data/spec/support/cache.rb +0 -5
  53. data/spec/support/preferences.rb +0 -33
  54. data/spec/support/solidus.rb +0 -1
  55. data/spec/support/vcr.rb +0 -18
  56. data/spec/views/solidus_afterpay/express_checkout_button_spec.rb +0 -33
  57. data/spec/views/spree/shared/afterpay_messaging_spec.rb +0 -44
@@ -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
@@ -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.m6d9jkrtv1p0j4jqslklhfq9k4nl54jo2530d58kf6snpqq1","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
- - Thu, 26 Aug 2021 16:29:00 GMT
27
- Content-Type:
28
- - application/json
29
- Content-Length:
30
- - '1582'
31
- Connection:
32
- - keep-alive
33
- Http-Correlation-Id:
34
- - k654fhwizgpnbdibcncwtr6gyu
35
- X-Envoy-Upstream-Service-Time:
36
- - '287'
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=68a30d131a201eb6606d48280916ef0e8dbe85cf-1629995340-1800-ARn57j5GkV7ltywtVVCLVLWapp8IWDQ3WR+nZnNDOz+KL+/4f5v61NOLYoWOHX53YA24dt6A4GzYSMQgZkqTh5IXtnSKKkQQBR5pvlrAI3NT;
43
- path=/; expires=Thu, 26-Aug-21 16:59: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
- - 684e6fb9e8f56f52-FCO
51
- body:
52
- encoding: UTF-8
53
- string: |-
54
- {
55
- "id" : "100101782114",
56
- "token" : "002.m6d9jkrtv1p0j4jqslklhfq9k4nl54jo2530d58kf6snpqq1",
57
- "status" : "APPROVED",
58
- "created" : "2021-08-26T16:27:34.957Z",
59
- "originalAmount" : {
60
- "amount" : "26.24",
61
- "currency" : "USD"
62
- },
63
- "openToCaptureAmount" : {
64
- "amount" : "26.24",
65
- "currency" : "USD"
66
- },
67
- "paymentState" : "AUTH_APPROVED",
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" : "1xGxgr4IwNIYMLTijS80YQSpAbs",
109
- "created" : "2021-08-26T16:29:00.156Z",
110
- "expires" : "2021-09-02T16:29:00.154Z",
111
- "type" : "AUTH_APPROVED",
112
- "amount" : {
113
- "amount" : "26.24",
114
- "currency" : "USD"
115
- },
116
- "paymentEventMerchantReference" : null
117
- } ]
118
- }
119
- recorded_at: Thu, 26 Aug 2021 16:29:00 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/INVALID_RESPONSE_CODE/capture
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: 404
23
- message: Not Found
24
- headers:
25
- Date:
26
- - Mon, 30 Aug 2021 08:48:27 GMT
27
- Content-Type:
28
- - application/json
29
- Transfer-Encoding:
30
- - chunked
31
- Connection:
32
- - keep-alive
33
- Http-Correlation-Id:
34
- - 65heouufjkegv3vl5qb4i73xcy
35
- X-Envoy-Upstream-Service-Time:
36
- - '10'
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=668eff4e9ffc28fd31679cdc0261c9ce4b4acb4f-1630313307-1800-ARk1O0SHKLPLwUr13/S67+8NNwr+pjKEXPuAkFR3wUFehdAFbFXgmCP/WIdwgqMJhCTfgtb5JTUww/y2ybtjxRVHs3ghPKv8n8FlLptenDOJ;
43
- path=/; expires=Mon, 30-Aug-21 09:18:27 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
- - 686cc29bb9b9cd16-FCO
51
- body:
52
- encoding: ASCII-8BIT
53
- string: |-
54
- {
55
- "errorCode" : "not_found",
56
- "errorId" : "b02ca4e229954972",
57
- "message" : "Afterpay payment ID not found.",
58
- "httpStatusCode" : 404
59
- }
60
- recorded_at: Mon, 30 Aug 2021 08:48:27 GMT
61
- recorded_with: VCR 6.0.0
@@ -1,140 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://global-api-sandbox.afterpay.com/v2/payments/100101782114/capture
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
- - Mon, 30 Aug 2021 08:48:27 GMT
27
- Content-Type:
28
- - application/json
29
- Content-Length:
30
- - '2102'
31
- Connection:
32
- - keep-alive
33
- Http-Correlation-Id:
34
- - ozupbu4dmlivkgkqcb3hse46pa
35
- X-Envoy-Upstream-Service-Time:
36
- - '30'
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=fe551c8249f0fc8a8392504329daf6fc7bbdd579-1630313307-1800-Ae5qBfEcUSiF6/f+0sKnwQj1nhuHwASlKgZn2PJtUJEApOuu1pqCfgSwpM209BNW+TXJREQGPXbMqZYmcSE6cLeFYXOlzeI11NSwWBDk12x4;
43
- path=/; expires=Mon, 30-Aug-21 09:18:27 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
- - 686cc2995adacd2a-FCO
51
- body:
52
- encoding: UTF-8
53
- string: |-
54
- {
55
- "id" : "100101782114",
56
- "token" : "002.6pp2jr5uhgakhroekobc8ei75jsb0aicevunbcudl094dir7",
57
- "status" : "APPROVED",
58
- "created" : "2021-08-30T08:45:58.336Z",
59
- "originalAmount" : {
60
- "amount" : "26.24",
61
- "currency" : "USD"
62
- },
63
- "openToCaptureAmount" : {
64
- "amount" : "6.24",
65
- "currency" : "USD"
66
- },
67
- "paymentState" : "PARTIALLY_CAPTURED",
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" : "1xRLxAGSlrW6GphmzOiNqLgUrKA",
109
- "created" : "2021-08-30T08:46:37.409Z",
110
- "expires" : "2021-09-06T08:46:37.407Z",
111
- "type" : "AUTH_APPROVED",
112
- "amount" : {
113
- "amount" : "26.24",
114
- "currency" : "USD"
115
- },
116
- "paymentEventMerchantReference" : null
117
- }, {
118
- "id" : "1xRMAnRV2coOinONSRiP64gecUd",
119
- "created" : "2021-08-30T08:48:26.776Z",
120
- "expires" : null,
121
- "type" : "CAPTURED",
122
- "amount" : {
123
- "amount" : "10.00",
124
- "currency" : "USD"
125
- },
126
- "paymentEventMerchantReference" : null
127
- }, {
128
- "id" : "1xRMAxMjwp4lx8EsOONREc3qyq2",
129
- "created" : "2021-08-30T08:48:27.278Z",
130
- "expires" : null,
131
- "type" : "CAPTURED",
132
- "amount" : {
133
- "amount" : "10.00",
134
- "currency" : "USD"
135
- },
136
- "paymentEventMerchantReference" : null
137
- } ]
138
- }
139
- recorded_at: Mon, 30 Aug 2021 08:48:27 GMT
140
- 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/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: 404
23
- message: Not Found
24
- headers:
25
- Date:
26
- - Tue, 31 Aug 2021 10:19:45 GMT
27
- Content-Type:
28
- - application/json
29
- Transfer-Encoding:
30
- - chunked
31
- Connection:
32
- - keep-alive
33
- Http-Correlation-Id:
34
- - nvru4vd2rc77r254b3aklc2uxm
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=99d225d764ed10363fa918c8805988dd7bef9b4b-1630405185-1800-ATek5+ile0BoSnL/K9enQU+J/hrmRE6pScNBdRkQHOoB2NS0O/y9otYoCa0v8FD1OZFovIrCpRQpqe8qQXd+cpid2ttFkOYjrTpKRDBaAiGf;
43
- path=/; expires=Tue, 31-Aug-21 10:49:45 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
- - 687585b5fba0cd26-FCO
51
- body:
52
- encoding: ASCII-8BIT
53
- string: |-
54
- {
55
- "errorCode" : "not_found",
56
- "errorId" : "6867bf55cc14fa09",
57
- "message" : "Afterpay payment ID not found.",
58
- "httpStatusCode" : 404
59
- }
60
- recorded_at: Tue, 31 Aug 2021 10:19:45 GMT
61
- recorded_with: VCR 6.0.0