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.
- checksums.yaml +4 -4
- data/.codeclimate.yml +16 -0
- data/.env.example +4 -2
- data/.rubocop.yml +1157 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +10 -0
- data/README.md +42 -29
- data/bin/console +5 -3
- data/bin/generate_sandbox_fixtures +5 -3
- data/bin/paypage_server +5 -3
- data/cert_fixtures/{L_AU_1.json → ACCOUNT_UPDATER_100.json} +0 -0
- data/cert_fixtures/{L_AU_3.json → ACCOUNT_UPDATER_100A.json} +0 -0
- data/cert_fixtures/{L_AU_7.json → ACCOUNT_UPDATER_100B.json} +1 -1
- data/cert_fixtures/{L_AU_2.json → ACCOUNT_UPDATER_101.json} +0 -0
- data/cert_fixtures/{L_AU_4.json → ACCOUNT_UPDATER_101A.json} +0 -0
- data/cert_fixtures/{L_AU_5.json → ACCOUNT_UPDATER_102.json} +0 -0
- data/cert_fixtures/{L_AU_6.json → ACCOUNT_UPDATER_103.json} +0 -0
- data/cert_fixtures/{L_AC_1.json → AUTH_CAPTURE_1.json} +0 -0
- data/cert_fixtures/AUTH_CAPTURE_1A.json +8 -0
- data/cert_fixtures/{L_AC_2.json → AUTH_CAPTURE_2.json} +0 -0
- data/cert_fixtures/AUTH_CAPTURE_2A.json +8 -0
- data/cert_fixtures/{L_AC_3.json → AUTH_CAPTURE_3.json} +0 -0
- data/cert_fixtures/AUTH_CAPTURE_3A.json +8 -0
- data/cert_fixtures/{L_AC_4.json → AUTH_CAPTURE_4.json} +0 -0
- data/cert_fixtures/AUTH_CAPTURE_4A.json +8 -0
- data/cert_fixtures/{L_AC_5.json → AUTH_CAPTURE_5.json} +0 -0
- data/cert_fixtures/AUTH_CAPTURE_5A.json +8 -0
- data/cert_fixtures/{L_AC_6.json → AUTH_CAPTURE_6.json} +0 -0
- data/cert_fixtures/{L_AC_7.json → AUTH_CAPTURE_7.json} +0 -0
- data/cert_fixtures/{L_AC_8.json → AUTH_CAPTURE_8.json} +0 -0
- data/cert_fixtures/{L_AC_9.json → AUTH_CAPTURE_9.json} +0 -0
- data/cert_fixtures/{L_AR_1.json → AUTH_REVERSAL_32.json} +0 -0
- data/cert_fixtures/{L_AR_1A.json → AUTH_REVERSAL_32A.json} +1 -1
- data/cert_fixtures/AUTH_REVERSAL_32B.json +8 -0
- data/cert_fixtures/{L_AR_2.json → AUTH_REVERSAL_33.json} +0 -0
- data/cert_fixtures/AUTH_REVERSAL_33A.json +8 -0
- data/cert_fixtures/{L_AR_3.json → AUTH_REVERSAL_34.json} +0 -0
- data/cert_fixtures/AUTH_REVERSAL_34A.json +8 -0
- data/cert_fixtures/{L_AR_4.json → AUTH_REVERSAL_35.json} +0 -0
- data/cert_fixtures/{L_AR_4A.json → AUTH_REVERSAL_35A.json} +1 -1
- data/cert_fixtures/{L_AR_4B.json → AUTH_REVERSAL_35B.json} +1 -1
- data/cert_fixtures/{L_AR_5.json → AUTH_REVERSAL_36.json} +0 -0
- data/cert_fixtures/{L_AR_5A.json → AUTH_REVERSAL_36A.json} +1 -1
- data/cert_fixtures/{L_RC_1.json → CREDIT_1.json} +0 -0
- data/cert_fixtures/CREDIT_1A.json +8 -0
- data/cert_fixtures/CREDIT_1B.json +8 -0
- data/cert_fixtures/{L_RC_2.json → CREDIT_2.json} +0 -0
- data/cert_fixtures/CREDIT_2A.json +8 -0
- data/cert_fixtures/CREDIT_2B.json +8 -0
- data/cert_fixtures/{L_RC_3.json → CREDIT_3.json} +0 -0
- data/cert_fixtures/CREDIT_3A.json +8 -0
- data/cert_fixtures/CREDIT_3B.json +8 -0
- data/cert_fixtures/{L_RC_4.json → CREDIT_4.json} +0 -0
- data/cert_fixtures/CREDIT_4A.json +8 -0
- data/cert_fixtures/CREDIT_4B.json +8 -0
- data/cert_fixtures/{L_RC_5.json → CREDIT_5.json} +0 -0
- data/cert_fixtures/CREDIT_5A.json +8 -0
- data/cert_fixtures/CREDIT_5B.json +8 -0
- data/cert_fixtures/{L_RC_6.json → SALE_1.json} +0 -0
- data/cert_fixtures/{L_S_2.json → SALE_2.json} +0 -0
- data/cert_fixtures/{L_S_3.json → SALE_3.json} +0 -0
- data/cert_fixtures/{L_S_4.json → SALE_4.json} +0 -0
- data/cert_fixtures/{L_S_5.json → SALE_5.json} +0 -0
- data/cert_fixtures/{L_S_6.json → SALE_6.json} +0 -0
- data/cert_fixtures/{L_S_7.json → SALE_7.json} +0 -0
- data/cert_fixtures/{L_S_8.json → SALE_8.json} +0 -0
- data/cert_fixtures/{L_S_9.json → SALE_9.json} +0 -0
- data/cert_fixtures/{L_S_1.json → SECURITY_CODE_FILTER_R1.json} +9 -9
- data/cert_fixtures/SECURITY_CODE_FILTER_R2.json +27 -0
- data/cert_fixtures/{L_T_1.json → TOKENIZATION_1.json} +0 -0
- data/cert_fixtures/{L_T_10.json → TOKENIZATION_10.json} +0 -0
- data/cert_fixtures/{L_T_11.json → TOKENIZATION_11.json} +0 -0
- data/cert_fixtures/{L_T_2.json → TOKENIZATION_2.json} +0 -0
- data/cert_fixtures/{L_T_3.json → TOKENIZATION_3.json} +0 -0
- data/cert_fixtures/{L_T_4.json → TOKENIZATION_4.json} +0 -0
- data/cert_fixtures/{L_T_6.json → TOKENIZATION_6.json} +0 -0
- data/cert_fixtures/{L_T_7.json → TOKENIZATION_7.json} +0 -0
- data/cert_fixtures/{L_T_8.json → TOKENIZATION_8.json} +0 -0
- data/cert_fixtures/{L_T_9.json → TOKENIZATION_9.json} +1 -1
- data/cert_fixtures/{L_V_1.json → VOID_1.json} +0 -0
- data/cert_fixtures/VOID_1A.json +8 -0
- data/cert_fixtures/VOID_1B.json +8 -0
- data/cert_fixtures/VOID_1C.json +8 -0
- data/cert_fixtures/{L_V_2.json → VOID_2.json} +0 -0
- data/cert_fixtures/VOID_2A.json +8 -0
- data/cert_fixtures/{L_V_3.json → VOID_3.json} +0 -0
- data/cert_fixtures/VOID_3A.json +8 -0
- data/cert_fixtures/{L_V_4.json → VOID_4.json} +0 -0
- data/cert_fixtures/VOID_4A.json +8 -0
- data/cert_fixtures/{L_EP_1.json → ePROTECT_1.json} +0 -0
- data/cert_fixtures/{L_EP_2.json → ePROTECT_2.json} +0 -0
- data/cert_fixtures/{L_EP_3.json → ePROTECT_3.json} +0 -0
- data/cert_fixtures/{L_EP_4.json → ePROTECT_4.json} +1 -1
- data/cert_fixtures/{L_EP_5.json → ePROTECT_5.json} +1 -1
- data/cert_fixtures/{L_EP_6.json → ePROTECT_6.json} +0 -0
- data/cert_fixtures/{L_EP_7.json → ePROTECT_7.json} +0 -0
- data/exe/vantiv-certify-app +18 -12
- data/lib/monkey_patches/representable/xml.rb +12 -0
- data/lib/vantiv.rb +39 -14
- data/lib/vantiv/api.rb +13 -1
- data/lib/vantiv/api/account_updater_response.rb +24 -29
- data/lib/vantiv/api/address.rb +8 -0
- data/lib/vantiv/api/apple_pay_response.rb +9 -0
- data/lib/vantiv/api/capture_response.rb +1 -1
- data/lib/vantiv/api/card.rb +47 -0
- data/lib/vantiv/api/cardholder_authentication.rb +11 -0
- data/lib/vantiv/api/fraud_result.rb +7 -0
- data/lib/vantiv/api/live_transaction_response.rb +4 -5
- data/lib/vantiv/api/payment_account.rb +11 -0
- data/lib/vantiv/api/request.rb +72 -33
- data/lib/vantiv/api/request_body.rb +100 -97
- data/lib/vantiv/api/request_body_representer.rb +54 -0
- data/lib/vantiv/api/request_body_representer_xml.rb +19 -0
- data/lib/vantiv/api/response.rb +9 -29
- data/lib/vantiv/api/response_body.rb +12 -0
- data/lib/vantiv/api/response_body_representer.rb +23 -0
- data/lib/vantiv/api/response_body_representer_xml.rb +25 -0
- data/lib/vantiv/api/tied_transaction_response.rb +5 -5
- data/lib/vantiv/api/tokenization_response.rb +15 -9
- data/lib/vantiv/api/transaction.rb +42 -0
- data/lib/vantiv/api/transaction_request_representer_xml.rb +57 -0
- data/lib/vantiv/api/transaction_response.rb +9 -0
- data/lib/vantiv/api/transaction_response_representer.rb +64 -0
- data/lib/vantiv/api/transaction_response_representer_xml.rb +54 -0
- data/lib/vantiv/certification/paypage_server.rb +13 -2
- data/lib/vantiv/certification/response_cache.rb +4 -12
- data/lib/vantiv/certification/validation_test_runner.rb +29 -10
- data/lib/vantiv/mocked_sandbox.rb +3 -2
- data/lib/vantiv/mocked_sandbox/api_request.rb +56 -27
- data/lib/vantiv/mocked_sandbox/fixture_generator.rb +56 -50
- data/lib/vantiv/mocked_sandbox/fixtures/{auth--4457000300000007.json.erb → auth--4457000300000007.json} +18 -16
- data/lib/vantiv/mocked_sandbox/fixtures/{auth--4457000301100004.json.erb → auth--4457000301100004.json} +16 -14
- data/lib/vantiv/mocked_sandbox/fixtures/{auth--4457002100000005.json.erb → auth--4457002100000005.json} +10 -10
- data/lib/vantiv/mocked_sandbox/fixtures/{auth--4457010000000009.json.erb → auth--4457010000000009.json} +11 -11
- data/lib/vantiv/mocked_sandbox/fixtures/{auth--5112000101110009.json.erb → auth--5112000101110009.json} +16 -16
- data/lib/vantiv/mocked_sandbox/fixtures/{auth--5112001600000006.json.erb → auth--5112001600000006.json} +10 -10
- data/lib/vantiv/mocked_sandbox/fixtures/{auth--5112001900000003.json.erb → auth--5112001900000003.json} +10 -10
- data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--4457000300000007.json.erb → auth_capture--4457000300000007.json} +18 -16
- data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--4457000301100004.json.erb → auth_capture--4457000301100004.json} +16 -14
- data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--4457002100000005.json.erb → auth_capture--4457002100000005.json} +10 -10
- data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--4457010000000009.json.erb → auth_capture--4457010000000009.json} +11 -11
- data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--5112000101110009.json.erb → auth_capture--5112000101110009.json} +16 -16
- data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--5112001600000006.json.erb → auth_capture--5112001600000006.json} +10 -10
- data/lib/vantiv/mocked_sandbox/fixtures/{auth_capture--5112001900000003.json.erb → auth_capture--5112001900000003.json} +10 -10
- data/lib/vantiv/mocked_sandbox/fixtures/auth_reversal.json +21 -0
- data/lib/vantiv/mocked_sandbox/fixtures/capture.json +21 -0
- data/lib/vantiv/mocked_sandbox/fixtures/credit.json +21 -0
- data/lib/vantiv/mocked_sandbox/fixtures/refund--4457000300000007.json +22 -0
- data/lib/vantiv/mocked_sandbox/fixtures/refund--4457000301100004.json +22 -0
- data/lib/vantiv/mocked_sandbox/fixtures/refund--4457002100000005.json +22 -0
- data/lib/vantiv/mocked_sandbox/fixtures/refund--4457010000000009.json +22 -0
- data/lib/vantiv/mocked_sandbox/fixtures/refund--5112000101110009.json +22 -0
- data/lib/vantiv/mocked_sandbox/fixtures/refund--5112001600000006.json +22 -0
- data/lib/vantiv/mocked_sandbox/fixtures/refund--5112001900000003.json +22 -0
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize--RGFQNCt6U1d1M21SeVByVTM4dHlHb1FsVkUrSmpnWXhNY0o5UkMzRlZFanZiUHVnYjN1enJXbG1WSDF4aXlNc.json +17 -0
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize--mocked-valid-temporary-token.json +23 -0
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize--pDZJcmd1VjNlYXNaSlRMTGpocVZQY1NWVXE4Z W5UTko4NU9KK3p1L1p1Vzg4YzVPQVlSUHNITG1 JN2I0Nzl.json +17 -0
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457000300000007.json +23 -0
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457000301100004.json +23 -0
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457002100000005.json +23 -0
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457010000000009.json +23 -0
- data/lib/vantiv/mocked_sandbox/fixtures/{tokenize_by_direct_post--4457010010900010.json.erb → tokenize_by_direct_post--4457010010900010.json} +8 -8
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112000101110009.json +23 -0
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001600000006.json +23 -0
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001900000003.json +23 -0
- data/lib/vantiv/mocked_sandbox/fixtures/void.json +21 -0
- data/lib/vantiv/mocked_sandbox/mocked_response_representer.rb +11 -0
- data/lib/vantiv/paypage.rb +5 -1
- data/lib/vantiv/test_temporary_token.rb +20 -0
- data/lib/vantiv/version.rb +1 -1
- data/vantiv-ruby.gemspec +5 -1
- metadata +191 -129
- data/cert_fixtures/L_AC_1A.json +0 -8
- data/cert_fixtures/L_AC_2A.json +0 -8
- data/cert_fixtures/L_AC_3A.json +0 -8
- data/cert_fixtures/L_AC_4A.json +0 -8
- data/cert_fixtures/L_AC_5A.json +0 -8
- data/cert_fixtures/L_AR_1B.json +0 -8
- data/cert_fixtures/L_AR_2A.json +0 -8
- data/cert_fixtures/L_AR_3A.json +0 -8
- data/cert_fixtures/L_RC_1A.json +0 -8
- data/cert_fixtures/L_RC_1B.json +0 -8
- data/cert_fixtures/L_RC_2A.json +0 -8
- data/cert_fixtures/L_RC_2B.json +0 -8
- data/cert_fixtures/L_RC_3A.json +0 -8
- data/cert_fixtures/L_RC_3B.json +0 -8
- data/cert_fixtures/L_RC_4A.json +0 -8
- data/cert_fixtures/L_RC_4B.json +0 -8
- data/cert_fixtures/L_RC_5A.json +0 -8
- data/cert_fixtures/L_RC_5B.json +0 -8
- data/cert_fixtures/L_RC_6A.json +0 -8
- data/cert_fixtures/L_RC_7.json +0 -26
- data/cert_fixtures/L_RC_7A.json +0 -8
- data/cert_fixtures/L_RC_8.json +0 -18
- data/cert_fixtures/L_V_1A.json +0 -8
- data/cert_fixtures/L_V_1B.json +0 -8
- data/cert_fixtures/L_V_1C.json +0 -8
- data/cert_fixtures/L_V_2A.json +0 -8
- data/cert_fixtures/L_V_3A.json +0 -8
- data/cert_fixtures/L_V_4A.json +0 -8
- data/lib/vantiv/api/request_body_generator.rb +0 -43
- data/lib/vantiv/mocked_sandbox/dynamic_response_body.rb +0 -40
- data/lib/vantiv/mocked_sandbox/fixtures/auth_reversal.json.erb +0 -21
- data/lib/vantiv/mocked_sandbox/fixtures/capture.json.erb +0 -21
- data/lib/vantiv/mocked_sandbox/fixtures/credit.json.erb +0 -21
- data/lib/vantiv/mocked_sandbox/fixtures/refund--4457000300000007.json.erb +0 -22
- data/lib/vantiv/mocked_sandbox/fixtures/refund--4457000301100004.json.erb +0 -22
- data/lib/vantiv/mocked_sandbox/fixtures/refund--4457002100000005.json.erb +0 -22
- data/lib/vantiv/mocked_sandbox/fixtures/refund--4457010000000009.json.erb +0 -22
- data/lib/vantiv/mocked_sandbox/fixtures/refund--5112000101110009.json.erb +0 -22
- data/lib/vantiv/mocked_sandbox/fixtures/refund--5112001600000006.json.erb +0 -22
- data/lib/vantiv/mocked_sandbox/fixtures/refund--5112001900000003.json.erb +0 -22
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457000300000007.json.erb +0 -23
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457000301100004.json.erb +0 -23
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457002100000005.json.erb +0 -23
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457010000000009.json.erb +0 -23
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112000101110009.json.erb +0 -23
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001600000006.json.erb +0 -23
- data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001900000003.json.erb +0 -23
- data/lib/vantiv/mocked_sandbox/fixtures/void.json.erb +0 -21
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.1
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
27
|
-
config.
|
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
|
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 -
|
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
|
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
|
-
|
49
|
-
|
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 `
|
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 -
|
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
|
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
|
-
|
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
|
-
|
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
|
|
data/bin/console
CHANGED
@@ -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.
|
11
|
-
config.
|
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.
|
11
|
-
config.
|
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
|
|
data/bin/paypage_server
CHANGED
@@ -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.
|
12
|
-
config.
|
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
|
|
File without changes
|
File without changes
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"PartialApprovedFlag": "false"
|
10
10
|
},
|
11
11
|
"PaymentAccount": {
|
12
|
-
"PaymentAccountID": "#{
|
12
|
+
"PaymentAccountID": "#{ACCOUNT_UPDATER_100A.body.sale_response.token_response.payment_account_id}"
|
13
13
|
},
|
14
14
|
"Card": {
|
15
15
|
"ExpirationMonth": "01",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"endpoint": "AUTH_REVERSAL",
|
3
3
|
"body": {
|
4
4
|
"Transaction": {
|
5
|
-
"TransactionID": "#{
|
5
|
+
"TransactionID": "#{AUTH_REVERSAL_35.body.authorization_response.transaction_id}",
|
6
6
|
"TransactionAmount": "50.50"
|
7
7
|
}
|
8
8
|
}
|
File without changes
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"endpoint": "AUTH_REVERSAL",
|
3
3
|
"body": {
|
4
4
|
"Transaction": {
|
5
|
-
"TransactionID": "#{
|
5
|
+
"TransactionID": "#{AUTH_REVERSAL_36.body.authorization_response.transaction_id}",
|
6
6
|
"TransactionAmount": "100.00"
|
7
7
|
}
|
8
8
|
}
|
File without changes
|
File without changes
|
File without changes
|