vantiv 0.3.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +16 -0
  3. data/.env.example +4 -2
  4. data/.rubocop.yml +1157 -0
  5. data/.ruby-version +1 -1
  6. data/CHANGELOG.md +10 -0
  7. data/README.md +42 -29
  8. data/bin/console +5 -3
  9. data/bin/generate_sandbox_fixtures +5 -3
  10. data/bin/paypage_server +5 -3
  11. data/cert_fixtures/{L_AU_1.json → ACCOUNT_UPDATER_100.json} +0 -0
  12. data/cert_fixtures/{L_AU_3.json → ACCOUNT_UPDATER_100A.json} +0 -0
  13. data/cert_fixtures/{L_AU_7.json → ACCOUNT_UPDATER_100B.json} +1 -1
  14. data/cert_fixtures/{L_AU_2.json → ACCOUNT_UPDATER_101.json} +0 -0
  15. data/cert_fixtures/{L_AU_4.json → ACCOUNT_UPDATER_101A.json} +0 -0
  16. data/cert_fixtures/{L_AU_5.json → ACCOUNT_UPDATER_102.json} +0 -0
  17. data/cert_fixtures/{L_AU_6.json → ACCOUNT_UPDATER_103.json} +0 -0
  18. data/cert_fixtures/{L_AC_1.json → AUTH_CAPTURE_1.json} +0 -0
  19. data/cert_fixtures/AUTH_CAPTURE_1A.json +8 -0
  20. data/cert_fixtures/{L_AC_2.json → AUTH_CAPTURE_2.json} +0 -0
  21. data/cert_fixtures/AUTH_CAPTURE_2A.json +8 -0
  22. data/cert_fixtures/{L_AC_3.json → AUTH_CAPTURE_3.json} +0 -0
  23. data/cert_fixtures/AUTH_CAPTURE_3A.json +8 -0
  24. data/cert_fixtures/{L_AC_4.json → AUTH_CAPTURE_4.json} +0 -0
  25. data/cert_fixtures/AUTH_CAPTURE_4A.json +8 -0
  26. data/cert_fixtures/{L_AC_5.json → AUTH_CAPTURE_5.json} +0 -0
  27. data/cert_fixtures/AUTH_CAPTURE_5A.json +8 -0
  28. data/cert_fixtures/{L_AC_6.json → AUTH_CAPTURE_6.json} +0 -0
  29. data/cert_fixtures/{L_AC_7.json → AUTH_CAPTURE_7.json} +0 -0
  30. data/cert_fixtures/{L_AC_8.json → AUTH_CAPTURE_8.json} +0 -0
  31. data/cert_fixtures/{L_AC_9.json → AUTH_CAPTURE_9.json} +0 -0
  32. data/cert_fixtures/{L_AR_1.json → AUTH_REVERSAL_32.json} +0 -0
  33. data/cert_fixtures/{L_AR_1A.json → AUTH_REVERSAL_32A.json} +1 -1
  34. data/cert_fixtures/AUTH_REVERSAL_32B.json +8 -0
  35. data/cert_fixtures/{L_AR_2.json → AUTH_REVERSAL_33.json} +0 -0
  36. data/cert_fixtures/AUTH_REVERSAL_33A.json +8 -0
  37. data/cert_fixtures/{L_AR_3.json → AUTH_REVERSAL_34.json} +0 -0
  38. data/cert_fixtures/AUTH_REVERSAL_34A.json +8 -0
  39. data/cert_fixtures/{L_AR_4.json → AUTH_REVERSAL_35.json} +0 -0
  40. data/cert_fixtures/{L_AR_4A.json → AUTH_REVERSAL_35A.json} +1 -1
  41. data/cert_fixtures/{L_AR_4B.json → AUTH_REVERSAL_35B.json} +1 -1
  42. data/cert_fixtures/{L_AR_5.json → AUTH_REVERSAL_36.json} +0 -0
  43. data/cert_fixtures/{L_AR_5A.json → AUTH_REVERSAL_36A.json} +1 -1
  44. data/cert_fixtures/{L_RC_1.json → CREDIT_1.json} +0 -0
  45. data/cert_fixtures/CREDIT_1A.json +8 -0
  46. data/cert_fixtures/CREDIT_1B.json +8 -0
  47. data/cert_fixtures/{L_RC_2.json → CREDIT_2.json} +0 -0
  48. data/cert_fixtures/CREDIT_2A.json +8 -0
  49. data/cert_fixtures/CREDIT_2B.json +8 -0
  50. data/cert_fixtures/{L_RC_3.json → CREDIT_3.json} +0 -0
  51. data/cert_fixtures/CREDIT_3A.json +8 -0
  52. data/cert_fixtures/CREDIT_3B.json +8 -0
  53. data/cert_fixtures/{L_RC_4.json → CREDIT_4.json} +0 -0
  54. data/cert_fixtures/CREDIT_4A.json +8 -0
  55. data/cert_fixtures/CREDIT_4B.json +8 -0
  56. data/cert_fixtures/{L_RC_5.json → CREDIT_5.json} +0 -0
  57. data/cert_fixtures/CREDIT_5A.json +8 -0
  58. data/cert_fixtures/CREDIT_5B.json +8 -0
  59. data/cert_fixtures/{L_RC_6.json → SALE_1.json} +0 -0
  60. data/cert_fixtures/{L_S_2.json → SALE_2.json} +0 -0
  61. data/cert_fixtures/{L_S_3.json → SALE_3.json} +0 -0
  62. data/cert_fixtures/{L_S_4.json → SALE_4.json} +0 -0
  63. data/cert_fixtures/{L_S_5.json → SALE_5.json} +0 -0
  64. data/cert_fixtures/{L_S_6.json → SALE_6.json} +0 -0
  65. data/cert_fixtures/{L_S_7.json → SALE_7.json} +0 -0
  66. data/cert_fixtures/{L_S_8.json → SALE_8.json} +0 -0
  67. data/cert_fixtures/{L_S_9.json → SALE_9.json} +0 -0
  68. data/cert_fixtures/{L_S_1.json → SECURITY_CODE_FILTER_R1.json} +9 -9
  69. data/cert_fixtures/SECURITY_CODE_FILTER_R2.json +27 -0
  70. data/cert_fixtures/{L_T_1.json → TOKENIZATION_1.json} +0 -0
  71. data/cert_fixtures/{L_T_10.json → TOKENIZATION_10.json} +0 -0
  72. data/cert_fixtures/{L_T_11.json → TOKENIZATION_11.json} +0 -0
  73. data/cert_fixtures/{L_T_2.json → TOKENIZATION_2.json} +0 -0
  74. data/cert_fixtures/{L_T_3.json → TOKENIZATION_3.json} +0 -0
  75. data/cert_fixtures/{L_T_4.json → TOKENIZATION_4.json} +0 -0
  76. data/cert_fixtures/{L_T_6.json → TOKENIZATION_6.json} +0 -0
  77. data/cert_fixtures/{L_T_7.json → TOKENIZATION_7.json} +0 -0
  78. data/cert_fixtures/{L_T_8.json → TOKENIZATION_8.json} +0 -0
  79. data/cert_fixtures/{L_T_9.json → TOKENIZATION_9.json} +1 -1
  80. data/cert_fixtures/{L_V_1.json → VOID_1.json} +0 -0
  81. data/cert_fixtures/VOID_1A.json +8 -0
  82. data/cert_fixtures/VOID_1B.json +8 -0
  83. data/cert_fixtures/VOID_1C.json +8 -0
  84. data/cert_fixtures/{L_V_2.json → VOID_2.json} +0 -0
  85. data/cert_fixtures/VOID_2A.json +8 -0
  86. data/cert_fixtures/{L_V_3.json → VOID_3.json} +0 -0
  87. data/cert_fixtures/VOID_3A.json +8 -0
  88. data/cert_fixtures/{L_V_4.json → VOID_4.json} +0 -0
  89. data/cert_fixtures/VOID_4A.json +8 -0
  90. data/cert_fixtures/{L_EP_1.json → ePROTECT_1.json} +0 -0
  91. data/cert_fixtures/{L_EP_2.json → ePROTECT_2.json} +0 -0
  92. data/cert_fixtures/{L_EP_3.json → ePROTECT_3.json} +0 -0
  93. data/cert_fixtures/{L_EP_4.json → ePROTECT_4.json} +1 -1
  94. data/cert_fixtures/{L_EP_5.json → ePROTECT_5.json} +1 -1
  95. data/cert_fixtures/{L_EP_6.json → ePROTECT_6.json} +0 -0
  96. data/cert_fixtures/{L_EP_7.json → ePROTECT_7.json} +0 -0
  97. data/exe/vantiv-certify-app +18 -12
  98. data/lib/monkey_patches/representable/xml.rb +12 -0
  99. data/lib/vantiv.rb +39 -14
  100. data/lib/vantiv/api.rb +13 -1
  101. data/lib/vantiv/api/account_updater_response.rb +24 -29
  102. data/lib/vantiv/api/address.rb +8 -0
  103. data/lib/vantiv/api/apple_pay_response.rb +9 -0
  104. data/lib/vantiv/api/capture_response.rb +1 -1
  105. data/lib/vantiv/api/card.rb +47 -0
  106. data/lib/vantiv/api/cardholder_authentication.rb +11 -0
  107. data/lib/vantiv/api/fraud_result.rb +7 -0
  108. data/lib/vantiv/api/live_transaction_response.rb +4 -5
  109. data/lib/vantiv/api/payment_account.rb +11 -0
  110. data/lib/vantiv/api/request.rb +72 -33
  111. data/lib/vantiv/api/request_body.rb +100 -97
  112. data/lib/vantiv/api/request_body_representer.rb +54 -0
  113. data/lib/vantiv/api/request_body_representer_xml.rb +19 -0
  114. data/lib/vantiv/api/response.rb +9 -29
  115. data/lib/vantiv/api/response_body.rb +12 -0
  116. data/lib/vantiv/api/response_body_representer.rb +23 -0
  117. data/lib/vantiv/api/response_body_representer_xml.rb +25 -0
  118. data/lib/vantiv/api/tied_transaction_response.rb +5 -5
  119. data/lib/vantiv/api/tokenization_response.rb +15 -9
  120. data/lib/vantiv/api/transaction.rb +42 -0
  121. data/lib/vantiv/api/transaction_request_representer_xml.rb +57 -0
  122. data/lib/vantiv/api/transaction_response.rb +9 -0
  123. data/lib/vantiv/api/transaction_response_representer.rb +64 -0
  124. data/lib/vantiv/api/transaction_response_representer_xml.rb +54 -0
  125. data/lib/vantiv/certification/paypage_server.rb +13 -2
  126. data/lib/vantiv/certification/response_cache.rb +4 -12
  127. data/lib/vantiv/certification/validation_test_runner.rb +29 -10
  128. data/lib/vantiv/mocked_sandbox.rb +3 -2
  129. data/lib/vantiv/mocked_sandbox/api_request.rb +56 -27
  130. data/lib/vantiv/mocked_sandbox/fixture_generator.rb +56 -50
  131. data/lib/vantiv/mocked_sandbox/fixtures/{auth--4457000300000007.json.erb → auth--4457000300000007.json} +18 -16
  132. data/lib/vantiv/mocked_sandbox/fixtures/{auth--4457000301100004.json.erb → auth--4457000301100004.json} +16 -14
  133. data/lib/vantiv/mocked_sandbox/fixtures/{auth--4457002100000005.json.erb → auth--4457002100000005.json} +10 -10
  134. data/lib/vantiv/mocked_sandbox/fixtures/{auth--4457010000000009.json.erb → auth--4457010000000009.json} +11 -11
  135. data/lib/vantiv/mocked_sandbox/fixtures/{auth--5112000101110009.json.erb → auth--5112000101110009.json} +16 -16
  136. data/lib/vantiv/mocked_sandbox/fixtures/{auth--5112001600000006.json.erb → auth--5112001600000006.json} +10 -10
  137. data/lib/vantiv/mocked_sandbox/fixtures/{auth--5112001900000003.json.erb → auth--5112001900000003.json} +10 -10
  138. data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--4457000300000007.json.erb → auth_capture--4457000300000007.json} +18 -16
  139. data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--4457000301100004.json.erb → auth_capture--4457000301100004.json} +16 -14
  140. data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--4457002100000005.json.erb → auth_capture--4457002100000005.json} +10 -10
  141. data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--4457010000000009.json.erb → auth_capture--4457010000000009.json} +11 -11
  142. data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--5112000101110009.json.erb → auth_capture--5112000101110009.json} +16 -16
  143. data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--5112001600000006.json.erb → auth_capture--5112001600000006.json} +10 -10
  144. data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--5112001900000003.json.erb → auth_capture--5112001900000003.json} +10 -10
  145. data/lib/vantiv/mocked_sandbox/fixtures/auth_reversal.json +21 -0
  146. data/lib/vantiv/mocked_sandbox/fixtures/capture.json +21 -0
  147. data/lib/vantiv/mocked_sandbox/fixtures/credit.json +21 -0
  148. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457000300000007.json +22 -0
  149. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457000301100004.json +22 -0
  150. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457002100000005.json +22 -0
  151. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457010000000009.json +22 -0
  152. data/lib/vantiv/mocked_sandbox/fixtures/refund--5112000101110009.json +22 -0
  153. data/lib/vantiv/mocked_sandbox/fixtures/refund--5112001600000006.json +22 -0
  154. data/lib/vantiv/mocked_sandbox/fixtures/refund--5112001900000003.json +22 -0
  155. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--RGFQNCt6U1d1M21SeVByVTM4dHlHb1FsVkUrSmpnWXhNY0o5UkMzRlZFanZiUHVnYjN1enJXbG1WSDF4aXlNc.json +17 -0
  156. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--mocked-valid-temporary-token.json +23 -0
  157. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--pDZJcmd1VjNlYXNaSlRMTGpocVZQY1NWVXE4Z W5UTko4NU9KK3p1L1p1Vzg4YzVPQVlSUHNITG1 JN2I0Nzl.json +17 -0
  158. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457000300000007.json +23 -0
  159. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457000301100004.json +23 -0
  160. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457002100000005.json +23 -0
  161. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457010000000009.json +23 -0
  162. data/lib/vantiv/mocked_sandbox/fixtures/{tokenize_by_direct_post--4457010010900010.json.erb → tokenize_by_direct_post--4457010010900010.json} +8 -8
  163. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112000101110009.json +23 -0
  164. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001600000006.json +23 -0
  165. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001900000003.json +23 -0
  166. data/lib/vantiv/mocked_sandbox/fixtures/void.json +21 -0
  167. data/lib/vantiv/mocked_sandbox/mocked_response_representer.rb +11 -0
  168. data/lib/vantiv/paypage.rb +5 -1
  169. data/lib/vantiv/test_temporary_token.rb +20 -0
  170. data/lib/vantiv/version.rb +1 -1
  171. data/vantiv-ruby.gemspec +5 -1
  172. metadata +191 -129
  173. data/cert_fixtures/L_AC_1A.json +0 -8
  174. data/cert_fixtures/L_AC_2A.json +0 -8
  175. data/cert_fixtures/L_AC_3A.json +0 -8
  176. data/cert_fixtures/L_AC_4A.json +0 -8
  177. data/cert_fixtures/L_AC_5A.json +0 -8
  178. data/cert_fixtures/L_AR_1B.json +0 -8
  179. data/cert_fixtures/L_AR_2A.json +0 -8
  180. data/cert_fixtures/L_AR_3A.json +0 -8
  181. data/cert_fixtures/L_RC_1A.json +0 -8
  182. data/cert_fixtures/L_RC_1B.json +0 -8
  183. data/cert_fixtures/L_RC_2A.json +0 -8
  184. data/cert_fixtures/L_RC_2B.json +0 -8
  185. data/cert_fixtures/L_RC_3A.json +0 -8
  186. data/cert_fixtures/L_RC_3B.json +0 -8
  187. data/cert_fixtures/L_RC_4A.json +0 -8
  188. data/cert_fixtures/L_RC_4B.json +0 -8
  189. data/cert_fixtures/L_RC_5A.json +0 -8
  190. data/cert_fixtures/L_RC_5B.json +0 -8
  191. data/cert_fixtures/L_RC_6A.json +0 -8
  192. data/cert_fixtures/L_RC_7.json +0 -26
  193. data/cert_fixtures/L_RC_7A.json +0 -8
  194. data/cert_fixtures/L_RC_8.json +0 -18
  195. data/cert_fixtures/L_V_1A.json +0 -8
  196. data/cert_fixtures/L_V_1B.json +0 -8
  197. data/cert_fixtures/L_V_1C.json +0 -8
  198. data/cert_fixtures/L_V_2A.json +0 -8
  199. data/cert_fixtures/L_V_3A.json +0 -8
  200. data/cert_fixtures/L_V_4A.json +0 -8
  201. data/lib/vantiv/api/request_body_generator.rb +0 -43
  202. data/lib/vantiv/mocked_sandbox/dynamic_response_body.rb +0 -40
  203. data/lib/vantiv/mocked_sandbox/fixtures/auth_reversal.json.erb +0 -21
  204. data/lib/vantiv/mocked_sandbox/fixtures/capture.json.erb +0 -21
  205. data/lib/vantiv/mocked_sandbox/fixtures/credit.json.erb +0 -21
  206. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457000300000007.json.erb +0 -22
  207. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457000301100004.json.erb +0 -22
  208. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457002100000005.json.erb +0 -22
  209. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457010000000009.json.erb +0 -22
  210. data/lib/vantiv/mocked_sandbox/fixtures/refund--5112000101110009.json.erb +0 -22
  211. data/lib/vantiv/mocked_sandbox/fixtures/refund--5112001600000006.json.erb +0 -22
  212. data/lib/vantiv/mocked_sandbox/fixtures/refund--5112001900000003.json.erb +0 -22
  213. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457000300000007.json.erb +0 -23
  214. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457000301100004.json.erb +0 -23
  215. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457002100000005.json.erb +0 -23
  216. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457010000000009.json.erb +0 -23
  217. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112000101110009.json.erb +0 -23
  218. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001600000006.json.erb +0 -23
  219. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001900000003.json.erb +0 -23
  220. data/lib/vantiv/mocked_sandbox/fixtures/void.json.erb +0 -21
@@ -1 +1 @@
1
- 2.2.3
1
+ 2.3.1
@@ -1,4 +1,14 @@
1
1
  Vantiv Ruby Changes
2
+ 1.0.0
3
+ -----------
4
+ - Breaking changes: replace deprecated DevHub API with XML API
5
+ - rename `Vantiv.acceptor_id` to `Vantiv.merchant_id`
6
+ - require `Vantiv.user` and `Vantiv.password` to be set
7
+ - remove `Vantiv.licence_id` (was DevHub specific)
8
+ - Implement Apple Pay
9
+ - Implement Security Code (CVV) mismatch filtering
10
+
11
+
2
12
  0.3.0
3
13
  -----------
4
14
  - Bug/fix: adds expiry arguments to the relevant methods when running the fixture generator
data/README.md CHANGED
@@ -23,10 +23,12 @@ The gem needs the following configuration to be set on app initialization. It is
23
23
 
24
24
  ```ruby
25
25
  Vantiv.configure do |config|
26
- config.license_id = ENV["VANTIV_LICENSE_ID"]
27
- config.acceptor_id = ENV["VANTIV_ACCEPTOR_ID"]
28
- config.order_source = "desired-order-source"
26
+ config.merchant_id = ENV["VANTIV_MERCHANT_ID"]
27
+ config.default_order_source = "desired-order-source"
29
28
  config.paypage_id = ENV["VANTIV_PAYPAGE_ID"]
29
+
30
+ config.user = ENV["VANTIV_USER"]
31
+ config.password = ENV["VANTIV_PASSWORD"]
30
32
 
31
33
  config.default_report_group = 'default-report-group'
32
34
  end
@@ -34,35 +36,34 @@ end
34
36
 
35
37
  ## Certification
36
38
 
37
- Vantiv's DevHub requires merchants to certify their applications for usage with their API. To make this integration process easy, the gem provides a script to run through these tests.
39
+ Vantiv requires merchants to certify their applications for usage with their API. To make this integration process easy, the gem provides a script to run through these tests.
38
40
 
39
41
  To certify your application, run the following script:
40
42
 
41
43
  ```
42
- $ bundle exec vantiv-certify-app -l sub-your-license-id-in-here -a sub-your-acceptor-id-in-here -p your-paypage-id
44
+ $ bundle exec vantiv-certify-app -a sub-your-merchant-id-in-here -p your-paypage-id -u your-user -w your-password
43
45
  ```
44
46
 
45
- A certs.txt file will be generated in the directory that the script is run, and then opened. It contains a list of DevHub Certification Test IDs and associated Request IDs, like follows:
47
+ A certs.txt file will be generated in the directory that the script is run, and then opened. It contains a list of XML Certification Order IDs and associated Transaction IDs, like follows:
46
48
 
47
49
  ```
48
- L_AC_1, request-id-for-L_AC_1-here
49
- L_AC_2, request-id-for-L_AC_2-here
50
+ AUTH_CAPTURE_1, transaction-id-for-AUTH_CAPTURE_1-here
51
+ AUTH_CAPTURE_2, transaction-id-for-AUTH_CAPTURE_2-here
50
52
  ```
51
53
 
52
- Navigate to your application's page in DevHub's developer portal (apideveloper.vantiv.com). Paste the contents of this file into the validation form input field, and then click "Validate".
53
54
 
54
55
  ### Running a subset of the certifications
55
56
 
56
- If you want to just run a subset of the certifications you can pass in the Test ID that you want to which match against using the `--filter_by` option. For example, if you only want to run the Account Updater certification, which have Test IDs that are prefixed with `L_AU`, you would filter by `AU` like follows:
57
+ If you want to just run a subset of the certifications you can pass in the Test ID that you want to which match against using the `--filter_by` option. For example, if you only want to run the Account Updater certification, which have Test IDs that are prefixed with `ACCOUNT_UPDATER`, you would filter by `ACCOUNT_UPDATER` like follows:
57
58
 
58
59
  ```
59
- $ bundle exec vantiv-certify-app -l foo -a bar -p bla --filter_by=AU
60
+ $ bundle exec vantiv-certify-app -a bar -p bla -u uzr -w pwd --filter_by=ACCOUNT_UPDATER
60
61
  ```
61
62
 
62
63
 
63
64
  ## Usage
64
65
 
65
- The vantiv gem provides a simple ruby client for interacting with Vantiv's DevHub API. This API wraps their Litle/XML API and provides an API that uses json. This gem provides a way for a merchant to:
66
+ The vantiv gem provides a simple ruby client for interacting with Vantiv's XML API. This API wraps their Litle/XML API and provides an API that uses json. This gem provides a way for a merchant to:
66
67
 
67
68
  1. Use Vantiv's eProtect feature to tokenize sensitive card information directly to Vantiv's servers.
68
69
  2. Run the following transactions on customers' accounts:
@@ -178,8 +179,6 @@ window.onFormSubmit = function(){
178
179
 
179
180
  The above example shows the basic mechanics of rendering and interacting with the payframe.
180
181
 
181
- TODO: add more infor on payframe error codes here
182
-
183
182
  Once the temporary token has been retrieved, it should be posted to the merchant server, where the gem can be used to retrieved the permanent token (PaymentAccountID).
184
183
 
185
184
  #### Retrieving a Payment Account ID
@@ -232,12 +231,25 @@ To place an authorization on a client's card, simply do:
232
231
  Vantiv.auth(
233
232
  payment_account_id: '12345', # retrieved earlier
234
233
  amount: 10000, # amount in cents, as an integer
235
- customer_id: '123',
236
- external_id: 'order123'
234
+ customer_id: '123', # unique id for the customer
235
+ order_id: 'order123', # unique id for the order
236
+ expiry_month: '11', # expiration month for payment account id
237
+ expiry_year: '2016', # expiration year for payment account id
238
+ order_source: 'applepay', # optional order source, defaults to Vantiv.default_order_source,
239
+ online_payment_cryptogram: 'online-payment-cryptogram', # optional, defaults to nil; used for Apple Pay
240
+ use_temporarily_stored_security_code: true # optional, defaults to false; used for security code matching
237
241
  )
238
-
239
242
  ```
240
243
 
244
+ #### Security Code (CVV) Matching
245
+ Security Code Matching is a feature from Vantiv that allows you to have transactions fail or "filtered" out when there is a Security Code (CVV) mismatch.
246
+
247
+ To use this feature you must first certify for it with Vantiv. Once the feature has been turned on, you can use it by setting `use_temporarily_stored_security_code` to `true` in auth or auth_capture requests that happen immediately after tokenization.
248
+
249
+ When `use_temporarily_stored_security_code` is set to `true`, `000` will be sent as the security code (CVV) in the request to Vantiv. This will tell Vantiv to look up the security code (CVV) for the payment account id that you passed it.
250
+
251
+ For PCI Compliance reasons, Vantiv is only able to temporarily store the security code (CVV) for up to ~24 hours after the card was tokenized. This means that this feature should be used immediately following the tokenziation of the card.
252
+
241
253
  Notes:
242
254
 
243
255
  1. See Tokenizing via eProtect for notes on how to retrieve a payment account id.
@@ -271,7 +283,7 @@ It is possible for a merchant to capture an amount differing from the amount pla
271
283
  ```ruby
272
284
  Vantiv.capture(
273
285
  transaction_id: 'transaction-id-from-auth',
274
- amount: 10000 #amount in cents
286
+ amount: 10000 # amount in cents
275
287
  )
276
288
  ```
277
289
 
@@ -279,7 +291,18 @@ It is possible to capture an amount exceeding the amount authorized, there are s
279
291
 
280
292
  ### Auth capture (sales)
281
293
 
282
- TODO: Add usage info
294
+ Authorizes and Captures a
295
+ ```ruby
296
+ Vantiv.auth_capture(
297
+ payment_account_id: 'payment-account-id-to-capture-from',
298
+ amount: 10000, # amount in cents,
299
+ customer_id: '123', # unique id for the customer
300
+ expiry_month: '11', # expiration month for payment account id
301
+ expiry_year: '2016', # expiration year for payment account id
302
+ order_source: 'applepay', # optional order source, defaults to Vantiv.default_order_source,
303
+ online_payment_cryptogram: 'online-payment-cryptogram' # optional online payment cryptogram; used for Apple Pay
304
+ )
305
+ ```
283
306
 
284
307
  ### Credits
285
308
 
@@ -299,16 +322,6 @@ Vantiv.credit(
299
322
 
300
323
  NOTE: Vantiv does NOT provide any transaction checking when a request is received to credit a customer. This includes even not checking that the prior transaction _even exists_. See 'Tied Transaction Error Handling' for more info.
301
324
 
302
- ### Voids
303
-
304
- > The Void transaction enables you to cancel any settlement transaction as long as the transaction has not yet settled and the original transaction occurred within the system.
305
- > Do not use Void transactions to void an Authorization. To remove an Authorization use an Authorization reversal transaction.
306
-
307
- TODO: Add usage info
308
-
309
- ### Refunds
310
-
311
- TODO: Add usage info
312
325
 
313
326
  ## Usage in non-production environments
314
327
 
@@ -7,11 +7,13 @@ require "dotenv"
7
7
  Dotenv.load
8
8
  Vantiv.configure do |config|
9
9
  config.environment = Vantiv::Environment::CERTIFICATION
10
- config.license_id = ENV["LICENSE_ID"]
11
- config.acceptor_id = ENV["ACCEPTOR_ID"]
12
- config.order_source = "ecommerce"
10
+ config.merchant_id = ENV["MERCHANT_ID"]
11
+ config.default_order_source = "ecommerce"
13
12
  config.paypage_id = ENV["PAYPAGE_ID"]
14
13
 
14
+ config.user = ENV["VANTIV_USER"]
15
+ config.password = ENV["VANTIV_PASSWORD"]
16
+
15
17
  config.default_report_group = '1'
16
18
  end
17
19
 
@@ -7,11 +7,13 @@ require "dotenv"
7
7
  Dotenv.load
8
8
  Vantiv.configure do |config|
9
9
  config.environment = Vantiv::Environment::CERTIFICATION
10
- config.license_id = ENV["LICENSE_ID"]
11
- config.acceptor_id = ENV["ACCEPTOR_ID"]
12
- config.order_source = "ecommerce"
10
+ config.merchant_id = ENV["MERCHANT_ID"]
11
+ config.default_order_source = "ecommerce"
13
12
  config.paypage_id = ENV["PAYPAGE_ID"]
14
13
 
14
+ config.user = ENV["VANTIV_USER"]
15
+ config.password = ENV["VANTIV_PASSWORD"]
16
+
15
17
  config.default_report_group = '1'
16
18
  end
17
19
 
@@ -8,11 +8,13 @@ require "vantiv/certification/paypage_server"
8
8
 
9
9
  Vantiv.configure do |config|
10
10
  config.environment = Vantiv::Environment::CERTIFICATION
11
- config.license_id = ENV["LICENSE_ID"]
12
- config.acceptor_id = ENV["ACCEPTOR_ID"]
13
- config.order_source = "ecommerce"
11
+ config.merchant_id = ENV["MERCHANT_ID"]
12
+ config.default_order_source = "ecommerce"
14
13
  config.paypage_id = ENV["PAYPAGE_ID"]
15
14
 
15
+ config.user = ENV["VANTIV_USER"]
16
+ config.password = ENV["VANTIV_PASSWORD"]
17
+
16
18
  config.default_report_group = '1'
17
19
  end
18
20
 
@@ -9,7 +9,7 @@
9
9
  "PartialApprovedFlag": "false"
10
10
  },
11
11
  "PaymentAccount": {
12
- "PaymentAccountID": "#{L_AU_3.litleOnlineResponse.saleResponse.tokenResponse.PaymentAccountID}"
12
+ "PaymentAccountID": "#{ACCOUNT_UPDATER_100A.body.sale_response.token_response.payment_account_id}"
13
13
  },
14
14
  "Card": {
15
15
  "ExpirationMonth": "01",
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{AUTH_CAPTURE_1.body.authorization_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{AUTH_CAPTURE_2.body.authorization_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{AUTH_CAPTURE_3.body.authorization_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{AUTH_CAPTURE_4.body.authorization_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{AUTH_CAPTURE_5.body.authorization_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -2,7 +2,7 @@
2
2
  "endpoint": "CAPTURE",
3
3
  "body": {
4
4
  "Transaction": {
5
- "TransactionID": "#{L_AR_1.litleOnlineResponse.authorizationResponse.TransactionID}",
5
+ "TransactionID": "#{AUTH_REVERSAL_32.body.authorization_response.transaction_id}",
6
6
  "TransactionAmount": "50.50"
7
7
  }
8
8
  }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "AUTH_REVERSAL",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{AUTH_REVERSAL_32.body.authorization_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "AUTH_REVERSAL",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{AUTH_REVERSAL_33.body.authorization_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "AUTH_REVERSAL",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{AUTH_REVERSAL_34.body.authorization_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -2,7 +2,7 @@
2
2
  "endpoint": "CAPTURE",
3
3
  "body": {
4
4
  "Transaction": {
5
- "TransactionID": "#{L_AR_4.litleOnlineResponse.authorizationResponse.TransactionID}",
5
+ "TransactionID": "#{AUTH_REVERSAL_35.body.authorization_response.transaction_id}",
6
6
  "TransactionAmount": "50.50"
7
7
  }
8
8
  }
@@ -2,7 +2,7 @@
2
2
  "endpoint": "AUTH_REVERSAL",
3
3
  "body": {
4
4
  "Transaction": {
5
- "TransactionID": "#{L_AR_4.litleOnlineResponse.authorizationResponse.TransactionID}",
5
+ "TransactionID": "#{AUTH_REVERSAL_35.body.authorization_response.transaction_id}",
6
6
  "TransactionAmount": "50.50"
7
7
  }
8
8
  }
@@ -2,7 +2,7 @@
2
2
  "endpoint": "AUTH_REVERSAL",
3
3
  "body": {
4
4
  "Transaction": {
5
- "TransactionID": "#{L_AR_5.litleOnlineResponse.authorizationResponse.TransactionID}",
5
+ "TransactionID": "#{AUTH_REVERSAL_36.body.authorization_response.transaction_id}",
6
6
  "TransactionAmount": "100.00"
7
7
  }
8
8
  }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{CREDIT_1.body.authorization_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CREDIT",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{CREDIT_1A.body.capture_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{CREDIT_2.body.authorization_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CREDIT",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{CREDIT_2A.body.capture_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CAPTURE",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{CREDIT_3.body.authorization_response.transaction_id}"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "endpoint": "CREDIT",
3
+ "body": {
4
+ "Transaction": {
5
+ "TransactionID": "#{CREDIT_3A.body.capture_response.transaction_id}"
6
+ }
7
+ }
8
+ }