workarea-payeezy 1.0.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.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +12 -0
  3. data/Gemfile +9 -0
  4. data/README.md +64 -0
  5. data/Rakefile +116 -0
  6. data/app/models/workarea/payment/authorize/credit_card.decorator +20 -0
  7. data/app/models/workarea/payment/credit_card_data.rb +28 -0
  8. data/app/models/workarea/payment/purchase/credit_card.decorator +20 -0
  9. data/app/models/workarea/payment/store_credit_card.decorator +20 -0
  10. data/bin/rails +20 -0
  11. data/config/initializers/workarea.rb +1 -0
  12. data/lib/active_merchant/billing/bogus_payeezy_gateway.rb +70 -0
  13. data/lib/workarea/payeezy.rb +49 -0
  14. data/lib/workarea/payeezy/engine.rb +8 -0
  15. data/lib/workarea/payeezy/version.rb +5 -0
  16. data/script/admin_ci +9 -0
  17. data/script/ci +11 -0
  18. data/script/core_ci +9 -0
  19. data/script/plugins_ci +9 -0
  20. data/script/storefront_ci +9 -0
  21. data/test/dummy/Rakefile +6 -0
  22. data/test/dummy/app/assets/config/manifest.js +4 -0
  23. data/test/dummy/app/assets/javascripts/application.js +13 -0
  24. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  25. data/test/dummy/app/controllers/application_controller.rb +3 -0
  26. data/test/dummy/app/helpers/application_helper.rb +2 -0
  27. data/test/dummy/app/jobs/application_job.rb +2 -0
  28. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  29. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  30. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  31. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  32. data/test/dummy/bin/bundle +3 -0
  33. data/test/dummy/bin/rails +4 -0
  34. data/test/dummy/bin/rake +4 -0
  35. data/test/dummy/bin/setup +30 -0
  36. data/test/dummy/bin/update +26 -0
  37. data/test/dummy/bin/yarn +11 -0
  38. data/test/dummy/config.ru +5 -0
  39. data/test/dummy/config/application.rb +30 -0
  40. data/test/dummy/config/boot.rb +5 -0
  41. data/test/dummy/config/cable.yml +10 -0
  42. data/test/dummy/config/environment.rb +5 -0
  43. data/test/dummy/config/environments/development.rb +51 -0
  44. data/test/dummy/config/environments/production.rb +88 -0
  45. data/test/dummy/config/environments/test.rb +44 -0
  46. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  47. data/test/dummy/config/initializers/assets.rb +14 -0
  48. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  49. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  50. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  51. data/test/dummy/config/initializers/inflections.rb +16 -0
  52. data/test/dummy/config/initializers/mime_types.rb +4 -0
  53. data/test/dummy/config/initializers/workarea.rb +5 -0
  54. data/test/dummy/config/initializers/wrap_parameters.rb +9 -0
  55. data/test/dummy/config/locales/en.yml +33 -0
  56. data/test/dummy/config/puma.rb +56 -0
  57. data/test/dummy/config/routes.rb +5 -0
  58. data/test/dummy/config/secrets.yml +32 -0
  59. data/test/dummy/config/spring.rb +6 -0
  60. data/test/dummy/db/seeds.rb +2 -0
  61. data/test/dummy/package.json +5 -0
  62. data/test/models/workarea/payment/payeezy_integration_test.rb +185 -0
  63. data/test/support/workarea/payeezy_gateway_vcr_config.rb +34 -0
  64. data/test/support/workarea/workarea_3_2_backports.rb +57 -0
  65. data/test/teaspoon_env.rb +6 -0
  66. data/test/test_helper.rb +7 -0
  67. data/test/vcr_cassettes/payeezy/auth_capture.yml +193 -0
  68. data/test/vcr_cassettes/payeezy/auth_capture_refund.yml +251 -0
  69. data/test/vcr_cassettes/payeezy/auth_void.yml +193 -0
  70. data/test/vcr_cassettes/payeezy/purchase_refund.yml +193 -0
  71. data/test/vcr_cassettes/payeezy/purchase_void.yml +193 -0
  72. data/test/vcr_cassettes/payeezy/store_auth.yml +135 -0
  73. data/test/vcr_cassettes/payeezy/store_purchase.yml +135 -0
  74. data/workarea-payeezy.gemspec +18 -0
  75. metadata +143 -0
@@ -0,0 +1,34 @@
1
+ module Workarea
2
+ module PayeezyGatewayVCRConfig
3
+ def self.included(test)
4
+ super
5
+ test.setup :setup_gateway
6
+ test.teardown :reset_gateway
7
+ test.setup :setup_secrets
8
+ test.teardown :reset_secrets
9
+ end
10
+
11
+ def setup_gateway
12
+ @_old_gateway = Workarea.config.gateways.credit_card
13
+ Workarea.config.gateways.credit_card = ActiveMerchant::Billing::PayeezyGateway.new(
14
+ apikey: "78D9PJJDKnP52U1jwC4APpAsFdwxaphC",
15
+ apisecret: "e75ec4c92dafb35e474bc6062b2daf85edb8af80212899e3f5b3da4d03e6919e",
16
+ token: "fdoa-941fbaa7c83dd658684cfe1c31d6d61c941fbaa7c83dd658",
17
+ test: true
18
+ )
19
+ end
20
+
21
+ def reset_gateway
22
+ Workarea.config.gateways.credit_card = @_old_gateway
23
+ end
24
+
25
+ def setup_secrets
26
+ @_old_secrets = Rails.application.secrets.payeezy
27
+ Rails.application.secrets.payeezy = { ta_token: "NOIW" }
28
+ end
29
+
30
+ def reset_secrets
31
+ Rails.application.secrets.payeezy = @_old_secrets
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,57 @@
1
+ # This file contains changes coming in Workarea 3.2 which are used in the payment
2
+ # integration tests
3
+
4
+ module Workarea
5
+ if Workarea::VERSION::MAJOR == 3 && Workarea::VERSION::MINOR < 2
6
+ decorate Payment::Refund, with: :workarea_backports do
7
+ # Set amounts for tenders automatically (as opposed to custom amounts)
8
+ # This will reset the current amount!
9
+ def allocate_amounts!(total:)
10
+ self.amounts = {}
11
+ allocated_amount = 0.to_m
12
+
13
+ payment.tenders.reverse.each do |tender|
14
+ amount_for_this_tender = total - allocated_amount
15
+
16
+ if amount_for_this_tender > tender.refundable_amount
17
+ amount_for_this_tender = tender.refundable_amount
18
+ end
19
+
20
+ allocated_amount += amount_for_this_tender
21
+ amounts[tender.id] = amount_for_this_tender
22
+ end
23
+ end
24
+ end
25
+
26
+ decorate Payment::Capture, with: :workarea_backports do
27
+ # Set amounts for tenders automatically (as opposed to custom amounts)
28
+ # This will reset the current amounts!
29
+ def allocate_amounts!(total:)
30
+ self.amounts = {}
31
+ allocated_amount = 0.to_m
32
+
33
+ payment.tenders.each do |tender|
34
+ amount_for_this_tender = total - allocated_amount
35
+
36
+ if amount_for_this_tender > tender.capturable_amount
37
+ amount_for_this_tender = tender.capturable_amount
38
+ end
39
+
40
+ allocated_amount += amount_for_this_tender
41
+ amounts[tender.id] = amount_for_this_tender
42
+ end
43
+ end
44
+ end
45
+
46
+ decorate Payment::Capture, Payment::Refund, with: :workarea_processing_backports do
47
+ # Deal with inconsistent Mongoid serializing of Money within a Hash field
48
+ def parse_amount(amount)
49
+ if Money === amount || String === amount || Integer === amount || Float === amount
50
+ amount.to_m
51
+ else
52
+ Money.demongoize(amount)
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,6 @@
1
+ require "workarea/testing/teaspoon"
2
+
3
+ Teaspoon.configure do |config|
4
+ config.root = Workarea::Payeezy::Engine.root
5
+ Workarea::Teaspoon.apply(config)
6
+ end
@@ -0,0 +1,7 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+
3
+ require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
4
+ require "rails/test_help"
5
+ require "workarea/test_help"
6
+
7
+ Minitest.backtrace_filter = Minitest::BacktraceFilter.new
@@ -0,0 +1,193 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api-cert.payeezy.com/v1/transactions/tokens
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"transaction_type":"store","apikey":"78D9PJJDKnP52U1jwC4APpAsFdwxaphC","ta_token":"NOIW","type":"FDToken","credit_card":{"type":"Visa","cardholder_name":"Ben
9
+ Crouse","card_number":"4111111111111111","exp_date":"0119","cvv":999},"auth":"false"}'
10
+ headers:
11
+ Content-Type:
12
+ - application/json
13
+ Apikey:
14
+ - 78D9PJJDKnP52U1jwC4APpAsFdwxaphC
15
+ Token:
16
+ - fdoa-941fbaa7c83dd658684cfe1c31d6d61c941fbaa7c83dd658
17
+ Nonce:
18
+ - '7103360650.254082'
19
+ Timestamp:
20
+ - '1523992758121'
21
+ Authorization:
22
+ - NmIzN2NlMzg5NTczOGQ3MmIxZjA5NmZkMDEwMWRiZGFhYzIxYTlmZjcxMTg5ZDYyODZkMmUxYzM2MzZiNTQ0NA==
23
+ Accept-Encoding:
24
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
25
+ Accept:
26
+ - "*/*"
27
+ User-Agent:
28
+ - Ruby
29
+ response:
30
+ status:
31
+ code: 201
32
+ message: Created
33
+ headers:
34
+ Content-Language:
35
+ - en-US
36
+ Content-Type:
37
+ - application/json;charset=UTF-8
38
+ Correlation-Id:
39
+ - '124.2399275852646'
40
+ Date:
41
+ - Tue, 17 Apr 2018 19:19:18 GMT
42
+ Optr-Cxt:
43
+ - 010001000050523d67-c426-40e5-aeeb-c5cc5e3f506d00000000-0000-0000-0000-000000000000-1 HTTP ;
44
+ X-Archived-Client-Ip:
45
+ - 10.174.197.250
46
+ X-Backside-Transport:
47
+ - OK OK,OK OK
48
+ X-Client-Ip:
49
+ - 10.174.197.250,54.218.45.37
50
+ X-Global-Transaction-Id:
51
+ - '4145714775'
52
+ X-Powered-By:
53
+ - Servlet/3.0
54
+ Content-Length:
55
+ - '174'
56
+ Connection:
57
+ - keep-alive
58
+ body:
59
+ encoding: UTF-8
60
+ string: '{"correlation_id":"124.2399275852646","status":"success","type":"FDToken","token":{"type":"Visa","cardholder_name":"Ben
61
+ Crouse","exp_date":"0119","value":"9495846215171111"}}'
62
+ http_version:
63
+ recorded_at: Tue, 17 Apr 2018 19:19:18 GMT
64
+ - request:
65
+ method: post
66
+ uri: https://api-cert.payeezy.com/v1/transactions
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"transaction_type":"authorize","merchant_ref":null,"method":"token","token":{"token_type":"FDToken","token_data":{"type":"Visa","cardholder_name":"Ben
70
+ Crouse","value":"9495846215171111","exp_date":"0119"}},"billing_address":{"street":"22
71
+ s. 3rd st.","city":"Philadelphia","state_province":"PA","zip_postal_code":"19106","country":"US"},"currency_code":"USD","amount":"500"}'
72
+ headers:
73
+ Content-Type:
74
+ - application/json
75
+ Apikey:
76
+ - 78D9PJJDKnP52U1jwC4APpAsFdwxaphC
77
+ Token:
78
+ - fdoa-941fbaa7c83dd658684cfe1c31d6d61c941fbaa7c83dd658
79
+ Nonce:
80
+ - '4899108069.004213'
81
+ Timestamp:
82
+ - '1523992758700'
83
+ Authorization:
84
+ - MTkzODY5OWZhYjNhMTQ2NDEwYTU4YTQ5OGJlYmIwN2NhYzhmOGVhNmU2NTg0NGVkODkyMmM4ODFhNmE4MzYyNw==
85
+ Accept-Encoding:
86
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
87
+ Accept:
88
+ - "*/*"
89
+ User-Agent:
90
+ - Ruby
91
+ response:
92
+ status:
93
+ code: 201
94
+ message: Created
95
+ headers:
96
+ Access-Control-Allow-Headers:
97
+ - Content-Type, apikey, token
98
+ Access-Control-Allow-Methods:
99
+ - GET, PUT, POST, DELETE
100
+ Access-Control-Allow-Origin:
101
+ - http://localhost:8080
102
+ Access-Control-Max-Age:
103
+ - '3628800'
104
+ Access-Control-Request-Headers:
105
+ - origin, x-requested-with, accept, content-type
106
+ Content-Language:
107
+ - en-US
108
+ Content-Type:
109
+ - application/json;charset=UTF-8
110
+ Date:
111
+ - Tue, 17 Apr 2018 19:19:19 GMT
112
+ Optr-Cxt:
113
+ - 0100010000ab40fc45-9819-433c-95f1-9f6f738835bb00000000-0000-0000-0000-000000000000-1 HTTP ;
114
+ X-Archived-Client-Ip:
115
+ - 10.174.197.250
116
+ X-Backside-Transport:
117
+ - OK OK,OK OK
118
+ X-Client-Ip:
119
+ - 10.174.197.250,54.201.0.49
120
+ X-Global-Transaction-Id:
121
+ - '4145713639'
122
+ X-Powered-By:
123
+ - Servlet/3.0
124
+ Content-Length:
125
+ - '511'
126
+ Connection:
127
+ - keep-alive
128
+ body:
129
+ encoding: UTF-8
130
+ string: '{"correlation_id":"124.2399275905347","transaction_status":"approved","validation_status":"success","transaction_type":"authorize","transaction_id":"ET127894","transaction_tag":"2251924382","method":"token","amount":"500","currency":"USD","avs":"2","cvv2":"I","token":{"token_type":"FDToken","token_data":{"type":"Visa","cardholder_name":"Ben
131
+ Crouse","exp_date":"0119","value":"9495846215171111"}},"bank_resp_code":"100","bank_message":"Approved","gateway_resp_code":"00","gateway_message":"Transaction
132
+ Normal"}'
133
+ http_version:
134
+ recorded_at: Tue, 17 Apr 2018 19:19:19 GMT
135
+ - request:
136
+ method: post
137
+ uri: https://api-cert.payeezy.com/v1/transactions/ET127894
138
+ body:
139
+ encoding: UTF-8
140
+ string: '{"transaction_type":"capture","transaction_tag":"2251924382","method":"credit_card","currency_code":"USD","amount":"500"}'
141
+ headers:
142
+ Content-Type:
143
+ - application/json
144
+ Apikey:
145
+ - 78D9PJJDKnP52U1jwC4APpAsFdwxaphC
146
+ Token:
147
+ - fdoa-941fbaa7c83dd658684cfe1c31d6d61c941fbaa7c83dd658
148
+ Nonce:
149
+ - '6887960032.638315'
150
+ Timestamp:
151
+ - '1523992759683'
152
+ Authorization:
153
+ - ODVkNzBmNDExOTUxM2Y5NzkyYTgzN2U3NWYzNGU2Zjk4ODI4ODNlOTUyOTYxN2MwYTBjMWNjZTUxMjJhYjEzNw==
154
+ Accept-Encoding:
155
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
156
+ Accept:
157
+ - "*/*"
158
+ User-Agent:
159
+ - Ruby
160
+ response:
161
+ status:
162
+ code: 201
163
+ message: Created
164
+ headers:
165
+ Content-Language:
166
+ - en-US
167
+ Content-Type:
168
+ - application/json;charset=UTF-8
169
+ Date:
170
+ - Tue, 17 Apr 2018 19:19:20 GMT
171
+ Optr-Cxt:
172
+ - 0100010000ed850c94-3ca8-4232-ac13-befe73059d8600000000-0000-0000-0000-000000000000-1 HTTP ;
173
+ X-Archived-Client-Ip:
174
+ - 10.174.197.250
175
+ X-Backside-Transport:
176
+ - OK OK,OK OK
177
+ X-Client-Ip:
178
+ - 10.174.197.250,54.201.0.49
179
+ X-Global-Transaction-Id:
180
+ - '3932787679'
181
+ X-Powered-By:
182
+ - Servlet/3.0
183
+ Content-Length:
184
+ - '431'
185
+ Connection:
186
+ - keep-alive
187
+ body:
188
+ encoding: UTF-8
189
+ string: '{"correlation_id":"124.2399276008950","transaction_status":"approved","validation_status":"success","transaction_type":"capture","transaction_id":"ET149066","transaction_tag":"2251924385","method":"credit_card","amount":"500","currency":"USD","token":{"token_type":"FDToken","token_data":{"value":"9495846215171111"}},"bank_resp_code":"100","bank_message":"Approved","gateway_resp_code":"00","gateway_message":"Transaction
190
+ Normal"}'
191
+ http_version:
192
+ recorded_at: Tue, 17 Apr 2018 19:19:20 GMT
193
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,251 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api-cert.payeezy.com/v1/transactions/tokens
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"transaction_type":"store","apikey":"78D9PJJDKnP52U1jwC4APpAsFdwxaphC","ta_token":"NOIW","type":"FDToken","credit_card":{"type":"Visa","cardholder_name":"Ben
9
+ Crouse","card_number":"4111111111111111","exp_date":"0119","cvv":999},"auth":"false"}'
10
+ headers:
11
+ Content-Type:
12
+ - application/json
13
+ Apikey:
14
+ - 78D9PJJDKnP52U1jwC4APpAsFdwxaphC
15
+ Token:
16
+ - fdoa-941fbaa7c83dd658684cfe1c31d6d61c941fbaa7c83dd658
17
+ Nonce:
18
+ - '6303573004.874137'
19
+ Timestamp:
20
+ - '1523992747887'
21
+ Authorization:
22
+ - MzcwZTQyYzc4Y2Y0MjNlMWY1ZWExMGQ5OTNjZjcyYTJiYWE5N2EwYTAzOGJhYTQ0ODViMjBiZmE1OWE5NzBjOA==
23
+ Accept-Encoding:
24
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
25
+ Accept:
26
+ - "*/*"
27
+ User-Agent:
28
+ - Ruby
29
+ response:
30
+ status:
31
+ code: 201
32
+ message: Created
33
+ headers:
34
+ Content-Language:
35
+ - en-US
36
+ Content-Type:
37
+ - application/json;charset=UTF-8
38
+ Correlation-Id:
39
+ - '124.2399274830518'
40
+ Date:
41
+ - Tue, 17 Apr 2018 19:19:08 GMT
42
+ Optr-Cxt:
43
+ - 0100010000ea0b9525-0b65-4f6d-a3b6-8000b13cbdff00000000-0000-0000-0000-000000000000-1 HTTP ;
44
+ X-Archived-Client-Ip:
45
+ - 10.174.197.250
46
+ X-Backside-Transport:
47
+ - OK OK,OK OK
48
+ X-Client-Ip:
49
+ - 10.174.197.250,54.201.0.49
50
+ X-Global-Transaction-Id:
51
+ - '4074536337'
52
+ X-Powered-By:
53
+ - Servlet/3.0
54
+ Content-Length:
55
+ - '174'
56
+ Connection:
57
+ - keep-alive
58
+ body:
59
+ encoding: UTF-8
60
+ string: '{"correlation_id":"124.2399274830518","status":"success","type":"FDToken","token":{"type":"Visa","cardholder_name":"Ben
61
+ Crouse","exp_date":"0119","value":"9495846215171111"}}'
62
+ http_version:
63
+ recorded_at: Tue, 17 Apr 2018 19:19:08 GMT
64
+ - request:
65
+ method: post
66
+ uri: https://api-cert.payeezy.com/v1/transactions
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"transaction_type":"authorize","merchant_ref":null,"method":"token","token":{"token_type":"FDToken","token_data":{"type":"Visa","cardholder_name":"Ben
70
+ Crouse","value":"9495846215171111","exp_date":"0119"}},"billing_address":{"street":"22
71
+ s. 3rd st.","city":"Philadelphia","state_province":"PA","zip_postal_code":"19106","country":"US"},"currency_code":"USD","amount":"500"}'
72
+ headers:
73
+ Content-Type:
74
+ - application/json
75
+ Apikey:
76
+ - 78D9PJJDKnP52U1jwC4APpAsFdwxaphC
77
+ Token:
78
+ - fdoa-941fbaa7c83dd658684cfe1c31d6d61c941fbaa7c83dd658
79
+ Nonce:
80
+ - '1735983333.069282'
81
+ Timestamp:
82
+ - '1523992748497'
83
+ Authorization:
84
+ - MTIzOGU1Yzc4YzJmZGQ5YzgyNzEyODEzZWI4NjJiYWY1MDg0NGMzYmJiZTc3MTEyZGQ4Yzc1MTRlNTU5YmQ4YQ==
85
+ Accept-Encoding:
86
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
87
+ Accept:
88
+ - "*/*"
89
+ User-Agent:
90
+ - Ruby
91
+ response:
92
+ status:
93
+ code: 201
94
+ message: Created
95
+ headers:
96
+ Access-Control-Allow-Headers:
97
+ - Content-Type, apikey, token
98
+ Access-Control-Allow-Methods:
99
+ - GET, PUT, POST, DELETE
100
+ Access-Control-Allow-Origin:
101
+ - http://localhost:8080
102
+ Access-Control-Max-Age:
103
+ - '3628800'
104
+ Access-Control-Request-Headers:
105
+ - origin, x-requested-with, accept, content-type
106
+ Content-Language:
107
+ - en-US
108
+ Content-Type:
109
+ - application/json;charset=UTF-8
110
+ Date:
111
+ - Tue, 17 Apr 2018 19:19:09 GMT
112
+ Optr-Cxt:
113
+ - '010001000099d7fa1c-fa26-4708-a597-95852919ff5800000000-0000-0000-0000-000000000000-1 HTTP ;'
114
+ X-Archived-Client-Ip:
115
+ - 10.174.197.250
116
+ X-Backside-Transport:
117
+ - OK OK,OK OK
118
+ X-Client-Ip:
119
+ - 10.174.197.250,54.218.45.37
120
+ X-Global-Transaction-Id:
121
+ - '3970602973'
122
+ X-Powered-By:
123
+ - Servlet/3.0
124
+ Content-Length:
125
+ - '511'
126
+ Connection:
127
+ - keep-alive
128
+ body:
129
+ encoding: UTF-8
130
+ string: '{"correlation_id":"124.2399274885219","transaction_status":"approved","validation_status":"success","transaction_type":"authorize","transaction_id":"ET182206","transaction_tag":"2251924355","method":"token","amount":"500","currency":"USD","avs":"2","cvv2":"I","token":{"token_type":"FDToken","token_data":{"type":"Visa","cardholder_name":"Ben
131
+ Crouse","exp_date":"0119","value":"9495846215171111"}},"bank_resp_code":"100","bank_message":"Approved","gateway_resp_code":"00","gateway_message":"Transaction
132
+ Normal"}'
133
+ http_version:
134
+ recorded_at: Tue, 17 Apr 2018 19:19:09 GMT
135
+ - request:
136
+ method: post
137
+ uri: https://api-cert.payeezy.com/v1/transactions/ET182206
138
+ body:
139
+ encoding: UTF-8
140
+ string: '{"transaction_type":"capture","transaction_tag":"2251924355","method":"credit_card","currency_code":"USD","amount":"500"}'
141
+ headers:
142
+ Content-Type:
143
+ - application/json
144
+ Apikey:
145
+ - 78D9PJJDKnP52U1jwC4APpAsFdwxaphC
146
+ Token:
147
+ - fdoa-941fbaa7c83dd658684cfe1c31d6d61c941fbaa7c83dd658
148
+ Nonce:
149
+ - '9686807812.616264'
150
+ Timestamp:
151
+ - '1523992749554'
152
+ Authorization:
153
+ - YjM0NmI1M2M4ZWFmMGIzMDk1ZGJkM2M0YzgxNDIyYzU4YTMzODFlMWI2OWY3ODAxMGU5MzEwNjdiYjc4NmQxNA==
154
+ Accept-Encoding:
155
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
156
+ Accept:
157
+ - "*/*"
158
+ User-Agent:
159
+ - Ruby
160
+ response:
161
+ status:
162
+ code: 201
163
+ message: Created
164
+ headers:
165
+ Content-Language:
166
+ - en-US
167
+ Content-Type:
168
+ - application/json;charset=UTF-8
169
+ Date:
170
+ - Tue, 17 Apr 2018 19:19:10 GMT
171
+ Optr-Cxt:
172
+ - 01000100001163260f-9f6b-44e8-ab66-7a5c3b0a8c3900000000-0000-0000-0000-000000000000-1 HTTP ;
173
+ X-Archived-Client-Ip:
174
+ - 10.174.197.250
175
+ X-Backside-Transport:
176
+ - OK OK,OK OK
177
+ X-Client-Ip:
178
+ - 10.174.197.250,54.218.45.37
179
+ X-Global-Transaction-Id:
180
+ - '4145710503'
181
+ X-Powered-By:
182
+ - Servlet/3.0
183
+ Content-Length:
184
+ - '431'
185
+ Connection:
186
+ - keep-alive
187
+ body:
188
+ encoding: UTF-8
189
+ string: '{"correlation_id":"124.2399274990523","transaction_status":"approved","validation_status":"success","transaction_type":"capture","transaction_id":"ET113810","transaction_tag":"2251924358","method":"credit_card","amount":"500","currency":"USD","token":{"token_type":"FDToken","token_data":{"value":"9495846215171111"}},"bank_resp_code":"100","bank_message":"Approved","gateway_resp_code":"00","gateway_message":"Transaction
190
+ Normal"}'
191
+ http_version:
192
+ recorded_at: Tue, 17 Apr 2018 19:19:10 GMT
193
+ - request:
194
+ method: post
195
+ uri: https://api-cert.payeezy.com/v1/transactions/ET113810
196
+ body:
197
+ encoding: UTF-8
198
+ string: '{"transaction_type":"refund","transaction_tag":"2251924358","method":"credit_card","currency_code":"USD","amount":"500"}'
199
+ headers:
200
+ Content-Type:
201
+ - application/json
202
+ Apikey:
203
+ - 78D9PJJDKnP52U1jwC4APpAsFdwxaphC
204
+ Token:
205
+ - fdoa-941fbaa7c83dd658684cfe1c31d6d61c941fbaa7c83dd658
206
+ Nonce:
207
+ - '3934790895.422147'
208
+ Timestamp:
209
+ - '1523992750679'
210
+ Authorization:
211
+ - ZDUxODcyMDA2ZTM1NDQ5ODI4ZmMzMDJlMjE1NGQ5ZjM5MzNlYTk2ZTUyMTNmMzU0MzYyZmE5MzQzMWQ5MDk0NQ==
212
+ Accept-Encoding:
213
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
214
+ Accept:
215
+ - "*/*"
216
+ User-Agent:
217
+ - Ruby
218
+ response:
219
+ status:
220
+ code: 201
221
+ message: Created
222
+ headers:
223
+ Content-Language:
224
+ - en-US
225
+ Content-Type:
226
+ - application/json;charset=UTF-8
227
+ Date:
228
+ - Tue, 17 Apr 2018 19:19:11 GMT
229
+ Optr-Cxt:
230
+ - 010001000005274d36-c80d-4811-8685-8fc0d11c959b00000000-0000-0000-0000-000000000000-1 HTTP ;
231
+ X-Archived-Client-Ip:
232
+ - 10.174.197.250
233
+ X-Backside-Transport:
234
+ - OK OK,OK OK
235
+ X-Client-Ip:
236
+ - 10.174.197.250,54.201.0.49
237
+ X-Global-Transaction-Id:
238
+ - '4145712679'
239
+ X-Powered-By:
240
+ - Servlet/3.0
241
+ Content-Length:
242
+ - '428'
243
+ Connection:
244
+ - keep-alive
245
+ body:
246
+ encoding: UTF-8
247
+ string: '{"correlation_id":"124.2399275103426","transaction_status":"approved","validation_status":"success","transaction_type":"refund","transaction_id":"RETURN","transaction_tag":"2251924364","method":"credit_card","amount":"500","currency":"USD","token":{"token_type":"FDToken","token_data":{"value":"9495846215171111"}},"bank_resp_code":"100","bank_message":"Approved","gateway_resp_code":"00","gateway_message":"Transaction
248
+ Normal"}'
249
+ http_version:
250
+ recorded_at: Tue, 17 Apr 2018 19:19:11 GMT
251
+ recorded_with: VCR 2.9.3