workarea-checkoutdotcom 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/.eslintrc +24 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  4. data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  6. data/.github/workflows/ci.yml +54 -0
  7. data/.gitignore +23 -0
  8. data/.rubocop.yml +3 -0
  9. data/.stylelintrc.json +8 -0
  10. data/CHANGELOG.md +59 -0
  11. data/Gemfile +6 -0
  12. data/README.md +74 -0
  13. data/Rakefile +60 -0
  14. data/app/lib/active_merchant/billing/gateways/checkout_v2.decorator +22 -0
  15. data/app/models/workarea/payment/authorize/credit_card.decorator +41 -0
  16. data/app/models/workarea/payment/purchase/credit_card.decorator +44 -0
  17. data/app/models/workarea/payment/store_credit_card.decorator +17 -0
  18. data/bin/rails +20 -0
  19. data/config/initializers/workarea.rb +1 -0
  20. data/lib/active_merchant/billing/bogus_checkout_v2_gateway.rb +42 -0
  21. data/lib/workarea/checkoutdotcom.rb +46 -0
  22. data/lib/workarea/checkoutdotcom/engine.rb +8 -0
  23. data/lib/workarea/checkoutdotcom/version.rb +5 -0
  24. data/script/admin_ci +9 -0
  25. data/script/ci +11 -0
  26. data/script/core_ci +9 -0
  27. data/script/plugins_ci +9 -0
  28. data/script/storefront_ci +9 -0
  29. data/test/dummy/Rakefile +6 -0
  30. data/test/dummy/bin/bundle +3 -0
  31. data/test/dummy/bin/rails +4 -0
  32. data/test/dummy/bin/rake +4 -0
  33. data/test/dummy/bin/setup +30 -0
  34. data/test/dummy/bin/update +26 -0
  35. data/test/dummy/bin/yarn +11 -0
  36. data/test/dummy/config.ru +5 -0
  37. data/test/dummy/config/application.rb +30 -0
  38. data/test/dummy/config/boot.rb +5 -0
  39. data/test/dummy/config/cable.yml +10 -0
  40. data/test/dummy/config/environment.rb +5 -0
  41. data/test/dummy/config/environments/development.rb +51 -0
  42. data/test/dummy/config/environments/production.rb +88 -0
  43. data/test/dummy/config/environments/test.rb +44 -0
  44. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  45. data/test/dummy/config/initializers/assets.rb +14 -0
  46. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  47. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  48. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  49. data/test/dummy/config/initializers/inflections.rb +16 -0
  50. data/test/dummy/config/initializers/mime_types.rb +4 -0
  51. data/test/dummy/config/initializers/workarea.rb +5 -0
  52. data/test/dummy/config/initializers/wrap_parameters.rb +9 -0
  53. data/test/dummy/config/locales/en.yml +33 -0
  54. data/test/dummy/config/puma.rb +56 -0
  55. data/test/dummy/config/routes.rb +5 -0
  56. data/test/dummy/config/secrets.yml +32 -0
  57. data/test/dummy/config/spring.rb +6 -0
  58. data/test/dummy/db/seeds.rb +2 -0
  59. data/test/dummy/log/.keep +0 -0
  60. data/test/models/workarea/payment/authorize/credit_card_test.decorator +38 -0
  61. data/test/models/workarea/payment/capture_test.decorator +27 -0
  62. data/test/models/workarea/payment/checkoutdotcom_integration_test.rb +178 -0
  63. data/test/models/workarea/payment/credit_card_integration_test.decorator +107 -0
  64. data/test/models/workarea/payment/purchase/credit_card_test.decorator +38 -0
  65. data/test/models/workarea/payment/refund_test.decorator +27 -0
  66. data/test/support/workarea/checkoutdotcom_gateway_vcr_config.rb +20 -0
  67. data/test/support/workarea/workarea_3_2_backports.rb +57 -0
  68. data/test/teaspoon_env.rb +6 -0
  69. data/test/test_helper.rb +10 -0
  70. data/test/vcr_cassettes/checkoutdotcom/auth_capture.yml +154 -0
  71. data/test/vcr_cassettes/checkoutdotcom/auth_capture_refund.yml +225 -0
  72. data/test/vcr_cassettes/checkoutdotcom/auth_void.yml +154 -0
  73. data/test/vcr_cassettes/checkoutdotcom/purchase_refund.yml +225 -0
  74. data/test/vcr_cassettes/checkoutdotcom/store_auth.yml +83 -0
  75. data/test/vcr_cassettes/checkoutdotcom/store_purchase.yml +154 -0
  76. data/test/vcr_cassettes/credit_card/auth_capture.yml +154 -0
  77. data/test/vcr_cassettes/credit_card/auth_capture_refund.yml +225 -0
  78. data/test/vcr_cassettes/credit_card/auth_void.yml +154 -0
  79. data/test/vcr_cassettes/credit_card/purchase_refund.yml +225 -0
  80. data/test/vcr_cassettes/credit_card/store_auth.yml +83 -0
  81. data/test/vcr_cassettes/credit_card/store_purchase.yml +154 -0
  82. data/test/workers/workarea/send_refund_email_test.decorator +27 -0
  83. data/workarea-checkoutdotcom.gemspec +19 -0
  84. metadata +144 -0
@@ -0,0 +1,154 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.sandbox.checkout.com/payments
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"capture":false,"amount":"500","reference":null,"currency":"USD","metadata":{"udf5":"ActiveMerchant"},"source":{"type":"card","name":"Ben
9
+ Crouse","number":"4242424242424242","cvv":100,"expiry_year":"2020","expiry_month":"01","billing_address":{"address_line1":"22
10
+ s. 3rd st.","city":"Philadelphia","state":"PA","country":"US","zip":"19106"}},"customer":{"email":null}}'
11
+ headers:
12
+ Content-Type:
13
+ - application/json;charset=UTF-8
14
+ Authorization:
15
+ - sk_test_f4c1d728-928c-4381-bc6b-03c0888fb877
16
+ Connection:
17
+ - close
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Accept:
21
+ - "*/*"
22
+ User-Agent:
23
+ - Ruby
24
+ response:
25
+ status:
26
+ code: 201
27
+ message: Created
28
+ headers:
29
+ Connection:
30
+ - close
31
+ Content-Length:
32
+ - '1485'
33
+ Cache-Control:
34
+ - no-cache
35
+ Pragma:
36
+ - no-cache
37
+ Content-Type:
38
+ - application/json; charset=utf-8
39
+ Expires:
40
+ - "-1"
41
+ Location:
42
+ - https://api.sandbox.checkout.com/payments/pay_rtkfe7hma3eerliem62zwtozqm
43
+ Product:
44
+ - Gateway
45
+ Cko-Version:
46
+ - 3.32.9
47
+ Cko-Request-Id:
48
+ - 3b3df819-1274-4bfd-b637-0ff28dbe1e59
49
+ Access-Control-Allow-Origin:
50
+ - "*"
51
+ Access-Control-Allow-Headers:
52
+ - Origin,X-Requested-With,Content-Type,Accept,X-AuthToken,Access-Control-Request-Method,Access-Control-Allow-Methods,Access-Control-Request-Headers,authorization,X_Auth_Credentials
53
+ Access-Control-Allow-Methods:
54
+ - OPTIONS,POST,GET,PUT,DELETE
55
+ Access-Control-Request-Method:
56
+ - OPTIONS,POST,GET,PUT,DELETE
57
+ Access-Control-Request-Headers:
58
+ - authorization
59
+ Accept-Ranges:
60
+ - bytes
61
+ Date:
62
+ - Tue, 19 Nov 2019 20:07:58 GMT
63
+ Via:
64
+ - 1.1 varnish
65
+ X-Served-By:
66
+ - cache-lga21934-LGA
67
+ X-Cache:
68
+ - MISS
69
+ X-Cache-Hits:
70
+ - '0'
71
+ X-Timer:
72
+ - S1574194078.011267,VS0,VE407
73
+ body:
74
+ encoding: UTF-8
75
+ string: '{"id":"pay_rtkfe7hma3eerliem62zwtozqm","action_id":"act_rtkfe7hma3eerliem62zwtozqm","amount":500,"currency":"USD","approved":true,"status":"Authorized","auth_code":"732316","eci":"05","scheme_id":"823258411803318","response_code":"10000","response_summary":"Approved","risk":{"flagged":false},"source":{"id":"src_67e3fipsfsoe7iw2iwsiaxq6aq","type":"card","billing_address":{"address_line1":"22
76
+ s. 3rd st.","city":"Philadelphia","state":"PA","zip":"19106","country":"US"},"expiry_month":1,"expiry_year":2020,"name":"Ben
77
+ Crouse","scheme":"Visa","last4":"4242","fingerprint":"A24ADA27CDDFF03B3607A0E4EA30E189F84B198ABDB346E39C3619982E7474AD","bin":"424242","card_type":"Credit","card_category":"Consumer","issuer":"JPMORGAN
78
+ CHASE BANK NA","issuer_country":"US","product_id":"A","product_type":"Visa
79
+ Traditional","avs_check":"S","cvv_check":"Y","payouts":true,"fast_funds":"d"},"customer":{"id":"cus_bamj2bba6b5ebgv32dtc5ow2zi","name":"Ben
80
+ Crouse"},"processed_on":"2019-11-19T20:07:58Z","processing":{"acquirer_transaction_id":"9025233614","retrieval_reference_number":"277776567210"},"_links":{"self":{"href":"https://api.sandbox.checkout.com/payments/pay_rtkfe7hma3eerliem62zwtozqm"},"actions":{"href":"https://api.sandbox.checkout.com/payments/pay_rtkfe7hma3eerliem62zwtozqm/actions"},"capture":{"href":"https://api.sandbox.checkout.com/payments/pay_rtkfe7hma3eerliem62zwtozqm/captures"},"void":{"href":"https://api.sandbox.checkout.com/payments/pay_rtkfe7hma3eerliem62zwtozqm/voids"}}}'
81
+ http_version:
82
+ recorded_at: Tue, 19 Nov 2019 20:07:58 GMT
83
+ - request:
84
+ method: post
85
+ uri: https://api.sandbox.checkout.com/payments/pay_rtkfe7hma3eerliem62zwtozqm/captures
86
+ body:
87
+ encoding: UTF-8
88
+ string: '{"amount":"500","reference":null,"currency":"USD","metadata":{"udf5":"ActiveMerchant"},"customer":{"email":null}}'
89
+ headers:
90
+ Content-Type:
91
+ - application/json;charset=UTF-8
92
+ Authorization:
93
+ - sk_test_f4c1d728-928c-4381-bc6b-03c0888fb877
94
+ Connection:
95
+ - close
96
+ Accept-Encoding:
97
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
98
+ Accept:
99
+ - "*/*"
100
+ User-Agent:
101
+ - Ruby
102
+ response:
103
+ status:
104
+ code: 202
105
+ message: Accepted
106
+ headers:
107
+ Connection:
108
+ - close
109
+ Content-Length:
110
+ - '151'
111
+ Cache-Control:
112
+ - no-cache
113
+ Pragma:
114
+ - no-cache
115
+ Content-Type:
116
+ - application/json; charset=utf-8
117
+ Expires:
118
+ - "-1"
119
+ Product:
120
+ - Gateway
121
+ Cko-Version:
122
+ - 3.32.9
123
+ Cko-Request-Id:
124
+ - 0f656d73-c407-43af-8442-9c2e97b90260
125
+ Access-Control-Allow-Origin:
126
+ - "*"
127
+ Access-Control-Allow-Headers:
128
+ - Origin,X-Requested-With,Content-Type,Accept,X-AuthToken,Access-Control-Request-Method,Access-Control-Allow-Methods,Access-Control-Request-Headers,authorization,X_Auth_Credentials
129
+ Access-Control-Allow-Methods:
130
+ - OPTIONS,POST,GET,PUT,DELETE
131
+ Access-Control-Request-Method:
132
+ - OPTIONS,POST,GET,PUT,DELETE
133
+ Access-Control-Request-Headers:
134
+ - authorization
135
+ Accept-Ranges:
136
+ - bytes
137
+ Date:
138
+ - Tue, 19 Nov 2019 20:07:59 GMT
139
+ Via:
140
+ - 1.1 varnish
141
+ X-Served-By:
142
+ - cache-lga21943-LGA
143
+ X-Cache:
144
+ - MISS
145
+ X-Cache-Hits:
146
+ - '0'
147
+ X-Timer:
148
+ - S1574194079.621586,VS0,VE410
149
+ body:
150
+ encoding: UTF-8
151
+ string: '{"action_id":"act_te3s3mbsizlezfu537gun6xwwe","_links":{"payment":{"href":"https://api.sandbox.checkout.com/payments/pay_rtkfe7hma3eerliem62zwtozqm"}}}'
152
+ http_version:
153
+ recorded_at: Tue, 19 Nov 2019 20:07:59 GMT
154
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,154 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.sandbox.checkout.com/payments
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"capture":false,"amount":"500","reference":"F59AA72E51","currency":"USD","metadata":{"udf5":"ActiveMerchant"},"source":{"type":"card","name":"Ben
9
+ Crouse","number":"4242424242424242","cvv":100,"expiry_year":"2020","expiry_month":"01","billing_address":{"address_line1":"22
10
+ s. 3rd st.","city":"Philadelphia","state":"PA","country":"US","zip":"19106"}},"customer":{"email":"user@workarea.com"}}'
11
+ headers:
12
+ Content-Type:
13
+ - application/json;charset=UTF-8
14
+ Authorization:
15
+ - sk_test_f4c1d728-928c-4381-bc6b-03c0888fb877
16
+ Connection:
17
+ - close
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Accept:
21
+ - "*/*"
22
+ User-Agent:
23
+ - Ruby
24
+ response:
25
+ status:
26
+ code: 201
27
+ message: Created
28
+ headers:
29
+ Connection:
30
+ - close
31
+ Content-Length:
32
+ - '1538'
33
+ Cache-Control:
34
+ - no-cache
35
+ Pragma:
36
+ - no-cache
37
+ Content-Type:
38
+ - application/json; charset=utf-8
39
+ Expires:
40
+ - "-1"
41
+ Location:
42
+ - https://api.sandbox.checkout.com/payments/pay_3uizfgw3g6nujdjeg466kiyex4
43
+ Product:
44
+ - Gateway
45
+ Cko-Version:
46
+ - 3.32.9
47
+ Cko-Request-Id:
48
+ - 9083561c-483b-4246-8d6a-115a63f62622
49
+ Access-Control-Allow-Origin:
50
+ - "*"
51
+ Access-Control-Allow-Headers:
52
+ - Origin,X-Requested-With,Content-Type,Accept,X-AuthToken,Access-Control-Request-Method,Access-Control-Allow-Methods,Access-Control-Request-Headers,authorization,X_Auth_Credentials
53
+ Access-Control-Allow-Methods:
54
+ - OPTIONS,POST,GET,PUT,DELETE
55
+ Access-Control-Request-Method:
56
+ - OPTIONS,POST,GET,PUT,DELETE
57
+ Access-Control-Request-Headers:
58
+ - authorization
59
+ Accept-Ranges:
60
+ - bytes
61
+ Date:
62
+ - Tue, 19 Nov 2019 20:48:19 GMT
63
+ Via:
64
+ - 1.1 varnish
65
+ X-Served-By:
66
+ - cache-lga21921-LGA
67
+ X-Cache:
68
+ - MISS
69
+ X-Cache-Hits:
70
+ - '0'
71
+ X-Timer:
72
+ - S1574196499.020303,VS0,VE396
73
+ body:
74
+ encoding: UTF-8
75
+ string: '{"id":"pay_3uizfgw3g6nujdjeg466kiyex4","action_id":"act_3uizfgw3g6nujdjeg466kiyex4","amount":500,"currency":"USD","approved":true,"status":"Authorized","auth_code":"270575","eci":"05","scheme_id":"929458365304749","response_code":"10000","response_summary":"Approved","risk":{"flagged":false},"source":{"id":"src_toxd2yvjsdlelieckfowkotabq","type":"card","billing_address":{"address_line1":"22
76
+ s. 3rd st.","city":"Philadelphia","state":"PA","zip":"19106","country":"US"},"expiry_month":1,"expiry_year":2020,"name":"Ben
77
+ Crouse","scheme":"Visa","last4":"4242","fingerprint":"A24ADA27CDDFF03B3607A0E4EA30E189F84B198ABDB346E39C3619982E7474AD","bin":"424242","card_type":"Credit","card_category":"Consumer","issuer":"JPMORGAN
78
+ CHASE BANK NA","issuer_country":"US","product_id":"A","product_type":"Visa
79
+ Traditional","avs_check":"S","cvv_check":"Y","payouts":true,"fast_funds":"d"},"customer":{"id":"cus_xwtxqa3y66euhnkwgpcwe7ijce","email":"user@workarea.com","name":"Ben
80
+ Crouse"},"processed_on":"2019-11-19T20:48:19Z","reference":"F59AA72E51","processing":{"acquirer_transaction_id":"7019299049","retrieval_reference_number":"467232870591"},"_links":{"self":{"href":"https://api.sandbox.checkout.com/payments/pay_3uizfgw3g6nujdjeg466kiyex4"},"actions":{"href":"https://api.sandbox.checkout.com/payments/pay_3uizfgw3g6nujdjeg466kiyex4/actions"},"capture":{"href":"https://api.sandbox.checkout.com/payments/pay_3uizfgw3g6nujdjeg466kiyex4/captures"},"void":{"href":"https://api.sandbox.checkout.com/payments/pay_3uizfgw3g6nujdjeg466kiyex4/voids"}}}'
81
+ http_version:
82
+ recorded_at: Tue, 19 Nov 2019 20:48:19 GMT
83
+ - request:
84
+ method: post
85
+ uri: https://api.sandbox.checkout.com/payments/pay_3uizfgw3g6nujdjeg466kiyex4/captures
86
+ body:
87
+ encoding: UTF-8
88
+ string: '{"amount":"500","reference":null,"currency":"USD","metadata":{"udf5":"ActiveMerchant"},"customer":{"email":null}}'
89
+ headers:
90
+ Content-Type:
91
+ - application/json;charset=UTF-8
92
+ Authorization:
93
+ - sk_test_f4c1d728-928c-4381-bc6b-03c0888fb877
94
+ Connection:
95
+ - close
96
+ Accept-Encoding:
97
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
98
+ Accept:
99
+ - "*/*"
100
+ User-Agent:
101
+ - Ruby
102
+ response:
103
+ status:
104
+ code: 202
105
+ message: Accepted
106
+ headers:
107
+ Connection:
108
+ - close
109
+ Content-Length:
110
+ - '176'
111
+ Cache-Control:
112
+ - no-cache
113
+ Pragma:
114
+ - no-cache
115
+ Content-Type:
116
+ - application/json; charset=utf-8
117
+ Expires:
118
+ - "-1"
119
+ Product:
120
+ - Gateway
121
+ Cko-Version:
122
+ - 3.32.9
123
+ Cko-Request-Id:
124
+ - 003b3c29-45e6-47c8-a740-9fb5428caa26
125
+ Access-Control-Allow-Origin:
126
+ - "*"
127
+ Access-Control-Allow-Headers:
128
+ - Origin,X-Requested-With,Content-Type,Accept,X-AuthToken,Access-Control-Request-Method,Access-Control-Allow-Methods,Access-Control-Request-Headers,authorization,X_Auth_Credentials
129
+ Access-Control-Allow-Methods:
130
+ - OPTIONS,POST,GET,PUT,DELETE
131
+ Access-Control-Request-Method:
132
+ - OPTIONS,POST,GET,PUT,DELETE
133
+ Access-Control-Request-Headers:
134
+ - authorization
135
+ Accept-Ranges:
136
+ - bytes
137
+ Date:
138
+ - Tue, 19 Nov 2019 20:48:20 GMT
139
+ Via:
140
+ - 1.1 varnish
141
+ X-Served-By:
142
+ - cache-lga21924-LGA
143
+ X-Cache:
144
+ - MISS
145
+ X-Cache-Hits:
146
+ - '0'
147
+ X-Timer:
148
+ - S1574196500.735163,VS0,VE403
149
+ body:
150
+ encoding: UTF-8
151
+ string: '{"action_id":"act_75bhx3oato7uhjw7kyoigarfci","reference":"F59AA72E51","_links":{"payment":{"href":"https://api.sandbox.checkout.com/payments/pay_3uizfgw3g6nujdjeg466kiyex4"}}}'
152
+ http_version:
153
+ recorded_at: Tue, 19 Nov 2019 20:48:20 GMT
154
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,225 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.sandbox.checkout.com/payments
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"capture":false,"amount":"500","reference":"35D8194235","currency":"USD","metadata":{"udf5":"ActiveMerchant"},"source":{"type":"card","name":"Ben
9
+ Crouse","number":"4242424242424242","cvv":100,"expiry_year":"2020","expiry_month":"01","billing_address":{"address_line1":"22
10
+ s. 3rd st.","city":"Philadelphia","state":"PA","country":"US","zip":"19106"}},"customer":{"email":"user@workarea.com"}}'
11
+ headers:
12
+ Content-Type:
13
+ - application/json;charset=UTF-8
14
+ Authorization:
15
+ - sk_test_f4c1d728-928c-4381-bc6b-03c0888fb877
16
+ Connection:
17
+ - close
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Accept:
21
+ - "*/*"
22
+ User-Agent:
23
+ - Ruby
24
+ response:
25
+ status:
26
+ code: 201
27
+ message: Created
28
+ headers:
29
+ Connection:
30
+ - close
31
+ Content-Length:
32
+ - '1538'
33
+ Cache-Control:
34
+ - no-cache
35
+ Pragma:
36
+ - no-cache
37
+ Content-Type:
38
+ - application/json; charset=utf-8
39
+ Expires:
40
+ - "-1"
41
+ Location:
42
+ - https://api.sandbox.checkout.com/payments/pay_iasssvvxqmeutms64xhycelgum
43
+ Product:
44
+ - Gateway
45
+ Cko-Version:
46
+ - 3.32.9
47
+ Cko-Request-Id:
48
+ - 0c1f5f91-a889-4381-b775-d06c7a043261
49
+ Access-Control-Allow-Origin:
50
+ - "*"
51
+ Access-Control-Allow-Headers:
52
+ - Origin,X-Requested-With,Content-Type,Accept,X-AuthToken,Access-Control-Request-Method,Access-Control-Allow-Methods,Access-Control-Request-Headers,authorization,X_Auth_Credentials
53
+ Access-Control-Allow-Methods:
54
+ - OPTIONS,POST,GET,PUT,DELETE
55
+ Access-Control-Request-Method:
56
+ - OPTIONS,POST,GET,PUT,DELETE
57
+ Access-Control-Request-Headers:
58
+ - authorization
59
+ Accept-Ranges:
60
+ - bytes
61
+ Date:
62
+ - Tue, 19 Nov 2019 20:48:21 GMT
63
+ Via:
64
+ - 1.1 varnish
65
+ X-Served-By:
66
+ - cache-lga21939-LGA
67
+ X-Cache:
68
+ - MISS
69
+ X-Cache-Hits:
70
+ - '0'
71
+ X-Timer:
72
+ - S1574196501.011011,VS0,VE366
73
+ body:
74
+ encoding: UTF-8
75
+ string: '{"id":"pay_iasssvvxqmeutms64xhycelgum","action_id":"act_iasssvvxqmeutms64xhycelgum","amount":500,"currency":"USD","approved":true,"status":"Authorized","auth_code":"372096","eci":"05","scheme_id":"732757557197645","response_code":"10000","response_summary":"Approved","risk":{"flagged":false},"source":{"id":"src_toxd2yvjsdlelieckfowkotabq","type":"card","billing_address":{"address_line1":"22
76
+ s. 3rd st.","city":"Philadelphia","state":"PA","zip":"19106","country":"US"},"expiry_month":1,"expiry_year":2020,"name":"Ben
77
+ Crouse","scheme":"Visa","last4":"4242","fingerprint":"A24ADA27CDDFF03B3607A0E4EA30E189F84B198ABDB346E39C3619982E7474AD","bin":"424242","card_type":"Credit","card_category":"Consumer","issuer":"JPMORGAN
78
+ CHASE BANK NA","issuer_country":"US","product_id":"A","product_type":"Visa
79
+ Traditional","avs_check":"S","cvv_check":"Y","payouts":true,"fast_funds":"d"},"customer":{"id":"cus_xwtxqa3y66euhnkwgpcwe7ijce","email":"user@workarea.com","name":"Ben
80
+ Crouse"},"processed_on":"2019-11-19T20:48:21Z","reference":"35D8194235","processing":{"acquirer_transaction_id":"7742939863","retrieval_reference_number":"153266679327"},"_links":{"self":{"href":"https://api.sandbox.checkout.com/payments/pay_iasssvvxqmeutms64xhycelgum"},"actions":{"href":"https://api.sandbox.checkout.com/payments/pay_iasssvvxqmeutms64xhycelgum/actions"},"capture":{"href":"https://api.sandbox.checkout.com/payments/pay_iasssvvxqmeutms64xhycelgum/captures"},"void":{"href":"https://api.sandbox.checkout.com/payments/pay_iasssvvxqmeutms64xhycelgum/voids"}}}'
81
+ http_version:
82
+ recorded_at: Tue, 19 Nov 2019 20:48:21 GMT
83
+ - request:
84
+ method: post
85
+ uri: https://api.sandbox.checkout.com/payments/pay_iasssvvxqmeutms64xhycelgum/captures
86
+ body:
87
+ encoding: UTF-8
88
+ string: '{"amount":"500","reference":null,"currency":"USD","metadata":{"udf5":"ActiveMerchant"},"customer":{"email":null}}'
89
+ headers:
90
+ Content-Type:
91
+ - application/json;charset=UTF-8
92
+ Authorization:
93
+ - sk_test_f4c1d728-928c-4381-bc6b-03c0888fb877
94
+ Connection:
95
+ - close
96
+ Accept-Encoding:
97
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
98
+ Accept:
99
+ - "*/*"
100
+ User-Agent:
101
+ - Ruby
102
+ response:
103
+ status:
104
+ code: 202
105
+ message: Accepted
106
+ headers:
107
+ Connection:
108
+ - close
109
+ Content-Length:
110
+ - '176'
111
+ Cache-Control:
112
+ - no-cache
113
+ Pragma:
114
+ - no-cache
115
+ Content-Type:
116
+ - application/json; charset=utf-8
117
+ Expires:
118
+ - "-1"
119
+ Product:
120
+ - Gateway
121
+ Cko-Version:
122
+ - 3.32.9
123
+ Cko-Request-Id:
124
+ - 83c00e7d-0f37-4e34-845b-e7d4159a89fa
125
+ Access-Control-Allow-Origin:
126
+ - "*"
127
+ Access-Control-Allow-Headers:
128
+ - Origin,X-Requested-With,Content-Type,Accept,X-AuthToken,Access-Control-Request-Method,Access-Control-Allow-Methods,Access-Control-Request-Headers,authorization,X_Auth_Credentials
129
+ Access-Control-Allow-Methods:
130
+ - OPTIONS,POST,GET,PUT,DELETE
131
+ Access-Control-Request-Method:
132
+ - OPTIONS,POST,GET,PUT,DELETE
133
+ Access-Control-Request-Headers:
134
+ - authorization
135
+ Accept-Ranges:
136
+ - bytes
137
+ Date:
138
+ - Tue, 19 Nov 2019 20:48:22 GMT
139
+ Via:
140
+ - 1.1 varnish
141
+ X-Served-By:
142
+ - cache-lga21920-LGA
143
+ X-Cache:
144
+ - MISS
145
+ X-Cache-Hits:
146
+ - '0'
147
+ X-Timer:
148
+ - S1574196502.641813,VS0,VE396
149
+ body:
150
+ encoding: UTF-8
151
+ string: '{"action_id":"act_y3jfa4lgey7ufb2mekfzsf6gyu","reference":"35D8194235","_links":{"payment":{"href":"https://api.sandbox.checkout.com/payments/pay_iasssvvxqmeutms64xhycelgum"}}}'
152
+ http_version:
153
+ recorded_at: Tue, 19 Nov 2019 20:48:22 GMT
154
+ - request:
155
+ method: post
156
+ uri: https://api.sandbox.checkout.com/payments/pay_iasssvvxqmeutms64xhycelgum/refunds
157
+ body:
158
+ encoding: UTF-8
159
+ string: '{"amount":"500","reference":null,"currency":"USD","metadata":{"udf5":"ActiveMerchant"},"customer":{"email":null}}'
160
+ headers:
161
+ Content-Type:
162
+ - application/json;charset=UTF-8
163
+ Authorization:
164
+ - sk_test_f4c1d728-928c-4381-bc6b-03c0888fb877
165
+ Connection:
166
+ - close
167
+ Accept-Encoding:
168
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
169
+ Accept:
170
+ - "*/*"
171
+ User-Agent:
172
+ - Ruby
173
+ response:
174
+ status:
175
+ code: 202
176
+ message: Accepted
177
+ headers:
178
+ Connection:
179
+ - close
180
+ Content-Length:
181
+ - '176'
182
+ Cache-Control:
183
+ - no-cache
184
+ Pragma:
185
+ - no-cache
186
+ Content-Type:
187
+ - application/json; charset=utf-8
188
+ Expires:
189
+ - "-1"
190
+ Product:
191
+ - Gateway
192
+ Cko-Version:
193
+ - 3.32.9
194
+ Cko-Request-Id:
195
+ - 1fadae98-67a1-4288-8bff-f28fb239617a
196
+ Access-Control-Allow-Origin:
197
+ - "*"
198
+ Access-Control-Allow-Headers:
199
+ - Origin,X-Requested-With,Content-Type,Accept,X-AuthToken,Access-Control-Request-Method,Access-Control-Allow-Methods,Access-Control-Request-Headers,authorization,X_Auth_Credentials
200
+ Access-Control-Allow-Methods:
201
+ - OPTIONS,POST,GET,PUT,DELETE
202
+ Access-Control-Request-Method:
203
+ - OPTIONS,POST,GET,PUT,DELETE
204
+ Access-Control-Request-Headers:
205
+ - authorization
206
+ Accept-Ranges:
207
+ - bytes
208
+ Date:
209
+ - Tue, 19 Nov 2019 20:48:22 GMT
210
+ Via:
211
+ - 1.1 varnish
212
+ X-Served-By:
213
+ - cache-lga21921-LGA
214
+ X-Cache:
215
+ - MISS
216
+ X-Cache-Hits:
217
+ - '0'
218
+ X-Timer:
219
+ - S1574196503.531330,VS0,VE182
220
+ body:
221
+ encoding: UTF-8
222
+ string: '{"action_id":"act_bqjuzprhffju3jgocr7op5fpia","reference":"35D8194235","_links":{"payment":{"href":"https://api.sandbox.checkout.com/payments/pay_iasssvvxqmeutms64xhycelgum"}}}'
223
+ http_version:
224
+ recorded_at: Tue, 19 Nov 2019 20:48:22 GMT
225
+ recorded_with: VCR 2.9.3