vantiv 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. checksums.yaml +7 -0
  2. data/.env.example +4 -0
  3. data/.gitignore +11 -0
  4. data/.rspec +2 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +5 -0
  7. data/Gemfile +3 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +354 -0
  10. data/Rakefile +6 -0
  11. data/bin/console +19 -0
  12. data/bin/generate_sandbox_fixtures +23 -0
  13. data/bin/paypage_server +20 -0
  14. data/bin/setup +7 -0
  15. data/cert_fixtures/L_AC_1.json +27 -0
  16. data/cert_fixtures/L_AC_1A.json +8 -0
  17. data/cert_fixtures/L_AC_2.json +27 -0
  18. data/cert_fixtures/L_AC_2A.json +8 -0
  19. data/cert_fixtures/L_AC_3.json +26 -0
  20. data/cert_fixtures/L_AC_3A.json +8 -0
  21. data/cert_fixtures/L_AC_4.json +25 -0
  22. data/cert_fixtures/L_AC_4A.json +8 -0
  23. data/cert_fixtures/L_AC_5.json +18 -0
  24. data/cert_fixtures/L_AC_5A.json +8 -0
  25. data/cert_fixtures/L_AC_6.json +27 -0
  26. data/cert_fixtures/L_AC_7.json +26 -0
  27. data/cert_fixtures/L_AC_8.json +26 -0
  28. data/cert_fixtures/L_AC_9.json +26 -0
  29. data/cert_fixtures/L_AR_1.json +27 -0
  30. data/cert_fixtures/L_AR_1A.json +9 -0
  31. data/cert_fixtures/L_AR_1B.json +8 -0
  32. data/cert_fixtures/L_AR_2.json +27 -0
  33. data/cert_fixtures/L_AR_2A.json +8 -0
  34. data/cert_fixtures/L_AR_3.json +26 -0
  35. data/cert_fixtures/L_AR_3A.json +8 -0
  36. data/cert_fixtures/L_AR_4.json +25 -0
  37. data/cert_fixtures/L_AR_4A.json +9 -0
  38. data/cert_fixtures/L_AR_4B.json +9 -0
  39. data/cert_fixtures/L_AR_5.json +17 -0
  40. data/cert_fixtures/L_AR_5A.json +9 -0
  41. data/cert_fixtures/L_EP_1.json +15 -0
  42. data/cert_fixtures/L_EP_2.json +15 -0
  43. data/cert_fixtures/L_EP_3.json +11 -0
  44. data/cert_fixtures/L_EP_4.json +15 -0
  45. data/cert_fixtures/L_EP_5.json +15 -0
  46. data/cert_fixtures/L_EP_6.json +15 -0
  47. data/cert_fixtures/L_EP_7.json +15 -0
  48. data/cert_fixtures/L_RC_1.json +27 -0
  49. data/cert_fixtures/L_RC_1A.json +8 -0
  50. data/cert_fixtures/L_RC_1B.json +8 -0
  51. data/cert_fixtures/L_RC_2.json +27 -0
  52. data/cert_fixtures/L_RC_2A.json +8 -0
  53. data/cert_fixtures/L_RC_2B.json +8 -0
  54. data/cert_fixtures/L_RC_3.json +26 -0
  55. data/cert_fixtures/L_RC_3A.json +8 -0
  56. data/cert_fixtures/L_RC_3B.json +8 -0
  57. data/cert_fixtures/L_RC_4.json +25 -0
  58. data/cert_fixtures/L_RC_4A.json +8 -0
  59. data/cert_fixtures/L_RC_4B.json +8 -0
  60. data/cert_fixtures/L_RC_5.json +18 -0
  61. data/cert_fixtures/L_RC_5A.json +8 -0
  62. data/cert_fixtures/L_RC_5B.json +8 -0
  63. data/cert_fixtures/L_RC_6.json +27 -0
  64. data/cert_fixtures/L_RC_6A.json +8 -0
  65. data/cert_fixtures/L_RC_7.json +26 -0
  66. data/cert_fixtures/L_RC_7A.json +8 -0
  67. data/cert_fixtures/L_RC_8.json +18 -0
  68. data/cert_fixtures/L_S_1.json +27 -0
  69. data/cert_fixtures/L_S_2.json +27 -0
  70. data/cert_fixtures/L_S_3.json +26 -0
  71. data/cert_fixtures/L_S_4.json +25 -0
  72. data/cert_fixtures/L_S_5.json +18 -0
  73. data/cert_fixtures/L_S_6.json +26 -0
  74. data/cert_fixtures/L_S_7.json +26 -0
  75. data/cert_fixtures/L_S_8.json +26 -0
  76. data/cert_fixtures/L_S_9.json +26 -0
  77. data/cert_fixtures/L_T_1.json +11 -0
  78. data/cert_fixtures/L_T_10.json +19 -0
  79. data/cert_fixtures/L_T_11.json +19 -0
  80. data/cert_fixtures/L_T_2.json +11 -0
  81. data/cert_fixtures/L_T_3.json +12 -0
  82. data/cert_fixtures/L_T_4.json +11 -0
  83. data/cert_fixtures/L_T_6.json +19 -0
  84. data/cert_fixtures/L_T_7.json +19 -0
  85. data/cert_fixtures/L_T_8.json +19 -0
  86. data/cert_fixtures/L_T_9.json +20 -0
  87. data/cert_fixtures/L_V_1.json +27 -0
  88. data/cert_fixtures/L_V_1A.json +8 -0
  89. data/cert_fixtures/L_V_1B.json +8 -0
  90. data/cert_fixtures/L_V_1C.json +8 -0
  91. data/cert_fixtures/L_V_2.json +27 -0
  92. data/cert_fixtures/L_V_2A.json +8 -0
  93. data/cert_fixtures/L_V_3.json +18 -0
  94. data/cert_fixtures/L_V_3A.json +8 -0
  95. data/cert_fixtures/L_V_4.json +26 -0
  96. data/cert_fixtures/L_V_4A.json +8 -0
  97. data/exe/vantiv-certify-app +23 -0
  98. data/lib/vantiv.rb +152 -0
  99. data/lib/vantiv/api.rb +10 -0
  100. data/lib/vantiv/api/capture_response.rb +26 -0
  101. data/lib/vantiv/api/endpoints.rb +15 -0
  102. data/lib/vantiv/api/live_transaction_response.rb +50 -0
  103. data/lib/vantiv/api/request.rb +75 -0
  104. data/lib/vantiv/api/request_body.rb +111 -0
  105. data/lib/vantiv/api/request_body_generator.rb +43 -0
  106. data/lib/vantiv/api/response.rb +50 -0
  107. data/lib/vantiv/api/tied_transaction_response.rb +30 -0
  108. data/lib/vantiv/api/tokenization_response.rb +45 -0
  109. data/lib/vantiv/certification/cert_request_body_compiler.rb +38 -0
  110. data/lib/vantiv/certification/paypage_driver.rb +54 -0
  111. data/lib/vantiv/certification/paypage_server.rb +70 -0
  112. data/lib/vantiv/certification/response_cache.rb +29 -0
  113. data/lib/vantiv/certification/validation_test_runner.rb +103 -0
  114. data/lib/vantiv/certification/views/index.html.erb +76 -0
  115. data/lib/vantiv/environment.rb +14 -0
  116. data/lib/vantiv/mocked_sandbox.rb +29 -0
  117. data/lib/vantiv/mocked_sandbox/api_request.rb +53 -0
  118. data/lib/vantiv/mocked_sandbox/fixture_generator.rb +48 -0
  119. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457002100000005.json.erb +23 -0
  120. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457010000000009.json.erb +23 -0
  121. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457010010900010.json.erb +21 -0
  122. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001600000006.json.erb +23 -0
  123. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001900000003.json.erb +23 -0
  124. data/lib/vantiv/paypage.rb +7 -0
  125. data/lib/vantiv/test_card.rb +94 -0
  126. data/lib/vantiv/version.rb +3 -0
  127. data/vantiv-ruby.gemspec +29 -0
  128. metadata +271 -0
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "AUTH_REVERSAL",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_AR_3.litleOnlineResponse.authorizationResponse.TransactionID}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "endpoint": "AUTHORIZATION",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "101.00",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345"
9
+ },
10
+ "Card": {
11
+ "Type": "AX",
12
+ "CardNumber": "375001000000005",
13
+ "ExpirationMonth": "04",
14
+ "ExpirationYear": "16"
15
+ },
16
+ "Address": {
17
+ "BillingName": "Bob Black",
18
+ "BillingAddress1": "4 Main St.",
19
+ "BillingCity": "Laurel",
20
+ "BillingState": "MD",
21
+ "BillingZipcode": "20708",
22
+ "BillingCountry": "US"
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_AR_4.litleOnlineResponse.authorizationResponse.TransactionID}",
6
+ "TransactionAmount": "50.50"
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "endpoint": "AUTH_REVERSAL",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_AR_4.litleOnlineResponse.authorizationResponse.TransactionID}",
6
+ "TransactionAmount": "50.50"
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "endpoint": "AUTHORIZATION",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "205.00",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345"
9
+ },
10
+ "Card": {
11
+ "Type": "AX",
12
+ "CardNumber": "375000026600004",
13
+ "ExpirationMonth": "05",
14
+ "ExpirationYear": "16"
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "endpoint": "AUTH_REVERSAL",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_AR_5.litleOnlineResponse.authorizationResponse.TransactionID}",
6
+ "TransactionAmount": "100.00"
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "endpoint": "AUTHORIZATION",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "20.90",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345",
9
+ "PartialApprovedFlag": "false"
10
+ },
11
+ "Card": {
12
+ "PaypageRegistrationID": "${eProtect.4457010000000009}"
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "endpoint": "SALE",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "20.90",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345",
9
+ "PartialApprovedFlag": "false"
10
+ },
11
+ "Card": {
12
+ "PaypageRegistrationID": "${eProtect.5435101234510196}"
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "endpoint": "TOKENIZATION",
3
+ "body": {
4
+ "Card": {
5
+ "PaypageRegistrationID": "${eProtect.6011010140000004}"
6
+ },
7
+ "Transaction": {
8
+ "CustomerID": "123"
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "endpoint": "AUTHORIZATION",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "20.90",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345",
9
+ "PartialApprovedFlag": "false"
10
+ },
11
+ "PaymentAccount": {
12
+ "PaymentAccountID": "#{L_EP_1.litleOnlineResponse.authorizationResponse.tokenResponse.PaymentAccountID}"
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "endpoint": "SALE",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "20.90",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345",
9
+ "PartialApprovedFlag": "false"
10
+ },
11
+ "PaymentAccount": {
12
+ "PaymentAccountID": "#{L_EP_2.litleOnlineResponse.saleResponse.tokenResponse.PaymentAccountID}"
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "endpoint": "AUTHORIZATION",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "20.90",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345",
9
+ "PartialApprovedFlag": "false"
10
+ },
11
+ "Card": {
12
+ "PaypageRegistrationID": "cDZJcmd1VjNlYXNaSlRMTGpocVZQY1NWVXE4ZW5UTko4NU9KK3p1L1p1Vzg4YzVPQVlSUHNITG1JN2I0NzlyTg=="
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "endpoint": "SALE",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "20.90",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345",
9
+ "PartialApprovedFlag": "false"
10
+ },
11
+ "Card": {
12
+ "PaypageRegistrationID": "RGFQNCt6U1d1M21SeVByVTM4dHlHb1FsVkUrSmpnWXhNY0o5UkMzRlZFanZiUHVnYjN1enJXbG1WSDF4aXlNcA=="
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "endpoint": "AUTHORIZATION",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "101.00",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345",
9
+ "PartialApprovedFlag": "false"
10
+ },
11
+ "Card": {
12
+ "Type": "VI",
13
+ "CardNumber": "4457010000000009",
14
+ "ExpirationMonth": "01",
15
+ "ExpirationYear": "16",
16
+ "CVV": "349"
17
+ },
18
+ "Address": {
19
+ "BillingName": "John & Mary Smith",
20
+ "BillingAddress1": "1 Main St.",
21
+ "BillingCity": "Burlington",
22
+ "BillingState": "MA",
23
+ "BillingZipcode": "01803-3747",
24
+ "BillingCountry": "US"
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_RC_1.litleOnlineResponse.authorizationResponse.TransactionID}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CREDIT",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_RC_1A.litleOnlineResponse.captureResponse.TransactionID}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "endpoint": "AUTHORIZATION",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "101.00",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345"
9
+ },
10
+ "Card": {
11
+ "Type": "MC",
12
+ "CardNumber": "5112010000000003",
13
+ "ExpirationMonth": "02",
14
+ "ExpirationYear": "16",
15
+ "CVV": "261"
16
+ },
17
+ "Address": {
18
+ "BillingName": "Mike J. Hammer",
19
+ "BillingAddress1": "2 Main St.",
20
+ "BillingAddress2": "Apt. 222",
21
+ "BillingCity": "Riverside",
22
+ "BillingState": "RI",
23
+ "BillingZipcode": "02915",
24
+ "BillingCountry": "US"
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_RC_2.litleOnlineResponse.authorizationResponse.TransactionID}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CREDIT",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_RC_2A.litleOnlineResponse.captureResponse.TransactionID}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "endpoint": "AUTHORIZATION",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "101.00",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345"
9
+ },
10
+ "Card": {
11
+ "Type": "DI",
12
+ "CardNumber": "6011010000000003",
13
+ "ExpirationMonth": "03",
14
+ "ExpirationYear": "16",
15
+ "CVV": "758"
16
+ },
17
+ "Address": {
18
+ "BillingName": "Eileen Jones",
19
+ "BillingAddress1": "3 Main St.",
20
+ "BillingCity": "Bloomfield",
21
+ "BillingState": "CT",
22
+ "BillingZipcode": "06002",
23
+ "BillingCountry": "US"
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_RC_3.litleOnlineResponse.authorizationResponse.TransactionID}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CREDIT",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_RC_3A.litleOnlineResponse.captureResponse.TransactionID}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "endpoint": "AUTHORIZATION",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "101.00",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345"
9
+ },
10
+ "Card": {
11
+ "Type": "AX",
12
+ "CardNumber": "375001000000005",
13
+ "ExpirationMonth": "04",
14
+ "ExpirationYear": "16"
15
+ },
16
+ "Address": {
17
+ "BillingName": "Bob Black",
18
+ "BillingAddress1": "4 Main St.",
19
+ "BillingCity": "Laurel",
20
+ "BillingState": "MD",
21
+ "BillingZipcode": "20708",
22
+ "BillingCountry": "US"
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_RC_4.litleOnlineResponse.authorizationResponse.TransactionID}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CREDIT",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_RC_4A.litleOnlineResponse.captureResponse.TransactionID}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "endpoint": "AUTHORIZATION",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "101.00",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345"
9
+ },
10
+ "Card": {
11
+ "Type": "VI",
12
+ "CardNumber": "4100200300011001",
13
+ "ExpirationMonth": "05",
14
+ "ExpirationYear": "16",
15
+ "CVV": "463"
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_RC_5.litleOnlineResponse.authorizationResponse.TransactionID}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CREDIT",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{L_RC_5A.litleOnlineResponse.captureResponse.TransactionID}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "endpoint": "SALE",
3
+ "body": {
4
+ "Transaction": {
5
+ "ReferenceNumber": "1",
6
+ "TransactionAmount": "101.00",
7
+ "OrderSource": "ecommerce",
8
+ "CustomerID": "345",
9
+ "PartialApprovedFlag": "false"
10
+ },
11
+ "Card": {
12
+ "Type": "VI",
13
+ "CardNumber": "4457010000000009",
14
+ "ExpirationMonth": "01",
15
+ "ExpirationYear": "16",
16
+ "CVV": "349"
17
+ },
18
+ "Address": {
19
+ "BillingName": "John & Mary Smith",
20
+ "BillingAddress1": "1 Main St.",
21
+ "BillingCity": "Burlington",
22
+ "BillingState": "MA",
23
+ "BillingZipcode": "01803-3747",
24
+ "BillingCountry": "US"
25
+ }
26
+ }
27
+ }