workarea-cyber_source 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +20 -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/.gitignore +14 -0
  7. data/.rails-rubocop.yml +140 -0
  8. data/.rubocop.yml +8 -0
  9. data/CHANGELOG.md +39 -0
  10. data/CODE_OF_CONDUCT.md +3 -0
  11. data/CONTRIBUTING.md +3 -0
  12. data/Gemfile +11 -0
  13. data/LICENSE +52 -0
  14. data/README.md +27 -0
  15. data/Rakefile +59 -0
  16. data/app/models/workarea/payment/authorize/credit_card.decorator +45 -0
  17. data/app/models/workarea/payment/capture/credit_card.decorator +14 -0
  18. data/app/models/workarea/payment/purchase/credit_card.decorator +48 -0
  19. data/app/models/workarea/payment/refund/credit_card.decorator +14 -0
  20. data/app/models/workarea/payment/store_credit_card.decorator +13 -0
  21. data/bin/rails +20 -0
  22. data/config/initializers/gateway.rb +1 -0
  23. data/lib/active_merchant/billing/bogus_cyber_source_gateway.rb +97 -0
  24. data/lib/active_merchant/billing/cyber_source_fix.rb +34 -0
  25. data/lib/workarea/cyber_source.rb +36 -0
  26. data/lib/workarea/cyber_source/engine.rb +8 -0
  27. data/lib/workarea/cyber_source/version.rb +5 -0
  28. data/test/dummy/Rakefile +6 -0
  29. data/test/dummy/bin/bundle +3 -0
  30. data/test/dummy/bin/rails +4 -0
  31. data/test/dummy/bin/rake +4 -0
  32. data/test/dummy/bin/setup +38 -0
  33. data/test/dummy/bin/update +29 -0
  34. data/test/dummy/bin/yarn +11 -0
  35. data/test/dummy/config.ru +5 -0
  36. data/test/dummy/config/application.rb +28 -0
  37. data/test/dummy/config/boot.rb +5 -0
  38. data/test/dummy/config/cable.yml +10 -0
  39. data/test/dummy/config/environment.rb +5 -0
  40. data/test/dummy/config/environments/development.rb +56 -0
  41. data/test/dummy/config/environments/production.rb +91 -0
  42. data/test/dummy/config/environments/test.rb +44 -0
  43. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  44. data/test/dummy/config/initializers/assets.rb +14 -0
  45. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  46. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  47. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  48. data/test/dummy/config/initializers/inflections.rb +16 -0
  49. data/test/dummy/config/initializers/mime_types.rb +4 -0
  50. data/test/dummy/config/initializers/workarea.rb +5 -0
  51. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  52. data/test/dummy/config/locales/en.yml +33 -0
  53. data/test/dummy/config/puma.rb +56 -0
  54. data/test/dummy/config/routes.rb +5 -0
  55. data/test/dummy/config/secrets.yml +32 -0
  56. data/test/dummy/config/spring.rb +6 -0
  57. data/test/dummy/db/seeds.rb +2 -0
  58. data/test/dummy/log/.keep +0 -0
  59. data/test/dummy/package.json +5 -0
  60. data/test/integration/workarea/cyber_source_integration_test.rb +191 -0
  61. data/test/models/workarea/payment/authorize/credit_card_test.decorator +68 -0
  62. data/test/models/workarea/payment/capture/credit_card_test.decorator +17 -0
  63. data/test/models/workarea/payment/purchase/credit_card_test.decorator +60 -0
  64. data/test/models/workarea/payment/refund/credit_card_test.decorator +17 -0
  65. data/test/models/workarea/payment/store_credit_card_test.decorator +15 -0
  66. data/test/support/workarea/cyber_source_support_vcr_config.rb +23 -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 +11 -0
  70. data/test/vcr_cassettes/cyber_source/auth_capture.yml +254 -0
  71. data/test/vcr_cassettes/cyber_source/auth_capture_refund.yml +323 -0
  72. data/test/vcr_cassettes/cyber_source/auth_void.yml +250 -0
  73. data/test/vcr_cassettes/cyber_source/purchase_refund.yml +251 -0
  74. data/test/vcr_cassettes/cyber_source/purchase_void.yml +247 -0
  75. data/test/vcr_cassettes/cyber_source/store_auth.yml +179 -0
  76. data/test/vcr_cassettes/cyber_source/store_purchase.yml +180 -0
  77. data/workarea-cyber_source.gemspec +19 -0
  78. metadata +133 -0
@@ -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::CyberSource::Engine.root
5
+ Workarea::Teaspoon.apply(config)
6
+ end
@@ -0,0 +1,11 @@
1
+ require "simplecov"
2
+
3
+ SimpleCov.start "rails"
4
+
5
+ ENV["RAILS_ENV"] = "test"
6
+
7
+ require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
8
+ require "rails/test_help"
9
+ require "workarea/test_help"
10
+
11
+ Minitest.backtrace_filter = Minitest::BacktraceFilter.new
@@ -0,0 +1,254 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://ics2wstesta.ic3.com/commerce/1.x/transactionProcessor
6
+ body:
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0" encoding="UTF-8"?>
10
+ <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
11
+ <s:Header>
12
+ <wsse:Security s:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
13
+ <wsse:UsernameToken>
14
+ <wsse:Username>a</wsse:Username>
15
+ <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">b</wsse:Password>
16
+ </wsse:UsernameToken>
17
+ </wsse:Security>
18
+ </s:Header>
19
+ <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
20
+ <requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121">
21
+ <merchantID>a</merchantID>
22
+ <merchantReferenceCode>5a84630a87c68bf3273e9e11</merchantReferenceCode>
23
+ <clientLibrary>Ruby Active Merchant</clientLibrary>
24
+ <clientLibraryVersion>1.77.0</clientLibraryVersion>
25
+ <clientEnvironment>x86_64-darwin17</clientEnvironment>
26
+ <billTo>
27
+ <firstName>Ben</firstName>
28
+ <lastName>Crouse</lastName>
29
+ <street1>22 s. 3rd st.</street1>
30
+ <city>Philadelphia</city>
31
+ <state>PA</state>
32
+ <postalCode>19106</postalCode>
33
+ <country>US</country>
34
+ <email>bcrouse@weblinc.com</email>
35
+ </billTo>
36
+ <purchaseTotals>
37
+ <currency>USD</currency>
38
+ <grandTotalAmount>0.00</grandTotalAmount>
39
+ </purchaseTotals>
40
+ <card>
41
+ <accountNumber>4111111111111111</accountNumber>
42
+ <expirationMonth>01</expirationMonth>
43
+ <expirationYear>2019</expirationYear>
44
+ <cardType>001</cardType>
45
+ </card>
46
+ <subscription>
47
+ <paymentMethod>credit card</paymentMethod>
48
+ </subscription>
49
+ <recurringSubscriptionInfo>
50
+ <amount>0.00</amount>
51
+ <frequency>on-demand</frequency>
52
+ <approvalRequired>false</approvalRequired>
53
+ </recurringSubscriptionInfo>
54
+ <paySubscriptionCreateService run="true"/>
55
+ <businessRules>
56
+ <ignoreAVSResult>true</ignoreAVSResult>
57
+ <ignoreCVResult>true</ignoreCVResult>
58
+ </businessRules>
59
+ </requestMessage>
60
+ </s:Body>
61
+ </s:Envelope>
62
+ headers:
63
+ Content-Type:
64
+ - application/x-www-form-urlencoded
65
+ Accept-Encoding:
66
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
67
+ Accept:
68
+ - "*/*"
69
+ User-Agent:
70
+ - Ruby
71
+ response:
72
+ status:
73
+ code: 200
74
+ message: OK
75
+ headers:
76
+ Server:
77
+ - Apache-Coyote/1.1
78
+ X-Opnet-Transaction-Trace:
79
+ - a2_1080cb52-88fa-465f-9ec6-20b668bc0ff0
80
+ - a2_727cc7d8-33c2-4e04-8538-1dff2d99edca
81
+ Content-Type:
82
+ - text/xml
83
+ Content-Length:
84
+ - '1573'
85
+ Date:
86
+ - Wed, 14 Feb 2018 16:25:47 GMT
87
+ Connection:
88
+ - keep-alive
89
+ body:
90
+ encoding: UTF-8
91
+ string: |-
92
+ <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
93
+ <soap:Header>
94
+ <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-818237560"><wsu:Created>2018-02-14T16:25:47.299Z</wsu:Created></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><c:replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.121"><c:merchantReferenceCode>5a84630a87c68bf3273e9e11</c:merchantReferenceCode><c:requestID>5186255471166710004009</c:requestID><c:decision>ACCEPT</c:decision><c:reasonCode>100</c:reasonCode><c:requestToken>Ahj/7wSTGSXAwREl4rkpESDdsxZsWzRpKiTGUei0jpcmCp/F4ClyYKn8X6QAfbYZNJMvRiuae3gTkxklwMERJeK5KQAABje0</c:requestToken><c:purchaseTotals><c:currency>USD</c:currency></c:purchaseTotals><c:ccAuthReply><c:reasonCode>100</c:reasonCode><c:amount>0.00</c:amount><c:authorizationCode>888888</c:authorizationCode><c:avsCode>X</c:avsCode><c:avsCodeRaw>I1</c:avsCodeRaw><c:authorizedDateTime>2018-02-14T16:25:47Z</c:authorizedDateTime><c:processorResponse>100</c:processorResponse><c:reconciliationID>76131644JDL2GQ4G</c:reconciliationID><c:paymentNetworkTransactionID>123456789000000</c:paymentNetworkTransactionID></c:ccAuthReply><c:paySubscriptionCreateReply><c:reasonCode>100</c:reasonCode><c:subscriptionID>5186255471166710004009</c:subscriptionID></c:paySubscriptionCreateReply></c:replyMessage></soap:Body></soap:Envelope>
95
+ http_version:
96
+ recorded_at: Wed, 14 Feb 2018 16:25:47 GMT
97
+ - request:
98
+ method: post
99
+ uri: https://ics2wstesta.ic3.com/commerce/1.x/transactionProcessor
100
+ body:
101
+ encoding: UTF-8
102
+ string: |
103
+ <?xml version="1.0" encoding="UTF-8"?>
104
+ <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
105
+ <s:Header>
106
+ <wsse:Security s:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
107
+ <wsse:UsernameToken>
108
+ <wsse:Username>a</wsse:Username>
109
+ <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">b</wsse:Password>
110
+ </wsse:UsernameToken>
111
+ </wsse:Security>
112
+ </s:Header>
113
+ <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
114
+ <requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121">
115
+ <merchantID>a</merchantID>
116
+ <merchantReferenceCode>5a84630a87c68bf3273e9e11</merchantReferenceCode>
117
+ <clientLibrary>Ruby Active Merchant</clientLibrary>
118
+ <clientLibraryVersion>1.77.0</clientLibraryVersion>
119
+ <clientEnvironment>x86_64-darwin17</clientEnvironment>
120
+ <billTo>
121
+ <street1>22 s. 3rd st.</street1>
122
+ <city>Philadelphia</city>
123
+ <state>PA</state>
124
+ <postalCode>19106</postalCode>
125
+ <country>US</country>
126
+ <email>bcrouse@weblinc.com</email>
127
+ </billTo>
128
+ <purchaseTotals>
129
+ <currency>USD</currency>
130
+ <grandTotalAmount>5.00</grandTotalAmount>
131
+ </purchaseTotals>
132
+ <recurringSubscriptionInfo>
133
+ <subscriptionID>5186255471166710004009</subscriptionID>
134
+ <amount>0.00</amount>
135
+ <frequency>on-demand</frequency>
136
+ <approvalRequired>false</approvalRequired>
137
+ </recurringSubscriptionInfo>
138
+ <ccAuthService run="true"/>
139
+ <businessRules>
140
+ <ignoreAVSResult>true</ignoreAVSResult>
141
+ <ignoreCVResult>true</ignoreCVResult>
142
+ </businessRules>
143
+ </requestMessage>
144
+ </s:Body>
145
+ </s:Envelope>
146
+ headers:
147
+ Content-Type:
148
+ - application/x-www-form-urlencoded
149
+ Accept-Encoding:
150
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
151
+ Accept:
152
+ - "*/*"
153
+ User-Agent:
154
+ - Ruby
155
+ response:
156
+ status:
157
+ code: 200
158
+ message: OK
159
+ headers:
160
+ Server:
161
+ - Apache-Coyote/1.1
162
+ X-Opnet-Transaction-Trace:
163
+ - a2_0f48dbff-7a87-4847-9776-2541bb6c3e32
164
+ - a2_2d8db86b-65d4-4075-9a65-202466e97419
165
+ Content-Type:
166
+ - text/xml
167
+ Content-Length:
168
+ - '1397'
169
+ Date:
170
+ - Wed, 14 Feb 2018 16:25:47 GMT
171
+ Connection:
172
+ - keep-alive
173
+ body:
174
+ encoding: UTF-8
175
+ string: |-
176
+ <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
177
+ <soap:Header>
178
+ <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-672765134"><wsu:Created>2018-02-14T16:25:47.645Z</wsu:Created></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><c:replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.121"><c:merchantReferenceCode>5a84630a87c68bf3273e9e11</c:merchantReferenceCode><c:requestID>5186255474586595504012</c:requestID><c:decision>ACCEPT</c:decision><c:reasonCode>100</c:reasonCode><c:requestToken>Ahj/7wSTGSXAxC1m8i+MESDdsxZsWzRrKiTGUei0kJcmCp/GAClyYKn8YaQJ+j7bDJpJl6MVzT28CcmMkuBiFrN5F8YAGThC</c:requestToken><c:purchaseTotals><c:currency>USD</c:currency></c:purchaseTotals><c:ccAuthReply><c:reasonCode>100</c:reasonCode><c:amount>5.00</c:amount><c:authorizationCode>888888</c:authorizationCode><c:avsCode>X</c:avsCode><c:avsCodeRaw>I1</c:avsCodeRaw><c:authorizedDateTime>2018-02-14T16:25:47Z</c:authorizedDateTime><c:processorResponse>100</c:processorResponse><c:reconciliationID>76131645JDL2GQ4H</c:reconciliationID><c:ownerMerchantID>a</c:ownerMerchantID></c:ccAuthReply></c:replyMessage></soap:Body></soap:Envelope>
179
+ http_version:
180
+ recorded_at: Wed, 14 Feb 2018 16:25:47 GMT
181
+ - request:
182
+ method: post
183
+ uri: https://ics2wstesta.ic3.com/commerce/1.x/transactionProcessor
184
+ body:
185
+ encoding: UTF-8
186
+ string: |
187
+ <?xml version="1.0" encoding="UTF-8"?>
188
+ <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
189
+ <s:Header>
190
+ <wsse:Security s:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
191
+ <wsse:UsernameToken>
192
+ <wsse:Username>a</wsse:Username>
193
+ <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">b</wsse:Password>
194
+ </wsse:UsernameToken>
195
+ </wsse:Security>
196
+ </s:Header>
197
+ <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
198
+ <requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121">
199
+ <merchantID>a</merchantID>
200
+ <merchantReferenceCode>5a84630a87c68bf3273e9e11</merchantReferenceCode>
201
+ <clientLibrary>Ruby Active Merchant</clientLibrary>
202
+ <clientLibraryVersion>1.77.0</clientLibraryVersion>
203
+ <clientEnvironment>x86_64-darwin17</clientEnvironment>
204
+ <purchaseTotals>
205
+ <currency>USD</currency>
206
+ <grandTotalAmount>5.00</grandTotalAmount>
207
+ </purchaseTotals>
208
+ <ccCaptureService run="true">
209
+ <authRequestID>5186255474586595504012</authRequestID>
210
+ <authRequestToken>Ahj/7wSTGSXAxC1m8i+MESDdsxZsWzRrKiTGUei0kJcmCp/GAClyYKn8YaQJ+j7bDJpJl6MVzT28CcmMkuBiFrN5F8YAGThC</authRequestToken>
211
+ </ccCaptureService>
212
+ <businessRules>
213
+ <ignoreAVSResult>true</ignoreAVSResult>
214
+ <ignoreCVResult>true</ignoreCVResult>
215
+ </businessRules>
216
+ </requestMessage>
217
+ </s:Body>
218
+ </s:Envelope>
219
+ headers:
220
+ Content-Type:
221
+ - application/x-www-form-urlencoded
222
+ Accept-Encoding:
223
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
224
+ Accept:
225
+ - "*/*"
226
+ User-Agent:
227
+ - Ruby
228
+ response:
229
+ status:
230
+ code: 200
231
+ message: OK
232
+ headers:
233
+ Server:
234
+ - Apache-Coyote/1.1
235
+ X-Opnet-Transaction-Trace:
236
+ - a2_b0e7d1f1-0416-46e0-bc96-44037b08537b
237
+ - a2_f104e8dc-45e8-43ec-bddc-2aae070b57b3
238
+ Content-Type:
239
+ - text/xml
240
+ Content-Length:
241
+ - '1194'
242
+ Date:
243
+ - Wed, 14 Feb 2018 16:25:48 GMT
244
+ Connection:
245
+ - keep-alive
246
+ body:
247
+ encoding: UTF-8
248
+ string: |-
249
+ <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
250
+ <soap:Header>
251
+ <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1193676174"><wsu:Created>2018-02-14T16:25:48.186Z</wsu:Created></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><c:replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.121"><c:merchantReferenceCode>5a84630a87c68bf3273e9e11</c:merchantReferenceCode><c:requestID>5186255480296710204009</c:requestID><c:decision>ACCEPT</c:decision><c:reasonCode>100</c:reasonCode><c:requestToken>Ahj//wSTGSXAyV7kTeppESDdsxZsWzRrKiTGUei0kJcmCp/GAClvHi6kf6QJ+j7bDJpJl6MVzT24YE5MZJcDELWbyL4wvRqd</c:requestToken><c:purchaseTotals><c:currency>USD</c:currency></c:purchaseTotals><c:ccCaptureReply><c:reasonCode>100</c:reasonCode><c:requestDateTime>2018-02-14T16:25:48Z</c:requestDateTime><c:amount>5.00</c:amount><c:reconciliationID>76131645JDL2GQ4H</c:reconciliationID></c:ccCaptureReply></c:replyMessage></soap:Body></soap:Envelope>
252
+ http_version:
253
+ recorded_at: Wed, 14 Feb 2018 16:25:48 GMT
254
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,323 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://ics2wstesta.ic3.com/commerce/1.x/transactionProcessor
6
+ body:
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0" encoding="UTF-8"?>
10
+ <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
11
+ <s:Header>
12
+ <wsse:Security s:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
13
+ <wsse:UsernameToken>
14
+ <wsse:Username>a</wsse:Username>
15
+ <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">b</wsse:Password>
16
+ </wsse:UsernameToken>
17
+ </wsse:Security>
18
+ </s:Header>
19
+ <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
20
+ <requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121">
21
+ <merchantID>a</merchantID>
22
+ <merchantReferenceCode>5a84631087c68bf3273e9e29</merchantReferenceCode>
23
+ <clientLibrary>Ruby Active Merchant</clientLibrary>
24
+ <clientLibraryVersion>1.77.0</clientLibraryVersion>
25
+ <clientEnvironment>x86_64-darwin17</clientEnvironment>
26
+ <billTo>
27
+ <firstName>Ben</firstName>
28
+ <lastName>Crouse</lastName>
29
+ <street1>22 s. 3rd st.</street1>
30
+ <city>Philadelphia</city>
31
+ <state>PA</state>
32
+ <postalCode>19106</postalCode>
33
+ <country>US</country>
34
+ <email>bcrouse@weblinc.com</email>
35
+ </billTo>
36
+ <purchaseTotals>
37
+ <currency>USD</currency>
38
+ <grandTotalAmount>0.00</grandTotalAmount>
39
+ </purchaseTotals>
40
+ <card>
41
+ <accountNumber>4111111111111111</accountNumber>
42
+ <expirationMonth>01</expirationMonth>
43
+ <expirationYear>2019</expirationYear>
44
+ <cardType>001</cardType>
45
+ </card>
46
+ <subscription>
47
+ <paymentMethod>credit card</paymentMethod>
48
+ </subscription>
49
+ <recurringSubscriptionInfo>
50
+ <amount>0.00</amount>
51
+ <frequency>on-demand</frequency>
52
+ <approvalRequired>false</approvalRequired>
53
+ </recurringSubscriptionInfo>
54
+ <paySubscriptionCreateService run="true"/>
55
+ <businessRules>
56
+ <ignoreAVSResult>true</ignoreAVSResult>
57
+ <ignoreCVResult>true</ignoreCVResult>
58
+ </businessRules>
59
+ </requestMessage>
60
+ </s:Body>
61
+ </s:Envelope>
62
+ headers:
63
+ Content-Type:
64
+ - application/x-www-form-urlencoded
65
+ Accept-Encoding:
66
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
67
+ Accept:
68
+ - "*/*"
69
+ User-Agent:
70
+ - Ruby
71
+ response:
72
+ status:
73
+ code: 200
74
+ message: OK
75
+ headers:
76
+ Server:
77
+ - Apache-Coyote/1.1
78
+ X-Opnet-Transaction-Trace:
79
+ - a2_4e38f247-22e9-49ed-86f7-654af35ee3d3
80
+ - a2_c928c991-a81b-46da-9519-ae054a6c8551
81
+ Content-Type:
82
+ - text/xml
83
+ Content-Length:
84
+ - '1573'
85
+ Date:
86
+ - Wed, 14 Feb 2018 16:25:52 GMT
87
+ Connection:
88
+ - keep-alive
89
+ body:
90
+ encoding: UTF-8
91
+ string: |-
92
+ <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
93
+ <soap:Header>
94
+ <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-639985327"><wsu:Created>2018-02-14T16:25:52.890Z</wsu:Created></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><c:replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.121"><c:merchantReferenceCode>5a84631087c68bf3273e9e29</c:merchantReferenceCode><c:requestID>5186255528056716404011</c:requestID><c:decision>ACCEPT</c:decision><c:reasonCode>100</c:reasonCode><c:requestToken>Ahj/7wSTGSXA9M7igiUrESDdsxZsHDlpJiTGUedZkpcel0aRAClx6XRpEaQAfbYZNJMvRiuae3gTkxklwPTO4oIlKwAA9DBE</c:requestToken><c:purchaseTotals><c:currency>USD</c:currency></c:purchaseTotals><c:ccAuthReply><c:reasonCode>100</c:reasonCode><c:amount>0.00</c:amount><c:authorizationCode>888888</c:authorizationCode><c:avsCode>X</c:avsCode><c:avsCodeRaw>I1</c:avsCodeRaw><c:authorizedDateTime>2018-02-14T16:25:52Z</c:authorizedDateTime><c:processorResponse>100</c:processorResponse><c:reconciliationID>76130894IDL2GNYI</c:reconciliationID><c:paymentNetworkTransactionID>123456789000000</c:paymentNetworkTransactionID></c:ccAuthReply><c:paySubscriptionCreateReply><c:reasonCode>100</c:reasonCode><c:subscriptionID>5186255528056716404011</c:subscriptionID></c:paySubscriptionCreateReply></c:replyMessage></soap:Body></soap:Envelope>
95
+ http_version:
96
+ recorded_at: Wed, 14 Feb 2018 16:25:52 GMT
97
+ - request:
98
+ method: post
99
+ uri: https://ics2wstesta.ic3.com/commerce/1.x/transactionProcessor
100
+ body:
101
+ encoding: UTF-8
102
+ string: |
103
+ <?xml version="1.0" encoding="UTF-8"?>
104
+ <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
105
+ <s:Header>
106
+ <wsse:Security s:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
107
+ <wsse:UsernameToken>
108
+ <wsse:Username>a</wsse:Username>
109
+ <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">b</wsse:Password>
110
+ </wsse:UsernameToken>
111
+ </wsse:Security>
112
+ </s:Header>
113
+ <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
114
+ <requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121">
115
+ <merchantID>a</merchantID>
116
+ <merchantReferenceCode>5a84631087c68bf3273e9e29</merchantReferenceCode>
117
+ <clientLibrary>Ruby Active Merchant</clientLibrary>
118
+ <clientLibraryVersion>1.77.0</clientLibraryVersion>
119
+ <clientEnvironment>x86_64-darwin17</clientEnvironment>
120
+ <billTo>
121
+ <street1>22 s. 3rd st.</street1>
122
+ <city>Philadelphia</city>
123
+ <state>PA</state>
124
+ <postalCode>19106</postalCode>
125
+ <country>US</country>
126
+ <email>bcrouse@weblinc.com</email>
127
+ </billTo>
128
+ <purchaseTotals>
129
+ <currency>USD</currency>
130
+ <grandTotalAmount>5.00</grandTotalAmount>
131
+ </purchaseTotals>
132
+ <recurringSubscriptionInfo>
133
+ <subscriptionID>5186255528056716404011</subscriptionID>
134
+ <amount>0.00</amount>
135
+ <frequency>on-demand</frequency>
136
+ <approvalRequired>false</approvalRequired>
137
+ </recurringSubscriptionInfo>
138
+ <ccAuthService run="true"/>
139
+ <businessRules>
140
+ <ignoreAVSResult>true</ignoreAVSResult>
141
+ <ignoreCVResult>true</ignoreCVResult>
142
+ </businessRules>
143
+ </requestMessage>
144
+ </s:Body>
145
+ </s:Envelope>
146
+ headers:
147
+ Content-Type:
148
+ - application/x-www-form-urlencoded
149
+ Accept-Encoding:
150
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
151
+ Accept:
152
+ - "*/*"
153
+ User-Agent:
154
+ - Ruby
155
+ response:
156
+ status:
157
+ code: 200
158
+ message: OK
159
+ headers:
160
+ Server:
161
+ - Apache-Coyote/1.1
162
+ X-Opnet-Transaction-Trace:
163
+ - a2_0d5f6e2b-96db-4ff6-928e-3b878b35c0e8
164
+ - a2_8d9e6689-96d8-4173-8267-5eefaee3fc70
165
+ Content-Type:
166
+ - text/xml
167
+ Content-Length:
168
+ - '1397'
169
+ Date:
170
+ - Wed, 14 Feb 2018 16:25:53 GMT
171
+ Connection:
172
+ - keep-alive
173
+ body:
174
+ encoding: UTF-8
175
+ string: |-
176
+ <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
177
+ <soap:Header>
178
+ <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-221312563"><wsu:Created>2018-02-14T16:25:53.210Z</wsu:Created></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><c:replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.121"><c:merchantReferenceCode>5a84631087c68bf3273e9e29</c:merchantReferenceCode><c:requestID>5186255530566773404008</c:requestID><c:decision>ACCEPT</c:decision><c:reasonCode>100</c:reasonCode><c:requestToken>Ahj/7wSTGSXA9xdNkHFoESDdsxZsWDhzGiS6tenKYpcAyZ2WQClwDJnZZaQJ+j7bDJpJl6MVzT28CcmMkuB7i6bIOLQALgZE</c:requestToken><c:purchaseTotals><c:currency>USD</c:currency></c:purchaseTotals><c:ccAuthReply><c:reasonCode>100</c:reasonCode><c:amount>5.00</c:amount><c:authorizationCode>888888</c:authorizationCode><c:avsCode>X</c:avsCode><c:avsCodeRaw>I1</c:avsCodeRaw><c:authorizedDateTime>2018-02-14T16:25:53Z</c:authorizedDateTime><c:processorResponse>100</c:processorResponse><c:reconciliationID>76131089FDKUWSJ1</c:reconciliationID><c:ownerMerchantID>a</c:ownerMerchantID></c:ccAuthReply></c:replyMessage></soap:Body></soap:Envelope>
179
+ http_version:
180
+ recorded_at: Wed, 14 Feb 2018 16:25:53 GMT
181
+ - request:
182
+ method: post
183
+ uri: https://ics2wstesta.ic3.com/commerce/1.x/transactionProcessor
184
+ body:
185
+ encoding: UTF-8
186
+ string: |
187
+ <?xml version="1.0" encoding="UTF-8"?>
188
+ <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
189
+ <s:Header>
190
+ <wsse:Security s:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
191
+ <wsse:UsernameToken>
192
+ <wsse:Username>a</wsse:Username>
193
+ <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">b</wsse:Password>
194
+ </wsse:UsernameToken>
195
+ </wsse:Security>
196
+ </s:Header>
197
+ <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
198
+ <requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121">
199
+ <merchantID>a</merchantID>
200
+ <merchantReferenceCode>5a84631087c68bf3273e9e29</merchantReferenceCode>
201
+ <clientLibrary>Ruby Active Merchant</clientLibrary>
202
+ <clientLibraryVersion>1.77.0</clientLibraryVersion>
203
+ <clientEnvironment>x86_64-darwin17</clientEnvironment>
204
+ <purchaseTotals>
205
+ <currency>USD</currency>
206
+ <grandTotalAmount>5.00</grandTotalAmount>
207
+ </purchaseTotals>
208
+ <ccCaptureService run="true">
209
+ <authRequestID>5186255530566773404008</authRequestID>
210
+ <authRequestToken>Ahj/7wSTGSXA9xdNkHFoESDdsxZsWDhzGiS6tenKYpcAyZ2WQClwDJnZZaQJ+j7bDJpJl6MVzT28CcmMkuB7i6bIOLQALgZE</authRequestToken>
211
+ </ccCaptureService>
212
+ <businessRules>
213
+ <ignoreAVSResult>true</ignoreAVSResult>
214
+ <ignoreCVResult>true</ignoreCVResult>
215
+ </businessRules>
216
+ </requestMessage>
217
+ </s:Body>
218
+ </s:Envelope>
219
+ headers:
220
+ Content-Type:
221
+ - application/x-www-form-urlencoded
222
+ Accept-Encoding:
223
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
224
+ Accept:
225
+ - "*/*"
226
+ User-Agent:
227
+ - Ruby
228
+ response:
229
+ status:
230
+ code: 200
231
+ message: OK
232
+ headers:
233
+ Server:
234
+ - Apache-Coyote/1.1
235
+ X-Opnet-Transaction-Trace:
236
+ - a2_4ebbf5c9-4d7c-436a-8a18-903bd33f0c67
237
+ - a2_dd39f344-b528-47b8-a972-2fa4ffd9f987
238
+ Content-Type:
239
+ - text/xml
240
+ Content-Length:
241
+ - '1194'
242
+ Date:
243
+ - Wed, 14 Feb 2018 16:25:53 GMT
244
+ Connection:
245
+ - keep-alive
246
+ body:
247
+ encoding: UTF-8
248
+ string: |-
249
+ <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
250
+ <soap:Header>
251
+ <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1958022878"><wsu:Created>2018-02-14T16:25:53.636Z</wsu:Created></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><c:replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.121"><c:merchantReferenceCode>5a84631087c68bf3273e9e29</c:merchantReferenceCode><c:requestID>5186255535126711004009</c:requestID><c:decision>ACCEPT</c:decision><c:reasonCode>100</c:reasonCode><c:requestToken>Ahj//wSTGSXA+zz/BmtpESDdsxZsWDhzGiS6tenKYpcAyZ2WQClvHi6kn6QJ+j7bDJpJl6MVzT24YE5MZJcD3F02QcWgaGra</c:requestToken><c:purchaseTotals><c:currency>USD</c:currency></c:purchaseTotals><c:ccCaptureReply><c:reasonCode>100</c:reasonCode><c:requestDateTime>2018-02-14T16:25:53Z</c:requestDateTime><c:amount>5.00</c:amount><c:reconciliationID>76131089FDKUWSJ1</c:reconciliationID></c:ccCaptureReply></c:replyMessage></soap:Body></soap:Envelope>
252
+ http_version:
253
+ recorded_at: Wed, 14 Feb 2018 16:25:53 GMT
254
+ - request:
255
+ method: post
256
+ uri: https://ics2wstesta.ic3.com/commerce/1.x/transactionProcessor
257
+ body:
258
+ encoding: UTF-8
259
+ string: |
260
+ <?xml version="1.0" encoding="UTF-8"?>
261
+ <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
262
+ <s:Header>
263
+ <wsse:Security s:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
264
+ <wsse:UsernameToken>
265
+ <wsse:Username>a</wsse:Username>
266
+ <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">b</wsse:Password>
267
+ </wsse:UsernameToken>
268
+ </wsse:Security>
269
+ </s:Header>
270
+ <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
271
+ <requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121">
272
+ <merchantID>a</merchantID>
273
+ <merchantReferenceCode>5a84631087c68bf3273e9e29</merchantReferenceCode>
274
+ <clientLibrary>Ruby Active Merchant</clientLibrary>
275
+ <clientLibraryVersion>1.77.0</clientLibraryVersion>
276
+ <clientEnvironment>x86_64-darwin17</clientEnvironment>
277
+ <purchaseTotals>
278
+ <currency>USD</currency>
279
+ <grandTotalAmount>5.00</grandTotalAmount>
280
+ </purchaseTotals>
281
+ <ccCreditService run="true">
282
+ <captureRequestID>5186255535126711004009</captureRequestID>
283
+ <captureRequestToken>Ahj//wSTGSXA+zz/BmtpESDdsxZsWDhzGiS6tenKYpcAyZ2WQClvHi6kn6QJ+j7bDJpJl6MVzT24YE5MZJcD3F02QcWgaGra</captureRequestToken>
284
+ </ccCreditService>
285
+ </requestMessage>
286
+ </s:Body>
287
+ </s:Envelope>
288
+ headers:
289
+ Content-Type:
290
+ - application/x-www-form-urlencoded
291
+ Accept-Encoding:
292
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
293
+ Accept:
294
+ - "*/*"
295
+ User-Agent:
296
+ - Ruby
297
+ response:
298
+ status:
299
+ code: 200
300
+ message: OK
301
+ headers:
302
+ Server:
303
+ - Apache-Coyote/1.1
304
+ X-Opnet-Transaction-Trace:
305
+ - a2_2ae85723-d015-4936-8d88-a4a9b96a04f1
306
+ - a2_93bc5502-e4c9-4f98-887c-69453d9ce496
307
+ Content-Type:
308
+ - text/xml
309
+ Content-Length:
310
+ - '1192'
311
+ Date:
312
+ - Wed, 14 Feb 2018 16:25:54 GMT
313
+ Connection:
314
+ - keep-alive
315
+ body:
316
+ encoding: UTF-8
317
+ string: |-
318
+ <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
319
+ <soap:Header>
320
+ <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1711348594"><wsu:Created>2018-02-14T16:25:54.204Z</wsu:Created></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><c:replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.121"><c:merchantReferenceCode>5a84631087c68bf3273e9e29</c:merchantReferenceCode><c:requestID>5186255540446774004008</c:requestID><c:decision>ACCEPT</c:decision><c:reasonCode>100</c:reasonCode><c:requestToken>Ahj/7wSTGSXBABOrfYkoESDdsxZsWDlhGiS6tenKZJcAyZ2WQClwDJnZaaQJ+j7bDJpJl6MVzT28CcmMkuB7i6bIOLQALgZE</c:requestToken><c:purchaseTotals><c:currency>USD</c:currency></c:purchaseTotals><c:ccCreditReply><c:reasonCode>100</c:reasonCode><c:requestDateTime>2018-02-14T16:25:54Z</c:requestDateTime><c:amount>5.00</c:amount><c:reconciliationID>76131090FDKUWSJ2</c:reconciliationID></c:ccCreditReply></c:replyMessage></soap:Body></soap:Envelope>
321
+ http_version:
322
+ recorded_at: Wed, 14 Feb 2018 16:25:54 GMT
323
+ recorded_with: VCR 2.9.3