workarea-payware_connect 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) 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/.github/workflows/ci.yml +54 -0
  7. data/.gitignore +13 -0
  8. data/.rubocop.yml +2 -0
  9. data/CHANGELOG.md +63 -0
  10. data/CODE_OF_CONDUCT.md +3 -0
  11. data/CONTRIBUTING.md +3 -0
  12. data/Gemfile +9 -0
  13. data/LICENSE.md +3 -0
  14. data/README.md +53 -0
  15. data/Rakefile +54 -0
  16. data/app/models/workarea/payment/authorize/credit_card.decorator +37 -0
  17. data/app/models/workarea/payment/capture/credit_card.decorator +14 -0
  18. data/app/models/workarea/payment/payware_credit_card.decorator +24 -0
  19. data/app/models/workarea/payment/purchase/credit_card.decorator +37 -0
  20. data/app/models/workarea/payment/refund/credit_card.decorator +14 -0
  21. data/app/models/workarea/payment/store_credit_card.decorator +13 -0
  22. data/app/workers/workarea/save_user_order_details.decorator +33 -0
  23. data/bin/rails +18 -0
  24. data/config/initializers/00_defaults.rb +1 -0
  25. data/doc/PWCTestAccount_WorldPay ecom.pages +0 -0
  26. data/doc/validation/(Completed v2)PAYware Connect Validation Worksheet 2015 V2 .doc +0 -0
  27. data/doc/validation/(Completed v3)PAYware Connect Validation Worksheet 2015 V2 .doc +0 -0
  28. data/doc/validation/PAYware Connect Validation Letter Weblinc 09-11-2015.pdf +0 -0
  29. data/doc/validation/PAYware Connect Validation Letter Weblinc 10-21-2015.pdf +0 -0
  30. data/lib/active_merchant/billing/bogus_payware_connect_gateway.rb +130 -0
  31. data/lib/active_merchant/billing/payware_connect_gateway.rb +137 -0
  32. data/lib/active_merchant/billing/payware_connect_gateway/actions/authorize.rb +63 -0
  33. data/lib/active_merchant/billing/payware_connect_gateway/actions/capture.rb +26 -0
  34. data/lib/active_merchant/billing/payware_connect_gateway/actions/purchase.rb +59 -0
  35. data/lib/active_merchant/billing/payware_connect_gateway/actions/refund.rb +29 -0
  36. data/lib/active_merchant/billing/payware_connect_gateway/actions/void.rb +20 -0
  37. data/lib/active_merchant/billing/payware_connect_gateway/admin_actions/add_contract.rb +9 -0
  38. data/lib/active_merchant/billing/payware_connect_gateway/admin_actions/add_customer.rb +9 -0
  39. data/lib/active_merchant/billing/payware_connect_gateway/admin_actions/add_customer_and_contract.rb +10 -0
  40. data/lib/active_merchant/billing/payware_connect_gateway/admin_actions/update_contract.rb +9 -0
  41. data/lib/active_merchant/billing/payware_connect_gateway/admin_actions/update_customer.rb +9 -0
  42. data/lib/active_merchant/billing/payware_connect_gateway/admin_xml_builder.rb +105 -0
  43. data/lib/active_merchant/billing/payware_connect_gateway/xml_builder.rb +35 -0
  44. data/lib/active_merchant/billing/payware_response.rb +9 -0
  45. data/lib/validation.rb +25 -0
  46. data/lib/workarea/payware_connect.rb +43 -0
  47. data/lib/workarea/payware_connect/engine.rb +8 -0
  48. data/lib/workarea/payware_connect/version.rb +5 -0
  49. data/test/dummy/Rakefile +6 -0
  50. data/test/dummy/app/assets/config/manifest.js +4 -0
  51. data/test/dummy/app/assets/images/.keep +0 -0
  52. data/test/dummy/app/assets/javascripts/application.js +13 -0
  53. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  54. data/test/dummy/app/controllers/application_controller.rb +3 -0
  55. data/test/dummy/app/controllers/concerns/.keep +0 -0
  56. data/test/dummy/app/helpers/application_helper.rb +2 -0
  57. data/test/dummy/app/jobs/application_job.rb +2 -0
  58. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  59. data/test/dummy/app/models/concerns/.keep +0 -0
  60. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  61. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  62. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  63. data/test/dummy/bin/bundle +3 -0
  64. data/test/dummy/bin/rails +4 -0
  65. data/test/dummy/bin/rake +4 -0
  66. data/test/dummy/bin/setup +34 -0
  67. data/test/dummy/bin/update +29 -0
  68. data/test/dummy/config.ru +5 -0
  69. data/test/dummy/config/application.rb +24 -0
  70. data/test/dummy/config/boot.rb +5 -0
  71. data/test/dummy/config/cable.yml +9 -0
  72. data/test/dummy/config/environment.rb +5 -0
  73. data/test/dummy/config/environments/development.rb +56 -0
  74. data/test/dummy/config/environments/production.rb +86 -0
  75. data/test/dummy/config/environments/test.rb +44 -0
  76. data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
  77. data/test/dummy/config/initializers/assets.rb +11 -0
  78. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  79. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  80. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  81. data/test/dummy/config/initializers/inflections.rb +16 -0
  82. data/test/dummy/config/initializers/mime_types.rb +4 -0
  83. data/test/dummy/config/initializers/new_framework_defaults.rb +23 -0
  84. data/test/dummy/config/initializers/workarea.rb +3 -0
  85. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  86. data/test/dummy/config/locales/en.yml +23 -0
  87. data/test/dummy/config/puma.rb +47 -0
  88. data/test/dummy/config/routes.rb +5 -0
  89. data/test/dummy/config/secrets.yml +22 -0
  90. data/test/dummy/config/spring.rb +6 -0
  91. data/test/dummy/db/seeds.rb +3 -0
  92. data/test/dummy/lib/assets/.keep +0 -0
  93. data/test/dummy/log/.keep +0 -0
  94. data/test/dummy/public/404.html +67 -0
  95. data/test/dummy/public/422.html +67 -0
  96. data/test/dummy/public/500.html +66 -0
  97. data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
  98. data/test/dummy/public/apple-touch-icon.png +0 -0
  99. data/test/dummy/public/favicon.ico +0 -0
  100. data/test/integration/workarea/storefront/checkout_side_effects_integration_test.decorator +44 -0
  101. data/test/lib/active_merchant/billing/payware_connect_gateway_test.rb +280 -0
  102. data/test/models/workarea/payment/authorize/credit_card_test.decorator +47 -0
  103. data/test/models/workarea/payment/capture/credit_card_test.decorator +33 -0
  104. data/test/models/workarea/payment/credit_card_integration_test.decorator +25 -0
  105. data/test/models/workarea/payment/payware_credit_card_test.rb +44 -0
  106. data/test/models/workarea/payment/purchase/credit_card_test.decorator +54 -0
  107. data/test/models/workarea/payment/refund/credit_card_test.decorator +33 -0
  108. data/test/models/workarea/payment/store_credit_card_test.decorator +10 -0
  109. data/test/support/workarea/payware_connect_gateway_vcr_config.rb +24 -0
  110. data/test/system/workarea/admin/payment_transactions_system_test.decorator +37 -0
  111. data/test/test_helper.rb +12 -0
  112. data/test/vcr_cassettes/credit_card/auth_capture.yml +127 -0
  113. data/test/vcr_cassettes/credit_card/auth_void.yml +126 -0
  114. data/test/vcr_cassettes/credit_card/purchase_void.yml +126 -0
  115. data/test/vcr_cassettes/credit_card/store_auth.yml +67 -0
  116. data/test/vcr_cassettes/credit_card/store_purchase.yml +67 -0
  117. data/test/vcr_cassettes/payware/add_contract.yml +99 -0
  118. data/test/vcr_cassettes/payware/add_customer.yml +52 -0
  119. data/test/vcr_cassettes/payware/authorize_credit_card.yml +67 -0
  120. data/test/vcr_cassettes/payware/authorize_customer_and_contract.yml +161 -0
  121. data/test/vcr_cassettes/payware/authorize_for_0_credit_card.yml +67 -0
  122. data/test/vcr_cassettes/payware/authorize_for_0_troutd.yml +130 -0
  123. data/test/vcr_cassettes/payware/authorize_troutd.yml +130 -0
  124. data/test/vcr_cassettes/payware/capture.yml +127 -0
  125. data/test/vcr_cassettes/payware/refund.yml +223 -0
  126. data/test/vcr_cassettes/payware/refund_troutd.yml +128 -0
  127. data/test/vcr_cassettes/payware/void_authorization.yml +126 -0
  128. data/test/workers/workarea/save_user_order_details_test.decorator +56 -0
  129. data/workarea-payware_connect.gemspec +18 -0
  130. metadata +190 -0
@@ -0,0 +1,33 @@
1
+ module Workarea
2
+ decorate Payment::Refund::CreditCardTest, with: :payware_connect do
3
+ def test_complete_refunds_on_the_credit_card_gateway
4
+ operation = Payment::Refund::CreditCard.new(payment.credit_card, transaction)
5
+
6
+ original_refund = Workarea.config.gateways.credit_card.method(:refund)
7
+ Workarea.config.gateways.credit_card
8
+ .expects(:refund)
9
+ .with(500, troutd)
10
+ .returns(original_refund.call(500, troutd))
11
+
12
+ operation.complete!
13
+ end
14
+
15
+ private
16
+
17
+ def reference
18
+ @reference ||= Payment::Transaction.new(
19
+ amount: 5.to_m,
20
+ response: ActiveMerchant::Billing::Response.new(
21
+ true,
22
+ 'Message',
23
+ { 'RESPONSE' => { 'TROUTD' => troutd } },
24
+ { authorization: authorization }
25
+ )
26
+ )
27
+ end
28
+
29
+ def troutd
30
+ @troutd ||= ActiveMerchant::Billing::BogusGateway::AUTHORIZATION
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,10 @@
1
+ module Workarea
2
+ decorate Payment::StoreCreditCardTest, with: :payware_connect do
3
+ def test_save_persists_partial_number
4
+ credit_card.token = nil
5
+ Payment::StoreCreditCard.new(credit_card).perform!
6
+
7
+ assert(credit_card.partial_number.present?)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,24 @@
1
+ module Workarea
2
+ module PaywareConnectGatewayVCRConfig
3
+ def self.included(test)
4
+ super
5
+ test.setup :setup_gateway
6
+ test.teardown :reset_gateway
7
+ end
8
+
9
+ def setup_gateway
10
+ @_old_gateway = Workarea.config.gateways.credit_card
11
+ Workarea.config.gateways.credit_card = ActiveMerchant::Billing::AuthorizeNetCimGateway.new(
12
+ client_id: "17270300010001",
13
+ login: "apiuser",
14
+ password: "6GHMg7ur",
15
+ merchant_key: "49BC6225-4B49-4585-8D34-07DCA05CF3937FD6C525-8AEE-4916-BEEC-BDB",
16
+ test: true
17
+ )
18
+ end
19
+
20
+ def reset_gateway
21
+ Workarea.config.gateways.credit_card = @_old_gateway
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,37 @@
1
+ module Workarea
2
+ decorate Admin::PaymentTransactionsSystemTest, with: :payware_connect do
3
+ def test_viewing_transactions
4
+ Workarea.with_config do |config|
5
+ config.auto_capture = false
6
+
7
+ order = create_placed_order(id: 'FOO')
8
+ payment = Payment.find(order.id)
9
+ auth = payment.credit_card.transactions.first
10
+ capture = payment.credit_card.build_transaction(
11
+ action: 'capture',
12
+ amount: auth.amount,
13
+ reference: auth
14
+ )
15
+ capture.complete!
16
+
17
+ visit admin.payment_transactions_path
18
+
19
+ click_button 'Transaction'
20
+ assert(page.has_content?('Authorize (1)'))
21
+ assert(page.has_content?('Capture (1)'))
22
+ click_button 'Transaction' # closes filter dropdown
23
+
24
+ click_button 'Auth Status'
25
+ assert(page.has_content?('Captured (1)'))
26
+
27
+ visit admin.payment_transactions_path
28
+ click_link 'Authorize', match: :first
29
+
30
+ assert(page.has_content?('Transaction'), "expected page to have content 'Transaction'")
31
+ assert(page.has_content?('Credit Card'), "expected page to have content 'Credit Card'")
32
+ assert(page.has_content?("#{Money.default_currency.symbol}11.00"))
33
+ assert(page.has_content?('Capture'))
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,12 @@
1
+ require "simplecov"
2
+ SimpleCov.start "rails"
3
+
4
+ ENV["RAILS_ENV"] = "test"
5
+
6
+ require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
7
+ require "rails/test_help"
8
+ require "workarea/test_help"
9
+
10
+ # Filter out Minitest backtrace while allowing backtrace from other libraries
11
+ # to be shown.
12
+ Minitest.backtrace_filter = Minitest::BacktraceFilter.new
@@ -0,0 +1,127 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://cert.api.vfipayna.com/IPCHAPI/RH.ASPX
6
+ body:
7
+ encoding: UTF-8
8
+ string: "<TRANSACTION><FUNCTION_TYPE>PAYMENT</FUNCTION_TYPE><PAYMENT_TYPE>CREDIT</PAYMENT_TYPE><CLIENT_ID>17270300010001</CLIENT_ID><MERCHANTKEY>49BC6225-4B49-4585-8D34-07DCA05CF3937FD6C525-8AEE-4916-BEEC-BDB</MERCHANTKEY><USER_ID>apiuser</USER_ID><USER_PW>6GHMg7ur</USER_PW><COMMAND>PRE_AUTH</COMMAND><TRANS_AMOUNT>5.00</TRANS_AMOUNT><PRESENT_FLAG>1</PRESENT_FLAG><CARDHOLDER>Ben
9
+ Crouse</CARDHOLDER><CUSTOMER_STREET>22 s. 3rd st.</CUSTOMER_STREET><CUSTOMER_CITY>Philadelphia</CUSTOMER_CITY><CUSTOMER_STATE>PA</CUSTOMER_STATE><CUSTOMER_ZIP>19106</CUSTOMER_ZIP><ACCT_NUM>4111111111111111</ACCT_NUM><CVV2>999</CVV2><EXP_MONTH>01</EXP_MONTH><EXP_YEAR>20</EXP_YEAR></TRANSACTION>"
10
+ headers:
11
+ Content-Type:
12
+ - text/xml
13
+ Connection:
14
+ - close
15
+ Accept-Encoding:
16
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
+ Accept:
18
+ - "*/*"
19
+ User-Agent:
20
+ - Ruby
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Cache-Control:
27
+ - no-store
28
+ Pragma:
29
+ - no-cache
30
+ Content-Type:
31
+ - text/xml; charset=utf-8
32
+ Expires:
33
+ - '0'
34
+ Vary:
35
+ - Accept-Encoding
36
+ Server:
37
+ - NOT_AUTHORIZED
38
+ X-Aspnet-Version:
39
+ - NOT_AUTHORIZED
40
+ Strict-Transport-Security:
41
+ - max-age=31536000; includeSubDomains
42
+ X-Frame-Options:
43
+ - sameorigin
44
+ X-Xss-Protection:
45
+ - 1; mode=block
46
+ Date:
47
+ - Tue, 28 May 2019 13:49:39 GMT
48
+ Connection:
49
+ - close
50
+ Content-Length:
51
+ - '566'
52
+ body:
53
+ encoding: ASCII-8BIT
54
+ string: "<RESPONSE>\r\n <AUTH_CODE>TAS968</AUTH_CODE>\r\n <AVS_CODE>N</AVS_CODE>\r\n
55
+ \ <CLIENT_ID>17270300010001</CLIENT_ID>\r\n <COMMAND>PRE_AUTH</COMMAND>\r\n
56
+ \ <CTROUTD>16</CTROUTD>\r\n <CVV2_CODE>M</CVV2_CODE>\r\n <INTRN_SEQ_NUM>336375</INTRN_SEQ_NUM>\r\n
57
+ \ <MERCHID>888000000830</MERCHID>\r\n <PAYMENT_MEDIA>VISA</PAYMENT_MEDIA>\r\n
58
+ \ <PAYMENT_TYPE>CREDIT</PAYMENT_TYPE>\r\n <REFERENCE>914813502306</REFERENCE>\r\n
59
+ \ <RESPONSE_TEXT>NO MATCH </RESPONSE_TEXT>\r\n <RESULT>APPROVED</RESULT>\r\n
60
+ \ <RESULT_CODE>5</RESULT_CODE>\r\n <TERMID>1515</TERMID>\r\n
61
+ \ <TERMINATION_STATUS>SUCCESS</TERMINATION_STATUS>\r\n <TRANS_AMOUNT>5.00</TRANS_AMOUNT>\r\n
62
+ \ <TRANS_DATE>2019.05.28</TRANS_DATE>\r\n <TRANS_SEQ_NUM>4</TRANS_SEQ_NUM>\r\n
63
+ \ <TRANS_TIME>09:49:39</TRANS_TIME>\r\n <TROUTD>336375</TROUTD>\r\n
64
+ \ <LPTOKEN>97</LPTOKEN>\r\n</RESPONSE>"
65
+ http_version:
66
+ recorded_at: Tue, 28 May 2019 13:49:39 GMT
67
+ - request:
68
+ method: post
69
+ uri: https://cert.api.vfipayna.com/IPCHAPI/RH.ASPX
70
+ body:
71
+ encoding: UTF-8
72
+ string: "<TRANSACTION><FUNCTION_TYPE>PAYMENT</FUNCTION_TYPE><PAYMENT_TYPE>CREDIT</PAYMENT_TYPE><CLIENT_ID>17270300010001</CLIENT_ID><MERCHANTKEY>49BC6225-4B49-4585-8D34-07DCA05CF3937FD6C525-8AEE-4916-BEEC-BDB</MERCHANTKEY><USER_ID>apiuser</USER_ID><USER_PW>6GHMg7ur</USER_PW><COMMAND>COMPLETION</COMMAND><TROUTD>336375</TROUTD><TRANS_AMOUNT>5.00</TRANS_AMOUNT></TRANSACTION>"
73
+ headers:
74
+ Content-Type:
75
+ - text/xml
76
+ Connection:
77
+ - close
78
+ Accept-Encoding:
79
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
80
+ Accept:
81
+ - "*/*"
82
+ User-Agent:
83
+ - Ruby
84
+ response:
85
+ status:
86
+ code: 200
87
+ message: OK
88
+ headers:
89
+ Cache-Control:
90
+ - no-store
91
+ Pragma:
92
+ - no-cache
93
+ Content-Type:
94
+ - text/xml; charset=utf-8
95
+ Expires:
96
+ - '0'
97
+ Vary:
98
+ - Accept-Encoding
99
+ Server:
100
+ - NOT_AUTHORIZED
101
+ X-Aspnet-Version:
102
+ - NOT_AUTHORIZED
103
+ Strict-Transport-Security:
104
+ - max-age=31536000; includeSubDomains
105
+ X-Frame-Options:
106
+ - sameorigin
107
+ X-Xss-Protection:
108
+ - 1; mode=block
109
+ Date:
110
+ - Tue, 28 May 2019 13:49:39 GMT
111
+ Connection:
112
+ - close
113
+ Content-Length:
114
+ - '441'
115
+ body:
116
+ encoding: ASCII-8BIT
117
+ string: "<RESPONSE>\r\n <AUTH_CODE>TAS968</AUTH_CODE>\r\n <CLIENT_ID>17270300010001</CLIENT_ID>\r\n
118
+ \ <COMMAND>COMPLETION</COMMAND>\r\n <CTROUTD>16</CTROUTD>\r\n
119
+ \ <INTRN_SEQ_NUM>336381</INTRN_SEQ_NUM>\r\n <PAYMENT_MEDIA>VISA</PAYMENT_MEDIA>\r\n
120
+ \ <PAYMENT_TYPE>CREDIT</PAYMENT_TYPE>\r\n <RESULT>CAPTURED</RESULT>\r\n
121
+ \ <RESULT_CODE>4</RESULT_CODE>\r\n <TERMINATION_STATUS>SUCCESS</TERMINATION_STATUS>\r\n
122
+ \ <TRANS_AMOUNT>5.00</TRANS_AMOUNT>\r\n <TRANS_DATE>2019.05.28</TRANS_DATE>\r\n
123
+ \ <TRANS_SEQ_NUM>5</TRANS_SEQ_NUM>\r\n <TRANS_TIME>09:49:40</TRANS_TIME>\r\n
124
+ \ <TROUTD>336375</TROUTD>\r\n</RESPONSE>"
125
+ http_version:
126
+ recorded_at: Tue, 28 May 2019 13:49:40 GMT
127
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,126 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://cert.api.vfipayna.com/IPCHAPI/RH.ASPX
6
+ body:
7
+ encoding: UTF-8
8
+ string: "<TRANSACTION><FUNCTION_TYPE>PAYMENT</FUNCTION_TYPE><PAYMENT_TYPE>CREDIT</PAYMENT_TYPE><CLIENT_ID>17270300010001</CLIENT_ID><MERCHANTKEY>49BC6225-4B49-4585-8D34-07DCA05CF3937FD6C525-8AEE-4916-BEEC-BDB</MERCHANTKEY><USER_ID>apiuser</USER_ID><USER_PW>6GHMg7ur</USER_PW><COMMAND>PRE_AUTH</COMMAND><TRANS_AMOUNT>5.00</TRANS_AMOUNT><PRESENT_FLAG>1</PRESENT_FLAG><CARDHOLDER>Ben
9
+ Crouse</CARDHOLDER><CUSTOMER_STREET>22 s. 3rd st.</CUSTOMER_STREET><CUSTOMER_CITY>Philadelphia</CUSTOMER_CITY><CUSTOMER_STATE>PA</CUSTOMER_STATE><CUSTOMER_ZIP>19106</CUSTOMER_ZIP><ACCT_NUM>4111111111111111</ACCT_NUM><CVV2>999</CVV2><EXP_MONTH>01</EXP_MONTH><EXP_YEAR>20</EXP_YEAR></TRANSACTION>"
10
+ headers:
11
+ Content-Type:
12
+ - text/xml
13
+ Connection:
14
+ - close
15
+ Accept-Encoding:
16
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
+ Accept:
18
+ - "*/*"
19
+ User-Agent:
20
+ - Ruby
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Cache-Control:
27
+ - no-store
28
+ Pragma:
29
+ - no-cache
30
+ Content-Type:
31
+ - text/xml; charset=utf-8
32
+ Expires:
33
+ - '0'
34
+ Vary:
35
+ - Accept-Encoding
36
+ Server:
37
+ - NOT_AUTHORIZED
38
+ X-Aspnet-Version:
39
+ - NOT_AUTHORIZED
40
+ Strict-Transport-Security:
41
+ - max-age=31536000; includeSubDomains
42
+ X-Frame-Options:
43
+ - sameorigin
44
+ X-Xss-Protection:
45
+ - 1; mode=block
46
+ Date:
47
+ - Tue, 28 May 2019 13:49:41 GMT
48
+ Connection:
49
+ - close
50
+ Content-Length:
51
+ - '561'
52
+ body:
53
+ encoding: ASCII-8BIT
54
+ string: "<RESPONSE>\r\n <AUTH_CODE>TAS969</AUTH_CODE>\r\n <AVS_CODE>N</AVS_CODE>\r\n
55
+ \ <CLIENT_ID>17270300010001</CLIENT_ID>\r\n <COMMAND>PRE_AUTH</COMMAND>\r\n
56
+ \ <CTROUTD>17</CTROUTD>\r\n <CVV2_CODE>M</CVV2_CODE>\r\n <INTRN_SEQ_NUM>336386</INTRN_SEQ_NUM>\r\n
57
+ \ <MERCHID>888000000830</MERCHID>\r\n <PAYMENT_MEDIA>VISA</PAYMENT_MEDIA>\r\n
58
+ \ <PAYMENT_TYPE>CREDIT</PAYMENT_TYPE>\r\n <REFERENCE>914813502307</REFERENCE>\r\n
59
+ \ <RESPONSE_TEXT>NO MATCH </RESPONSE_TEXT>\r\n <RESULT>APPROVED</RESULT>\r\n
60
+ \ <RESULT_CODE>5</RESULT_CODE>\r\n <TERMID>1515</TERMID>\r\n
61
+ \ <TERMINATION_STATUS>SUCCESS</TERMINATION_STATUS>\r\n <TRANS_AMOUNT>5.00</TRANS_AMOUNT>\r\n
62
+ \ <TRANS_DATE>2019.05.28</TRANS_DATE>\r\n <TRANS_SEQ_NUM>6</TRANS_SEQ_NUM>\r\n
63
+ \ <TRANS_TIME>09:49:40</TRANS_TIME>\r\n <TROUTD>336386</TROUTD>\r\n
64
+ \ <LPTOKEN>97</LPTOKEN>\r\n</RESPONSE>"
65
+ http_version:
66
+ recorded_at: Tue, 28 May 2019 13:49:41 GMT
67
+ - request:
68
+ method: post
69
+ uri: https://cert.api.vfipayna.com/IPCHAPI/RH.ASPX
70
+ body:
71
+ encoding: UTF-8
72
+ string: "<TRANSACTION><FUNCTION_TYPE>PAYMENT</FUNCTION_TYPE><PAYMENT_TYPE>CREDIT</PAYMENT_TYPE><CLIENT_ID>17270300010001</CLIENT_ID><MERCHANTKEY>49BC6225-4B49-4585-8D34-07DCA05CF3937FD6C525-8AEE-4916-BEEC-BDB</MERCHANTKEY><USER_ID>apiuser</USER_ID><USER_PW>6GHMg7ur</USER_PW><COMMAND>VOID</COMMAND><TROUTD>336386</TROUTD></TRANSACTION>"
73
+ headers:
74
+ Content-Type:
75
+ - text/xml
76
+ Connection:
77
+ - close
78
+ Accept-Encoding:
79
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
80
+ Accept:
81
+ - "*/*"
82
+ User-Agent:
83
+ - Ruby
84
+ response:
85
+ status:
86
+ code: 200
87
+ message: OK
88
+ headers:
89
+ Cache-Control:
90
+ - no-store
91
+ Pragma:
92
+ - no-cache
93
+ Content-Type:
94
+ - text/xml; charset=utf-8
95
+ Expires:
96
+ - '0'
97
+ Vary:
98
+ - Accept-Encoding
99
+ Server:
100
+ - NOT_AUTHORIZED
101
+ X-Aspnet-Version:
102
+ - NOT_AUTHORIZED
103
+ Strict-Transport-Security:
104
+ - max-age=31536000; includeSubDomains
105
+ X-Frame-Options:
106
+ - sameorigin
107
+ X-Xss-Protection:
108
+ - 1; mode=block
109
+ Date:
110
+ - Tue, 28 May 2019 13:49:43 GMT
111
+ Connection:
112
+ - close
113
+ Content-Length:
114
+ - '432'
115
+ body:
116
+ encoding: ASCII-8BIT
117
+ string: "<RESPONSE>\r\n <AUTH_CODE>TAS969</AUTH_CODE>\r\n <CLIENT_ID>17270300010001</CLIENT_ID>\r\n
118
+ \ <COMMAND>VOID</COMMAND>\r\n <CTROUTD>17</CTROUTD>\r\n <INTRN_SEQ_NUM>336392</INTRN_SEQ_NUM>\r\n
119
+ \ <PAYMENT_MEDIA>VISA</PAYMENT_MEDIA>\r\n <PAYMENT_TYPE>CREDIT</PAYMENT_TYPE>\r\n
120
+ \ <RESULT>VOIDED</RESULT>\r\n <RESULT_CODE>7</RESULT_CODE>\r\n
121
+ \ <TERMINATION_STATUS>SUCCESS</TERMINATION_STATUS>\r\n <TRANS_AMOUNT>5.00</TRANS_AMOUNT>\r\n
122
+ \ <TRANS_DATE>2019.05.28</TRANS_DATE>\r\n <TRANS_SEQ_NUM>8</TRANS_SEQ_NUM>\r\n
123
+ \ <TRANS_TIME>09:49:41</TRANS_TIME>\r\n <TROUTD>336386</TROUTD>\r\n</RESPONSE>"
124
+ http_version:
125
+ recorded_at: Tue, 28 May 2019 13:49:42 GMT
126
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,126 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://cert.api.vfipayna.com/IPCHAPI/RH.ASPX
6
+ body:
7
+ encoding: UTF-8
8
+ string: "<TRANSACTION><FUNCTION_TYPE>PAYMENT</FUNCTION_TYPE><PAYMENT_TYPE>CREDIT</PAYMENT_TYPE><CLIENT_ID>17270300010001</CLIENT_ID><MERCHANTKEY>49BC6225-4B49-4585-8D34-07DCA05CF3937FD6C525-8AEE-4916-BEEC-BDB</MERCHANTKEY><USER_ID>apiuser</USER_ID><USER_PW>6GHMg7ur</USER_PW><COMMAND>SALE</COMMAND><TRANS_AMOUNT>5.00</TRANS_AMOUNT><PRESENT_FLAG>1</PRESENT_FLAG><CARDHOLDER>Ben
9
+ Crouse</CARDHOLDER><CUSTOMER_STREET>22 s. 3rd st.</CUSTOMER_STREET><CUSTOMER_CITY>Philadelphia</CUSTOMER_CITY><CUSTOMER_STATE>PA</CUSTOMER_STATE><CUSTOMER_ZIP>19106</CUSTOMER_ZIP><ACCT_NUM>4111111111111111</ACCT_NUM><CVV2>999</CVV2><EXP_MONTH>01</EXP_MONTH><EXP_YEAR>20</EXP_YEAR></TRANSACTION>"
10
+ headers:
11
+ Content-Type:
12
+ - text/xml
13
+ Connection:
14
+ - close
15
+ Accept-Encoding:
16
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
+ Accept:
18
+ - "*/*"
19
+ User-Agent:
20
+ - Ruby
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Cache-Control:
27
+ - no-store
28
+ Pragma:
29
+ - no-cache
30
+ Content-Type:
31
+ - text/xml; charset=utf-8
32
+ Expires:
33
+ - '0'
34
+ Vary:
35
+ - Accept-Encoding
36
+ Server:
37
+ - NOT_AUTHORIZED
38
+ X-Aspnet-Version:
39
+ - NOT_AUTHORIZED
40
+ Strict-Transport-Security:
41
+ - max-age=31536000; includeSubDomains
42
+ X-Frame-Options:
43
+ - sameorigin
44
+ X-Xss-Protection:
45
+ - 1; mode=block
46
+ Date:
47
+ - Tue, 28 May 2019 13:49:37 GMT
48
+ Connection:
49
+ - close
50
+ Content-Length:
51
+ - '559'
52
+ body:
53
+ encoding: ASCII-8BIT
54
+ string: "<RESPONSE>\r\n <AUTH_CODE>TAS966</AUTH_CODE>\r\n <AVS_CODE>N</AVS_CODE>\r\n
55
+ \ <CLIENT_ID>17270300010001</CLIENT_ID>\r\n <COMMAND>SALE</COMMAND>\r\n
56
+ \ <CTROUTD>15</CTROUTD>\r\n <CVV2_CODE>M</CVV2_CODE>\r\n <INTRN_SEQ_NUM>336363</INTRN_SEQ_NUM>\r\n
57
+ \ <MERCHID>888000000830</MERCHID>\r\n <PAYMENT_MEDIA>VISA</PAYMENT_MEDIA>\r\n
58
+ \ <PAYMENT_TYPE>CREDIT</PAYMENT_TYPE>\r\n <REFERENCE>914813502303</REFERENCE>\r\n
59
+ \ <RESPONSE_TEXT>NO MATCH </RESPONSE_TEXT>\r\n <RESULT>CAPTURED</RESULT>\r\n
60
+ \ <RESULT_CODE>4</RESULT_CODE>\r\n <TERMID>1515</TERMID>\r\n
61
+ \ <TERMINATION_STATUS>SUCCESS</TERMINATION_STATUS>\r\n <TRANS_AMOUNT>5.00</TRANS_AMOUNT>\r\n
62
+ \ <TRANS_DATE>2019.05.28</TRANS_DATE>\r\n <TRANS_SEQ_NUM>1</TRANS_SEQ_NUM>\r\n
63
+ \ <TRANS_TIME>09:49:36</TRANS_TIME>\r\n <TROUTD>336363</TROUTD>\r\n
64
+ \ <LPTOKEN>97</LPTOKEN>\r\n</RESPONSE>"
65
+ http_version:
66
+ recorded_at: Tue, 28 May 2019 13:49:37 GMT
67
+ - request:
68
+ method: post
69
+ uri: https://cert.api.vfipayna.com/IPCHAPI/RH.ASPX
70
+ body:
71
+ encoding: UTF-8
72
+ string: "<TRANSACTION><FUNCTION_TYPE>PAYMENT</FUNCTION_TYPE><PAYMENT_TYPE>CREDIT</PAYMENT_TYPE><CLIENT_ID>17270300010001</CLIENT_ID><MERCHANTKEY>49BC6225-4B49-4585-8D34-07DCA05CF3937FD6C525-8AEE-4916-BEEC-BDB</MERCHANTKEY><USER_ID>apiuser</USER_ID><USER_PW>6GHMg7ur</USER_PW><COMMAND>VOID</COMMAND><TROUTD>336363</TROUTD></TRANSACTION>"
73
+ headers:
74
+ Content-Type:
75
+ - text/xml
76
+ Connection:
77
+ - close
78
+ Accept-Encoding:
79
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
80
+ Accept:
81
+ - "*/*"
82
+ User-Agent:
83
+ - Ruby
84
+ response:
85
+ status:
86
+ code: 200
87
+ message: OK
88
+ headers:
89
+ Cache-Control:
90
+ - no-store
91
+ Pragma:
92
+ - no-cache
93
+ Content-Type:
94
+ - text/xml; charset=utf-8
95
+ Expires:
96
+ - '0'
97
+ Vary:
98
+ - Accept-Encoding
99
+ Server:
100
+ - NOT_AUTHORIZED
101
+ X-Aspnet-Version:
102
+ - NOT_AUTHORIZED
103
+ Strict-Transport-Security:
104
+ - max-age=31536000; includeSubDomains
105
+ X-Frame-Options:
106
+ - sameorigin
107
+ X-Xss-Protection:
108
+ - 1; mode=block
109
+ Date:
110
+ - Tue, 28 May 2019 13:49:38 GMT
111
+ Connection:
112
+ - close
113
+ Content-Length:
114
+ - '435'
115
+ body:
116
+ encoding: ASCII-8BIT
117
+ string: "<RESPONSE>\r\n <AUTH_CODE>TAS966</AUTH_CODE>\r\n <CLIENT_ID>17270300010001</CLIENT_ID>\r\n
118
+ \ <COMMAND>VOID</COMMAND>\r\n <CTROUTD>15</CTROUTD>\r\n <INTRN_SEQ_NUM>336369</INTRN_SEQ_NUM>\r\n
119
+ \ <PAYMENT_MEDIA>VISA</PAYMENT_MEDIA>\r\n <PAYMENT_TYPE>CREDIT</PAYMENT_TYPE>\r\n
120
+ \ <RESULT>VOIDED</RESULT>\r\n <RESULT_CODE>7</RESULT_CODE>\r\n
121
+ \ <TERMINATION_STATUS>SUCCESS</TERMINATION_STATUS>\r\n <TRANS_AMOUNT>5.00</TRANS_AMOUNT>\r\n
122
+ \ <TRANS_DATE>2019.05.28</TRANS_DATE>\r\n <TRANS_SEQ_NUM>3</TRANS_SEQ_NUM>\r\n
123
+ \ <TRANS_TIME>09:49:37</TRANS_TIME>\r\n <TROUTD>336363</TROUTD>\r\n</RESPONSE>"
124
+ http_version:
125
+ recorded_at: Tue, 28 May 2019 13:49:38 GMT
126
+ recorded_with: VCR 2.9.3