workarea-forter 1.2.2

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 (120) 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 +17 -0
  7. data/CHANGELOG.md +63 -0
  8. data/CODE_OF_CONDUCT.md +3 -0
  9. data/CONTRIBUTING.md +3 -0
  10. data/Gemfile +25 -0
  11. data/LICENSE +52 -0
  12. data/LICENSE.md +3 -0
  13. data/README.md +113 -0
  14. data/Rakefile +60 -0
  15. data/app/controllers/workarea/admin/orders_controller.decorator +6 -0
  16. data/app/controllers/workarea/storefront/application_controller.decorator +10 -0
  17. data/app/models/search/admin/order.decorator +7 -0
  18. data/app/models/workarea/checkout/collect_payment.decorator +75 -0
  19. data/app/models/workarea/forter/decision.rb +18 -0
  20. data/app/models/workarea/forter/response.rb +15 -0
  21. data/app/models/workarea/fulfillment.decorator +77 -0
  22. data/app/models/workarea/order/status/suspected_fraud.rb +13 -0
  23. data/app/models/workarea/order.decorator +14 -0
  24. data/app/models/workarea/payment/saved_credit_card.decorator +14 -0
  25. data/app/models/workarea/payment/status/suspected_fraud.rb +13 -0
  26. data/app/models/workarea/payment/tender/credit_card.decorator +25 -0
  27. data/app/models/workarea/payment.decorator +13 -0
  28. data/app/services/workarea/forter/account.rb +42 -0
  29. data/app/services/workarea/forter/order.rb +145 -0
  30. data/app/services/workarea/forter/payment.rb +80 -0
  31. data/app/services/workarea/forter/tender/credit_card.rb +73 -0
  32. data/app/services/workarea/forter/tender/general.rb +29 -0
  33. data/app/services/workarea/forter/tender/gift_card.rb +23 -0
  34. data/app/services/workarea/forter/tender/paypal.rb +38 -0
  35. data/app/services/workarea/forter/tender/store_credit.rb +23 -0
  36. data/app/view_models/workarea/admin/order_view_model.decorator +7 -0
  37. data/app/views/workarea/admin/orders/_forter.html.haml +18 -0
  38. data/app/views/workarea/admin/orders/forter.html.haml +57 -0
  39. data/app/views/workarea/storefront/_forter_tracking.html.haml +4 -0
  40. data/app/workers/forter/update_status.rb +21 -0
  41. data/app/workers/workarea/save_user_order_details.decorator +34 -0
  42. data/bin/rails +20 -0
  43. data/config/initializers/appends.rb +9 -0
  44. data/config/initializers/workarea.rb +22 -0
  45. data/config/locales/en.yml +26 -0
  46. data/config/routes.rb +7 -0
  47. data/lib/workarea/forter/bogus_gateway.rb +62 -0
  48. data/lib/workarea/forter/decision_response.rb +60 -0
  49. data/lib/workarea/forter/engine.rb +8 -0
  50. data/lib/workarea/forter/gateway.rb +66 -0
  51. data/lib/workarea/forter/version.rb +5 -0
  52. data/lib/workarea/forter.rb +50 -0
  53. data/test/dummy/Rakefile +6 -0
  54. data/test/dummy/bin/bundle +3 -0
  55. data/test/dummy/bin/rails +4 -0
  56. data/test/dummy/bin/rake +4 -0
  57. data/test/dummy/bin/setup +30 -0
  58. data/test/dummy/bin/update +26 -0
  59. data/test/dummy/bin/yarn +11 -0
  60. data/test/dummy/config/application.rb +30 -0
  61. data/test/dummy/config/boot.rb +5 -0
  62. data/test/dummy/config/cable.yml +10 -0
  63. data/test/dummy/config/environment.rb +5 -0
  64. data/test/dummy/config/environments/development.rb +51 -0
  65. data/test/dummy/config/environments/production.rb +88 -0
  66. data/test/dummy/config/environments/test.rb +44 -0
  67. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  68. data/test/dummy/config/initializers/assets.rb +14 -0
  69. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  70. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  71. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  72. data/test/dummy/config/initializers/inflections.rb +16 -0
  73. data/test/dummy/config/initializers/mime_types.rb +4 -0
  74. data/test/dummy/config/initializers/workarea.rb +5 -0
  75. data/test/dummy/config/initializers/wrap_parameters.rb +9 -0
  76. data/test/dummy/config/locales/en.yml +33 -0
  77. data/test/dummy/config/puma.rb +56 -0
  78. data/test/dummy/config/routes.rb +5 -0
  79. data/test/dummy/config/secrets.yml +32 -0
  80. data/test/dummy/config/spring.rb +6 -0
  81. data/test/dummy/config.ru +5 -0
  82. data/test/dummy/db/seeds.rb +2 -0
  83. data/test/dummy/log/.keep +0 -0
  84. data/test/factories/forter.rb +132 -0
  85. data/test/integration/workarea/admin/forter_order_integration_test.rb +36 -0
  86. data/test/integration/workarea/forter_authorize_cim_response_code_integration_test.rb +69 -0
  87. data/test/integration/workarea/forter_braintree_response_code_integration_test.rb +69 -0
  88. data/test/integration/workarea/forter_checkoutdotcom_integration_test.rb +71 -0
  89. data/test/integration/workarea/forter_cybersource_response_code_integration_test.rb +69 -0
  90. data/test/integration/workarea/forter_moneris_response_code_integration_test.rb +69 -0
  91. data/test/integration/workarea/forter_payflow_pro_response_code_test.rb +69 -0
  92. data/test/integration/workarea/storefront/forter_integration_test.rb +138 -0
  93. data/test/lib/workarea/forter/gateway_test.rb +47 -0
  94. data/test/models/workarea/checkout/forter_collect_payment_test.rb +60 -0
  95. data/test/models/workarea/forter_payment_test.rb +58 -0
  96. data/test/models/workarea/payment/forter_credit_card_test.rb +19 -0
  97. data/test/models/workarea/payment/forter_saved_credit_card_test.rb +32 -0
  98. data/test/services/workarea/forter/order_test.rb +82 -0
  99. data/test/support/workarea/forter_api_config.rb +27 -0
  100. data/test/system/workarea/admin/forter_system_test.rb +31 -0
  101. data/test/system/workarea/storefront/forter_braintree_checkout_system_test.rb +79 -0
  102. data/test/system/workarea/storefront/forter_tracking_system_test.rb +20 -0
  103. data/test/system/workarea/storefront/guest_checkout_system_test.decorator +43 -0
  104. data/test/teaspoon_env.rb +6 -0
  105. data/test/test_helper.rb +11 -0
  106. data/test/vcr_cassettes/forter/get_decision.yml +66 -0
  107. data/test/vcr_cassettes/forter/integration/authorize_net_response_code.yml +410 -0
  108. data/test/vcr_cassettes/forter/integration/braintree_response_code.yml +231 -0
  109. data/test/vcr_cassettes/forter/integration/checkoutdotcom_response_code.yml +129 -0
  110. data/test/vcr_cassettes/forter/integration/cyber_response_code.yml +199 -0
  111. data/test/vcr_cassettes/forter/integration/moneris_response_code.yml +84 -0
  112. data/test/vcr_cassettes/forter/integration/payflow_pro_response_code.yml +60 -0
  113. data/test/vcr_cassettes/forter/system/braintree_approved.yml +293 -0
  114. data/test/vcr_cassettes/forter/system/braintree_declined.yml +485 -0
  115. data/test/vcr_cassettes/forter/system/braintree_not_reviewed.yml +293 -0
  116. data/test/vcr_cassettes/forter/update_status.yml +182 -0
  117. data/test/view_models/workarea/storefront/order_view_model_test.decorator +10 -0
  118. data/test/workers/forter/update_status_test.rb +22 -0
  119. data/workarea-forter.gemspec +18 -0
  120. metadata +195 -0
@@ -0,0 +1,31 @@
1
+ require 'test_helper'
2
+
3
+ module Workarea
4
+ module Adming
5
+ class ForterSystemTest < Workarea::SystemTest
6
+ include Admin::IntegrationTest
7
+
8
+ def test_viewing_forter_order_admin
9
+ checkout = create_purchasable_checkout
10
+ order = checkout.order
11
+
12
+ normal_response = Forter.gateway.create_decision(
13
+ order.id,
14
+ Forter::Order.new(order).to_h
15
+ )
16
+ Workarea::Forter::BogusGateway
17
+ .any_instance
18
+ .stubs(:create_decision)
19
+ .raises(Faraday::Error::TimeoutError)
20
+ .then
21
+ .returns(normal_response)
22
+
23
+ assert(checkout.place_order)
24
+
25
+ visit admin.forter_order_path order
26
+
27
+ assert page.has_content?("timeout")
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,79 @@
1
+ require 'test_helper'
2
+
3
+ module Workarea
4
+ module Storefront
5
+ if Workarea::Plugin.installed?(:braintree)
6
+ class ForterCheckoutSystemTest < Workarea::SystemTest
7
+ include Storefront::SystemTest
8
+ include ForterApiConfig
9
+ include BraintreeGatewayVCRConfig
10
+
11
+ def test_braintree_approved
12
+ VCR.use_cassette('forter/system/braintree_approved', match_requests_on: [:host, :method]) do
13
+ setup_checkout_specs
14
+ start_guest_checkout
15
+
16
+ fill_in 'email', with: 'approve@forter.com'
17
+ fill_in_shipping_address
18
+ click_button t('workarea.storefront.checkouts.continue_to_shipping')
19
+ assert_current_path(storefront.checkout_shipping_path)
20
+
21
+ click_button t('workarea.storefront.checkouts.continue_to_payment')
22
+ assert_current_path(storefront.checkout_payment_path)
23
+
24
+ fill_in_braintree_test_visa
25
+ click_button t('workarea.storefront.checkouts.place_order')
26
+ assert_current_path(storefront.checkout_confirmation_path)
27
+ end
28
+ end
29
+
30
+ def test_braintree_not_reviewed
31
+ VCR.use_cassette('forter/system/braintree_not_reviewed', match_requests_on: [:host, :method]) do
32
+ setup_checkout_specs
33
+ start_guest_checkout
34
+
35
+ fill_in 'email', with: 'notreviewed@forter.com'
36
+ fill_in_shipping_address
37
+ click_button t('workarea.storefront.checkouts.continue_to_shipping')
38
+ assert_current_path(storefront.checkout_shipping_path)
39
+
40
+ click_button t('workarea.storefront.checkouts.continue_to_payment')
41
+ assert_current_path(storefront.checkout_payment_path)
42
+
43
+ fill_in_braintree_test_visa
44
+ click_button t('workarea.storefront.checkouts.place_order')
45
+ assert_current_path(storefront.checkout_confirmation_path)
46
+ end
47
+ end
48
+
49
+ def test_braintree_declined
50
+ VCR.use_cassette('forter/system/braintree_declined', match_requests_on: [:host, :method]) do
51
+ setup_checkout_specs
52
+ start_guest_checkout
53
+
54
+ fill_in 'email', with: 'decline@forter.com'
55
+ fill_in_shipping_address
56
+ click_button t('workarea.storefront.checkouts.continue_to_shipping')
57
+ assert_current_path(storefront.checkout_shipping_path)
58
+
59
+ click_button t('workarea.storefront.checkouts.continue_to_payment')
60
+ assert_current_path(storefront.checkout_payment_path)
61
+
62
+ fill_in_braintree_test_visa
63
+ click_button t('workarea.storefront.checkouts.place_order')
64
+ assert_current_path(storefront.checkout_place_order_path)
65
+ end
66
+ end
67
+
68
+ private
69
+
70
+ def fill_in_braintree_test_visa
71
+ fill_in 'credit_card[number]', with: '4111111111111111'
72
+ next_year = (Time.current.year + 1).to_s
73
+ select next_year, from: 'credit_card[year]'
74
+ fill_in 'credit_card[cvv]', with: '999'
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,20 @@
1
+ require 'test_helper'
2
+
3
+ module Workarea
4
+ module Storefront
5
+ class ForterTrackingSystemTest < Workarea::SystemTest
6
+
7
+ def test_forter_tracking_js
8
+ Workarea.with_config do |config|
9
+ config.forter.site_id = "abcdefg"
10
+
11
+ visit storefront.root_path
12
+
13
+ forter_script = find_by_id('abcdefg', visible: false)
14
+
15
+ assert(forter_script.present?)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,43 @@
1
+ module Workarea
2
+ decorate Storefront::GuestCheckoutSystemTest, with: :forter do
3
+ def test_failed_fraud_check
4
+ assert_current_path(storefront.checkout_addresses_path)
5
+ fill_in 'email', with: 'decline@workarea.com'
6
+ fill_in_shipping_address
7
+ uncheck 'same_as_shipping'
8
+ fill_in_billing_address
9
+ click_button t('workarea.storefront.checkouts.continue_to_shipping')
10
+
11
+ assert_current_path(storefront.checkout_shipping_path)
12
+ click_button t('workarea.storefront.checkouts.continue_to_payment')
13
+
14
+ assert_current_path(storefront.checkout_payment_path)
15
+ fill_in_credit_card
16
+ fill_in 'credit_card[number]', with: '1'
17
+ click_button t('workarea.storefront.checkouts.place_order')
18
+
19
+ assert_current_path(storefront.checkout_place_order_path)
20
+ assert(page.has_content?('Error'))
21
+ end
22
+
23
+ def test_not_reviewed_fraud_check
24
+ assert_current_path(storefront.checkout_addresses_path)
25
+ fill_in 'email', with: 'notreviewed@workarea.com'
26
+ fill_in_shipping_address
27
+ uncheck 'same_as_shipping'
28
+ fill_in_billing_address
29
+ click_button t('workarea.storefront.checkouts.continue_to_shipping')
30
+
31
+ assert_current_path(storefront.checkout_shipping_path)
32
+ click_button t('workarea.storefront.checkouts.continue_to_payment')
33
+
34
+ assert_current_path(storefront.checkout_payment_path)
35
+ fill_in_credit_card
36
+ fill_in 'credit_card[number]', with: '1'
37
+ click_button t('workarea.storefront.checkouts.place_order')
38
+
39
+ assert(page.has_content?('Success'))
40
+ assert(page.has_content?(t('workarea.storefront.flash_messages.order_placed')))
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,6 @@
1
+ require 'workarea/testing/teaspoon'
2
+
3
+ Teaspoon.configure do |config|
4
+ config.root = Workarea::Forter::Engine.root
5
+ Workarea::Teaspoon.apply(config)
6
+ end
@@ -0,0 +1,11 @@
1
+ require 'simplecov'
2
+ SimpleCov.start 'rails' do
3
+ add_filter "version.rb"
4
+ end
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,66 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.forter-secure.com/v2/orders/fortertest1234
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"orderId":"fortertest1234","orderType":"WEB","timeSentToForter":1547750772000,"checkoutTime":1547750769,"primaryRecipient":{"personalDetails":{"firstName":"Ben","lastName":"Crouse"},"address":{"address1":"22
9
+ S. 3rd St.","city":"Philadelphia","country":"US","address2":"Second Floor","zip":"19106","region":"PA"},"phone":[{"phone":""}]},"totalAmount":{"amountUSD":"11.00"},"connectionInformation":{"customerIP":"127.0.0.1","userAgent":"Mozilla/5.0
10
+ (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 Mozilla/5.0
11
+ (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0.","forterTokenCookie":"123ABC"},"primaryDeliveryDetails":{"deliveryType":"PHYSICAL","deliveryMethod":"Test
12
+ 0","deliveryPrice":{"amountUSD":"1.00"},"carrier":null},"cartItems":[{"basicItemData":{"name":"Test
13
+ Product","quantity":2,"type":"TANGIBLE","price":{"amountUSD":"10.00"},"productId":"570407A9E8"}}],"payment":[{"tokenizedCard":{"token":"1","lastFourDigits":"1111","expirationMonth":"01","expirationYear":"2020","cardBrand":"Visa","nameOnCard":"Ben
14
+ Crouse"},"billingDetails":{"personalDetails":{"firstName":"Ben","lastName":"Crouse"},"address":{"address1":"22
15
+ S. 3rd St.","address2":"Second Floor","city":"Philadelphia","country":"US","zip":"19106","region":"PA"},"phone":[{"phone":""}]}}],"accountOwner":{"firstName":"Ben","lastName":"Crouse","email":"approve@forter.com"},"totalDiscount":null}'
16
+ headers:
17
+ Content-Type:
18
+ - application/json
19
+ X-Forter-Siteid:
20
+ - 4d12ac5d794c
21
+ Api-Version:
22
+ - '2.3'
23
+ User-Agent:
24
+ - Faraday v0.15.4
25
+ Authorization:
26
+ - Basic a
27
+ Accept-Encoding:
28
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
29
+ Accept:
30
+ - "*/*"
31
+ response:
32
+ status:
33
+ code: 200
34
+ message: OK
35
+ headers:
36
+ Date:
37
+ - Thu, 17 Jan 2019 18:46:13 GMT
38
+ Content-Type:
39
+ - application/json; charset=utf-8
40
+ Content-Length:
41
+ - '172'
42
+ Connection:
43
+ - keep-alive
44
+ Server:
45
+ - openresty
46
+ Strict-Transport-Security:
47
+ - max-age=86400; includeSubDomains
48
+ Surrogate-Control:
49
+ - no-store
50
+ Cache-Control:
51
+ - no-store, no-cache, must-revalidate, proxy-revalidate
52
+ Pragma:
53
+ - no-cache
54
+ Expires:
55
+ - '0'
56
+ Etag:
57
+ - W/"ac-GGRkLVdiK2WOgMdRJxFj/EJ+PqI"
58
+ Vary:
59
+ - Accept-Encoding
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"status":"success","transaction":"fortertest1234","action":"approve","message":"
63
+ | Link in portal: https://portal.forter.com/dashboard/fortertest1234","reasonCode":"Test"}'
64
+ http_version:
65
+ recorded_at: Thu, 17 Jan 2019 18:46:13 GMT
66
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,410 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://apitest.authorize.net/xml/v1/request.api
6
+ body:
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0" encoding="utf-8"?>
10
+ <createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
11
+ <merchantAuthentication>
12
+ <name>a</name>
13
+ <transactionKey>b</transactionKey>
14
+ </merchantAuthentication>
15
+ <profile>
16
+ <email>user@workarea.com</email>
17
+ </profile>
18
+ </createCustomerProfileRequest>
19
+ headers:
20
+ Content-Type:
21
+ - text/xml
22
+ Connection:
23
+ - close
24
+ Accept-Encoding:
25
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
26
+ Accept:
27
+ - "*/*"
28
+ User-Agent:
29
+ - Ruby
30
+ response:
31
+ status:
32
+ code: 200
33
+ message: OK
34
+ headers:
35
+ Cache-Control:
36
+ - no-store
37
+ Pragma:
38
+ - no-cache
39
+ Content-Type:
40
+ - application/xml; charset=utf-8
41
+ X-Opnet-Transaction-Trace:
42
+ - a2_a172c952-0831-4b38-8dd7-14ea60d7731c-20404-24738466
43
+ Access-Control-Allow-Credentials:
44
+ - 'true'
45
+ Access-Control-Allow-Headers:
46
+ - x-requested-with,cache-control,content-type,origin,method,SOAPAction
47
+ Access-Control-Allow-Methods:
48
+ - PUT,OPTIONS,POST,GET
49
+ Access-Control-Allow-Origin:
50
+ - "*"
51
+ Strict-Transport-Security:
52
+ - max-age=31536000
53
+ X-Cnection:
54
+ - close
55
+ Content-Length:
56
+ - '503'
57
+ Date:
58
+ - Wed, 23 Jan 2019 21:47:49 GMT
59
+ Connection:
60
+ - close
61
+ body:
62
+ encoding: ASCII-8BIT
63
+ string: !binary |-
64
+ 77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48Y3JlYXRlQ3VzdG9tZXJQcm9maWxlUmVzcG9uc2UgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM6eHNkPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM9IkFuZXRBcGkveG1sL3YxL3NjaGVtYS9BbmV0QXBpU2NoZW1hLnhzZCI+PG1lc3NhZ2VzPjxyZXN1bHRDb2RlPkVycm9yPC9yZXN1bHRDb2RlPjxtZXNzYWdlPjxjb2RlPkUwMDAzOTwvY29kZT48dGV4dD5BIGR1cGxpY2F0ZSByZWNvcmQgd2l0aCBJRCAxODEzODc3NzkzIGFscmVhZHkgZXhpc3RzLjwvdGV4dD48L21lc3NhZ2U+PC9tZXNzYWdlcz48Y3VzdG9tZXJQYXltZW50UHJvZmlsZUlkTGlzdCAvPjxjdXN0b21lclNoaXBwaW5nQWRkcmVzc0lkTGlzdCAvPjx2YWxpZGF0aW9uRGlyZWN0UmVzcG9uc2VMaXN0IC8+PC9jcmVhdGVDdXN0b21lclByb2ZpbGVSZXNwb25zZT4=
65
+ http_version:
66
+ recorded_at: Wed, 23 Jan 2019 21:47:49 GMT
67
+ - request:
68
+ method: post
69
+ uri: https://apitest.authorize.net/xml/v1/request.api
70
+ body:
71
+ encoding: UTF-8
72
+ string: |
73
+ <?xml version="1.0" encoding="utf-8"?>
74
+ <getCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
75
+ <merchantAuthentication>
76
+ <name>a</name>
77
+ <transactionKey>b</transactionKey>
78
+ </merchantAuthentication>
79
+ <customerProfileId>1813877793</customerProfileId>
80
+ </getCustomerProfileRequest>
81
+ headers:
82
+ Content-Type:
83
+ - text/xml
84
+ Connection:
85
+ - close
86
+ Accept-Encoding:
87
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
88
+ Accept:
89
+ - "*/*"
90
+ User-Agent:
91
+ - Ruby
92
+ response:
93
+ status:
94
+ code: 200
95
+ message: OK
96
+ headers:
97
+ Cache-Control:
98
+ - no-store
99
+ Pragma:
100
+ - no-cache
101
+ Content-Type:
102
+ - application/xml; charset=utf-8
103
+ X-Opnet-Transaction-Trace:
104
+ - a2_23d718fd-f5f2-4530-862c-f27db0135530-14504-24746966
105
+ Access-Control-Allow-Credentials:
106
+ - 'true'
107
+ Access-Control-Allow-Headers:
108
+ - x-requested-with,cache-control,content-type,origin,method,SOAPAction
109
+ Access-Control-Allow-Methods:
110
+ - PUT,OPTIONS,POST,GET
111
+ Access-Control-Allow-Origin:
112
+ - "*"
113
+ Strict-Transport-Security:
114
+ - max-age=31536000
115
+ X-Cnection:
116
+ - close
117
+ Content-Length:
118
+ - '895'
119
+ Date:
120
+ - Wed, 23 Jan 2019 21:47:49 GMT
121
+ Connection:
122
+ - close
123
+ body:
124
+ encoding: ASCII-8BIT
125
+ string: !binary |-
126
+ 77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48Z2V0Q3VzdG9tZXJQcm9maWxlUmVzcG9uc2UgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM6eHNkPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM9IkFuZXRBcGkveG1sL3YxL3NjaGVtYS9BbmV0QXBpU2NoZW1hLnhzZCI+PG1lc3NhZ2VzPjxyZXN1bHRDb2RlPk9rPC9yZXN1bHRDb2RlPjxtZXNzYWdlPjxjb2RlPkkwMDAwMTwvY29kZT48dGV4dD5TdWNjZXNzZnVsLjwvdGV4dD48L21lc3NhZ2U+PC9tZXNzYWdlcz48cHJvZmlsZT48ZW1haWw+dXNlckB3b3JrYXJlYS5jb208L2VtYWlsPjxjdXN0b21lclByb2ZpbGVJZD4xODEzODc3NzkzPC9jdXN0b21lclByb2ZpbGVJZD48cGF5bWVudFByb2ZpbGVzPjxiaWxsVG8+PGZpcnN0TmFtZT5CZW48L2ZpcnN0TmFtZT48bGFzdE5hbWU+Q3JvdXNlPC9sYXN0TmFtZT48YWRkcmVzcz4yMiBzLiAzcmQgc3QuPC9hZGRyZXNzPjxjaXR5PlBoaWxhZGVscGhpYTwvY2l0eT48c3RhdGU+UEE8L3N0YXRlPjx6aXA+MTkxMDY8L3ppcD48Y291bnRyeT5Vbml0ZWQgU3RhdGVzIG9mIEFtZXJpY2E8L2NvdW50cnk+PC9iaWxsVG8+PGN1c3RvbWVyUGF5bWVudFByb2ZpbGVJZD4xODA4NTg4NjczPC9jdXN0b21lclBheW1lbnRQcm9maWxlSWQ+PHBheW1lbnQ+PGNyZWRpdENhcmQ+PGNhcmROdW1iZXI+WFhYWDExMTE8L2NhcmROdW1iZXI+PGV4cGlyYXRpb25EYXRlPlhYWFg8L2V4cGlyYXRpb25EYXRlPjxjYXJkVHlwZT5WaXNhPC9jYXJkVHlwZT48L2NyZWRpdENhcmQ+PC9wYXltZW50PjwvcGF5bWVudFByb2ZpbGVzPjwvcHJvZmlsZT48L2dldEN1c3RvbWVyUHJvZmlsZVJlc3BvbnNlPg==
127
+ http_version:
128
+ recorded_at: Wed, 23 Jan 2019 21:47:49 GMT
129
+ - request:
130
+ method: post
131
+ uri: https://apitest.authorize.net/xml/v1/request.api
132
+ body:
133
+ encoding: UTF-8
134
+ string: |
135
+ <?xml version="1.0" encoding="utf-8"?>
136
+ <getCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
137
+ <merchantAuthentication>
138
+ <name>a</name>
139
+ <transactionKey>b</transactionKey>
140
+ </merchantAuthentication>
141
+ <customerProfileId>1813877793</customerProfileId>
142
+ </getCustomerProfileRequest>
143
+ headers:
144
+ Content-Type:
145
+ - text/xml
146
+ Connection:
147
+ - close
148
+ Accept-Encoding:
149
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
150
+ Accept:
151
+ - "*/*"
152
+ User-Agent:
153
+ - Ruby
154
+ response:
155
+ status:
156
+ code: 200
157
+ message: OK
158
+ headers:
159
+ Cache-Control:
160
+ - no-store
161
+ Pragma:
162
+ - no-cache
163
+ Content-Type:
164
+ - application/xml; charset=utf-8
165
+ X-Opnet-Transaction-Trace:
166
+ - a2_a172c952-0831-4b38-8dd7-14ea60d7731c-20404-24738486
167
+ Access-Control-Allow-Credentials:
168
+ - 'true'
169
+ Access-Control-Allow-Headers:
170
+ - x-requested-with,cache-control,content-type,origin,method,SOAPAction
171
+ Access-Control-Allow-Methods:
172
+ - PUT,OPTIONS,POST,GET
173
+ Access-Control-Allow-Origin:
174
+ - "*"
175
+ Strict-Transport-Security:
176
+ - max-age=31536000
177
+ X-Cnection:
178
+ - close
179
+ Content-Length:
180
+ - '895'
181
+ Date:
182
+ - Wed, 23 Jan 2019 21:47:50 GMT
183
+ Connection:
184
+ - close
185
+ body:
186
+ encoding: ASCII-8BIT
187
+ string: !binary |-
188
+ 77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48Z2V0Q3VzdG9tZXJQcm9maWxlUmVzcG9uc2UgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM6eHNkPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM9IkFuZXRBcGkveG1sL3YxL3NjaGVtYS9BbmV0QXBpU2NoZW1hLnhzZCI+PG1lc3NhZ2VzPjxyZXN1bHRDb2RlPk9rPC9yZXN1bHRDb2RlPjxtZXNzYWdlPjxjb2RlPkkwMDAwMTwvY29kZT48dGV4dD5TdWNjZXNzZnVsLjwvdGV4dD48L21lc3NhZ2U+PC9tZXNzYWdlcz48cHJvZmlsZT48ZW1haWw+dXNlckB3b3JrYXJlYS5jb208L2VtYWlsPjxjdXN0b21lclByb2ZpbGVJZD4xODEzODc3NzkzPC9jdXN0b21lclByb2ZpbGVJZD48cGF5bWVudFByb2ZpbGVzPjxiaWxsVG8+PGZpcnN0TmFtZT5CZW48L2ZpcnN0TmFtZT48bGFzdE5hbWU+Q3JvdXNlPC9sYXN0TmFtZT48YWRkcmVzcz4yMiBzLiAzcmQgc3QuPC9hZGRyZXNzPjxjaXR5PlBoaWxhZGVscGhpYTwvY2l0eT48c3RhdGU+UEE8L3N0YXRlPjx6aXA+MTkxMDY8L3ppcD48Y291bnRyeT5Vbml0ZWQgU3RhdGVzIG9mIEFtZXJpY2E8L2NvdW50cnk+PC9iaWxsVG8+PGN1c3RvbWVyUGF5bWVudFByb2ZpbGVJZD4xODA4NTg4NjczPC9jdXN0b21lclBheW1lbnRQcm9maWxlSWQ+PHBheW1lbnQ+PGNyZWRpdENhcmQ+PGNhcmROdW1iZXI+WFhYWDExMTE8L2NhcmROdW1iZXI+PGV4cGlyYXRpb25EYXRlPlhYWFg8L2V4cGlyYXRpb25EYXRlPjxjYXJkVHlwZT5WaXNhPC9jYXJkVHlwZT48L2NyZWRpdENhcmQ+PC9wYXltZW50PjwvcGF5bWVudFByb2ZpbGVzPjwvcHJvZmlsZT48L2dldEN1c3RvbWVyUHJvZmlsZVJlc3BvbnNlPg==
189
+ http_version:
190
+ recorded_at: Wed, 23 Jan 2019 21:47:50 GMT
191
+ - request:
192
+ method: post
193
+ uri: https://apitest.authorize.net/xml/v1/request.api
194
+ body:
195
+ encoding: UTF-8
196
+ string: |
197
+ <?xml version="1.0" encoding="utf-8"?>
198
+ <getCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
199
+ <merchantAuthentication>
200
+ <name>a</name>
201
+ <transactionKey>b</transactionKey>
202
+ </merchantAuthentication>
203
+ <customerProfileId>1813877793</customerProfileId>
204
+ <customerPaymentProfileId>1808588673</customerPaymentProfileId>
205
+ </getCustomerPaymentProfileRequest>
206
+ headers:
207
+ Content-Type:
208
+ - text/xml
209
+ Connection:
210
+ - close
211
+ Accept-Encoding:
212
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
213
+ Accept:
214
+ - "*/*"
215
+ User-Agent:
216
+ - Ruby
217
+ response:
218
+ status:
219
+ code: 200
220
+ message: OK
221
+ headers:
222
+ Cache-Control:
223
+ - no-store
224
+ Pragma:
225
+ - no-cache
226
+ Content-Type:
227
+ - application/xml; charset=utf-8
228
+ X-Opnet-Transaction-Trace:
229
+ - a2_a172c952-0831-4b38-8dd7-14ea60d7731c-20404-24738496
230
+ Access-Control-Allow-Credentials:
231
+ - 'true'
232
+ Access-Control-Allow-Headers:
233
+ - x-requested-with,cache-control,content-type,origin,method,SOAPAction
234
+ Access-Control-Allow-Methods:
235
+ - PUT,OPTIONS,POST,GET
236
+ Access-Control-Allow-Origin:
237
+ - "*"
238
+ Strict-Transport-Security:
239
+ - max-age=31536000
240
+ X-Cnection:
241
+ - close
242
+ Content-Length:
243
+ - '856'
244
+ Date:
245
+ - Wed, 23 Jan 2019 21:47:50 GMT
246
+ Connection:
247
+ - close
248
+ body:
249
+ encoding: ASCII-8BIT
250
+ string: !binary |-
251
+ 77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48Z2V0Q3VzdG9tZXJQYXltZW50UHJvZmlsZVJlc3BvbnNlIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zPSJBbmV0QXBpL3htbC92MS9zY2hlbWEvQW5ldEFwaVNjaGVtYS54c2QiPjxtZXNzYWdlcz48cmVzdWx0Q29kZT5PazwvcmVzdWx0Q29kZT48bWVzc2FnZT48Y29kZT5JMDAwMDE8L2NvZGU+PHRleHQ+U3VjY2Vzc2Z1bC48L3RleHQ+PC9tZXNzYWdlPjwvbWVzc2FnZXM+PHBheW1lbnRQcm9maWxlPjxiaWxsVG8+PGZpcnN0TmFtZT5CZW48L2ZpcnN0TmFtZT48bGFzdE5hbWU+Q3JvdXNlPC9sYXN0TmFtZT48YWRkcmVzcz4yMiBzLiAzcmQgc3QuPC9hZGRyZXNzPjxjaXR5PlBoaWxhZGVscGhpYTwvY2l0eT48c3RhdGU+UEE8L3N0YXRlPjx6aXA+MTkxMDY8L3ppcD48Y291bnRyeT5Vbml0ZWQgU3RhdGVzIG9mIEFtZXJpY2E8L2NvdW50cnk+PC9iaWxsVG8+PGN1c3RvbWVyUHJvZmlsZUlkPjE4MTM4Nzc3OTM8L2N1c3RvbWVyUHJvZmlsZUlkPjxjdXN0b21lclBheW1lbnRQcm9maWxlSWQ+MTgwODU4ODY3MzwvY3VzdG9tZXJQYXltZW50UHJvZmlsZUlkPjxwYXltZW50PjxjcmVkaXRDYXJkPjxjYXJkTnVtYmVyPlhYWFgxMTExPC9jYXJkTnVtYmVyPjxleHBpcmF0aW9uRGF0ZT5YWFhYPC9leHBpcmF0aW9uRGF0ZT48Y2FyZFR5cGU+VmlzYTwvY2FyZFR5cGU+PC9jcmVkaXRDYXJkPjwvcGF5bWVudD48L3BheW1lbnRQcm9maWxlPjwvZ2V0Q3VzdG9tZXJQYXltZW50UHJvZmlsZVJlc3BvbnNlPg==
252
+ http_version:
253
+ recorded_at: Wed, 23 Jan 2019 21:47:50 GMT
254
+ - request:
255
+ method: post
256
+ uri: https://apitest.authorize.net/xml/v1/request.api
257
+ body:
258
+ encoding: UTF-8
259
+ string: |
260
+ <?xml version="1.0" encoding="utf-8"?>
261
+ <updateCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
262
+ <merchantAuthentication>
263
+ <name>a</name>
264
+ <transactionKey>b</transactionKey>
265
+ </merchantAuthentication>
266
+ <customerProfileId>1813877793</customerProfileId>
267
+ <paymentProfile>
268
+ <billTo>
269
+ <firstName>Ben</firstName>
270
+ <lastName>Crouse</lastName>
271
+ <company/>
272
+ <address>22 s. 3rd st.</address>
273
+ <city>Philadelphia</city>
274
+ <state>PA</state>
275
+ <zip>19106</zip>
276
+ <country>United States of America</country>
277
+ </billTo>
278
+ <payment>
279
+ <creditCard>
280
+ <cardNumber>XXXX1111</cardNumber>
281
+ <expirationDate>2020-01</expirationDate>
282
+ <cardCode>999</cardCode>
283
+ </creditCard>
284
+ </payment>
285
+ <customerPaymentProfileId>1808588673</customerPaymentProfileId>
286
+ </paymentProfile>
287
+ </updateCustomerPaymentProfileRequest>
288
+ headers:
289
+ Content-Type:
290
+ - text/xml
291
+ Connection:
292
+ - close
293
+ Accept-Encoding:
294
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
295
+ Accept:
296
+ - "*/*"
297
+ User-Agent:
298
+ - Ruby
299
+ response:
300
+ status:
301
+ code: 200
302
+ message: OK
303
+ headers:
304
+ Cache-Control:
305
+ - no-store
306
+ Pragma:
307
+ - no-cache
308
+ Content-Type:
309
+ - application/xml; charset=utf-8
310
+ X-Opnet-Transaction-Trace:
311
+ - a2_a172c952-0831-4b38-8dd7-14ea60d7731c-20404-24738507
312
+ Access-Control-Allow-Credentials:
313
+ - 'true'
314
+ Access-Control-Allow-Headers:
315
+ - x-requested-with,cache-control,content-type,origin,method,SOAPAction
316
+ Access-Control-Allow-Methods:
317
+ - PUT,OPTIONS,POST,GET
318
+ Access-Control-Allow-Origin:
319
+ - "*"
320
+ Strict-Transport-Security:
321
+ - max-age=31536000
322
+ X-Cnection:
323
+ - close
324
+ Content-Length:
325
+ - '375'
326
+ Date:
327
+ - Wed, 23 Jan 2019 21:47:51 GMT
328
+ Connection:
329
+ - close
330
+ body:
331
+ encoding: ASCII-8BIT
332
+ string: !binary |-
333
+ 77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48dXBkYXRlQ3VzdG9tZXJQYXltZW50UHJvZmlsZVJlc3BvbnNlIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zPSJBbmV0QXBpL3htbC92MS9zY2hlbWEvQW5ldEFwaVNjaGVtYS54c2QiPjxtZXNzYWdlcz48cmVzdWx0Q29kZT5PazwvcmVzdWx0Q29kZT48bWVzc2FnZT48Y29kZT5JMDAwMDE8L2NvZGU+PHRleHQ+U3VjY2Vzc2Z1bC48L3RleHQ+PC9tZXNzYWdlPjwvbWVzc2FnZXM+PC91cGRhdGVDdXN0b21lclBheW1lbnRQcm9maWxlUmVzcG9uc2U+
334
+ http_version:
335
+ recorded_at: Wed, 23 Jan 2019 21:47:51 GMT
336
+ - request:
337
+ method: post
338
+ uri: https://apitest.authorize.net/xml/v1/request.api
339
+ body:
340
+ encoding: UTF-8
341
+ string: |
342
+ <?xml version="1.0" encoding="utf-8"?>
343
+ <createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
344
+ <merchantAuthentication>
345
+ <name>a</name>
346
+ <transactionKey>b</transactionKey>
347
+ </merchantAuthentication>
348
+ <transaction>
349
+ <profileTransAuthOnly>
350
+ <amount>5.0</amount>
351
+ <customerProfileId>1813877793</customerProfileId>
352
+ <customerPaymentProfileId>1808588673</customerPaymentProfileId>
353
+ <order>
354
+ <invoiceNumber>5c48e105987b47c0bac1</invoiceNumber>
355
+ </order>
356
+ </profileTransAuthOnly>
357
+ </transaction>
358
+ <extraOptions>
359
+ <![CDATA[x_duplicate_window=0]]>
360
+ </extraOptions>
361
+ </createCustomerProfileTransactionRequest>
362
+ headers:
363
+ Content-Type:
364
+ - text/xml
365
+ Connection:
366
+ - close
367
+ Accept-Encoding:
368
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
369
+ Accept:
370
+ - "*/*"
371
+ User-Agent:
372
+ - Ruby
373
+ response:
374
+ status:
375
+ code: 200
376
+ message: OK
377
+ headers:
378
+ Cache-Control:
379
+ - no-store
380
+ Pragma:
381
+ - no-cache
382
+ Content-Type:
383
+ - application/xml; charset=utf-8
384
+ X-Opnet-Transaction-Trace:
385
+ - a2_23d718fd-f5f2-4530-862c-f27db0135530-14504-24747002
386
+ Access-Control-Allow-Credentials:
387
+ - 'true'
388
+ Access-Control-Allow-Headers:
389
+ - x-requested-with,cache-control,content-type,origin,method,SOAPAction
390
+ Access-Control-Allow-Methods:
391
+ - PUT,OPTIONS,POST,GET
392
+ Access-Control-Allow-Origin:
393
+ - "*"
394
+ Strict-Transport-Security:
395
+ - max-age=31536000
396
+ X-Cnection:
397
+ - close
398
+ Content-Length:
399
+ - '703'
400
+ Date:
401
+ - Wed, 23 Jan 2019 21:47:52 GMT
402
+ Connection:
403
+ - close
404
+ body:
405
+ encoding: ASCII-8BIT
406
+ string: !binary |-
407
+ 77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48Y3JlYXRlQ3VzdG9tZXJQcm9maWxlVHJhbnNhY3Rpb25SZXNwb25zZSB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxucz0iQW5ldEFwaS94bWwvdjEvc2NoZW1hL0FuZXRBcGlTY2hlbWEueHNkIj48bWVzc2FnZXM+PHJlc3VsdENvZGU+T2s8L3Jlc3VsdENvZGU+PG1lc3NhZ2U+PGNvZGU+STAwMDAxPC9jb2RlPjx0ZXh0PlN1Y2Nlc3NmdWwuPC90ZXh0PjwvbWVzc2FnZT48L21lc3NhZ2VzPjxkaXJlY3RSZXNwb25zZT4xLDEsMSxUaGlzIHRyYW5zYWN0aW9uIGhhcyBiZWVuIGFwcHJvdmVkLiw4NU03OVEsWSw2MDExNTU2NTg0NCw1YzQ4ZTEwNTk4N2I0N2MwYmFjMSwsNS4wMCxDQyxhdXRoX29ubHksLEJlbixDcm91c2UsLDIyIHMuIDNyZCBzdC4sUGhpbGFkZWxwaGlhLFBBLDE5MTA2LFVuaXRlZCBTdGF0ZXMgb2YgQW1lcmljYSwsLHVzZXJAd29ya2FyZWEuY29tLCwsLCwsLCwsLCwsLCw3M0M0NjIwOTRCNzE5RUU1QTg1N0E4RkY3NTlBREVGNCxQLDIsLCwsLCwsLCwsLFhYWFgxMTExLFZpc2EsLCwsLCwsLCwsLCwsLCwsLDwvZGlyZWN0UmVzcG9uc2U+PC9jcmVhdGVDdXN0b21lclByb2ZpbGVUcmFuc2FjdGlvblJlc3BvbnNlPg==
408
+ http_version:
409
+ recorded_at: Wed, 23 Jan 2019 21:47:52 GMT
410
+ recorded_with: VCR 2.9.3