CnpOnline 11.4.0 → 12.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +4 -164
  3. data/CHANGELOG~ +0 -0
  4. data/CONTRIBUTORS +0 -2
  5. data/DESCRIPTION +1 -1
  6. data/LICENSE +0 -0
  7. data/README.md +13 -15
  8. data/Rakefile +3 -2
  9. data/Rakefile~ +4 -3
  10. data/SETUP.md +13 -10
  11. data/bin/Setup.rb +26 -22
  12. data/bin/sample_batch_driver.rb +15 -15
  13. data/bin/sample_driver.rb +5 -5
  14. data/lib/{LitleBatchRequest.rb → CnpBatchRequest.rb} +68 -66
  15. data/lib/{LitleListeners.rb → CnpListeners.rb} +48 -40
  16. data/lib/{LitleOnline.rb → CnpOnline.rb} +8 -7
  17. data/lib/{LitleOnlineRequest.rb → CnpOnlineRequest.rb} +53 -53
  18. data/lib/{LitleRequest.rb → CnpRequest.rb} +186 -192
  19. data/lib/{LitleTransaction.rb → CnpTransaction.rb} +53 -52
  20. data/lib/{LitleXmlMapper.rb → CnpXmlMapper.rb} +7 -7
  21. data/lib/Communications.rb +8 -7
  22. data/lib/Configuration.rb +7 -6
  23. data/lib/EnvironmentVariables.rb +2 -2
  24. data/lib/XMLFields.rb +98 -108
  25. data/lib/cacert.pem +0 -0
  26. data/samples/Auth/CnpAuthReversalTransaction.rb +15 -0
  27. data/samples/Auth/{LitleAuthorizationTransaction.rb → CnpAuthorizationTransaction.rb} +4 -4
  28. data/samples/Auth/{LitlePaymentFullLifeCycle.rb → CnpPaymentFullLifeCycle.rb} +11 -11
  29. data/samples/Batch/AccountUpdate.rb +11 -11
  30. data/samples/Batch/SampleBatchDriver.rb +16 -16
  31. data/samples/Capture/{LitleCaptureGivenAuthTransaction.rb → CnpCaptureGivenAuthTransaction.rb} +4 -4
  32. data/samples/Capture/CnpCaptureTransaction.rb +14 -0
  33. data/samples/Capture/{LitleForceCaptureTransaction.rb → CnpForceCaptureTransaction.rb} +5 -5
  34. data/samples/Capture/CnpPartialCapture.rb +16 -0
  35. data/samples/Credit/CnpCreditTransaction.rb +16 -0
  36. data/samples/Credit/{LitleRefundTransaction.rb → CnpRefundTransaction.rb} +4 -4
  37. data/samples/Other/{LitleAvsTransaction.rb → CnpAvsTransaction.rb} +4 -4
  38. data/samples/Other/CnpVoidTransaction.rb +19 -0
  39. data/samples/Paypage/FullPaypageLifeCycle.rb +16 -16
  40. data/samples/Run_all.rb +12 -12
  41. data/samples/Sale/{LitleSaleTransaction.rb → CnpSaleTransaction.rb} +4 -4
  42. data/samples/Sale/SampleSaleTransaction.rb +5 -5
  43. data/test/certification/certTest1_base.rb +104 -103
  44. data/test/certification/certTest2_authenhanced.rb +90 -88
  45. data/test/certification/certTest3_authreversal.rb +29 -28
  46. data/test/certification/certTest4_echeck.rb +22 -20
  47. data/test/certification/certTest5_token.rb +51 -49
  48. data/test/certification/certTest_batchAll.rb +60 -60
  49. data/test/certification/ts_all.rb +1 -1
  50. data/test/functional/test_activate.rb +9 -8
  51. data/test/functional/test_activateReversal.rb +5 -5
  52. data/test/functional/test_auth.rb +31 -30
  53. data/test/functional/test_authReversal.rb +8 -8
  54. data/test/functional/test_balanceInquiry.rb +6 -6
  55. data/test/functional/test_batch.rb +32 -32
  56. data/test/functional/test_batchStream.rb +14 -14
  57. data/test/functional/test_cancelSubscription.rb +4 -4
  58. data/test/functional/test_capture.rb +14 -14
  59. data/test/functional/test_captureGivenAuth.rb +16 -16
  60. data/test/functional/test_configuration.rb +26 -26
  61. data/test/functional/test_createPlan.rb +5 -5
  62. data/test/functional/test_credit.rb +13 -33
  63. data/test/functional/test_deactivate.rb +6 -6
  64. data/test/functional/test_deactivateReversal.rb +5 -5
  65. data/test/functional/test_depositReversal.rb +5 -5
  66. data/test/functional/test_echeckCredit.rb +20 -20
  67. data/test/functional/test_echeckRedeposit.rb +16 -16
  68. data/test/functional/test_echeckSale.rb +35 -35
  69. data/test/functional/test_echeckVerification.rb +17 -17
  70. data/test/functional/test_echeckVoid.rb +4 -4
  71. data/test/functional/test_forceCapture.rb +21 -21
  72. data/test/functional/test_fraudCheck.rb +6 -5
  73. data/test/functional/test_giftCardAuthReversal.rb +5 -5
  74. data/test/functional/test_giftCardCapture.rb +5 -5
  75. data/test/functional/test_giftCardCredit.rb +5 -5
  76. data/test/functional/test_litle_requests.rb +101 -99
  77. data/test/functional/test_load.rb +6 -6
  78. data/test/functional/test_loadReversal.rb +5 -5
  79. data/test/functional/test_override.rb +9 -9
  80. data/test/functional/{test_pgp_litle_requests.rb → test_pgp_cnp_requests.rb} +61 -60
  81. data/test/functional/test_queryTransaction.rb +10 -10
  82. data/test/functional/test_refundReversal.rb +5 -5
  83. data/test/functional/test_sale.rb +36 -36
  84. data/test/functional/test_token.rb +10 -10
  85. data/test/functional/test_unload.rb +6 -6
  86. data/test/functional/test_unloadReversal.rb +5 -5
  87. data/test/functional/test_updateCardValidationNumOnToken.rb +4 -4
  88. data/test/functional/test_updatePlan.rb +4 -4
  89. data/test/functional/test_updateSubscription.rb +5 -5
  90. data/test/functional/test_wallet.rb +5 -5
  91. data/test/functional/test_xmlfields.rb +29 -69
  92. data/test/functional/ts_all.rb +2 -2
  93. data/test/unit/test_LitleAUBatch.rb +15 -15
  94. data/test/unit/test_LitleBatchRequest.rb +42 -76
  95. data/test/unit/test_LitleOnlineRequest.rb +38 -38
  96. data/test/unit/test_LitleRequest.rb +47 -47
  97. data/test/unit/test_LitleTransaction.rb +34 -34
  98. data/test/unit/test_LitleXmlMapper.rb +27 -27
  99. data/test/unit/test_activate.rb +8 -8
  100. data/test/unit/test_activateReversal.rb +5 -5
  101. data/test/unit/test_auth.rb +43 -43
  102. data/test/unit/test_authReversal.rb +14 -14
  103. data/test/unit/test_balanceInquiry.rb +4 -4
  104. data/test/unit/test_cancelSubscription.rb +4 -4
  105. data/test/unit/test_capture.rb +20 -20
  106. data/test/unit/test_captureGivenAuth.rb +22 -22
  107. data/test/unit/test_createPlan.rb +4 -4
  108. data/test/unit/test_credit.rb +43 -43
  109. data/test/unit/test_deactivate.rb +6 -6
  110. data/test/unit/test_deactivateReversal.rb +5 -5
  111. data/test/unit/test_depositReversal.rb +5 -5
  112. data/test/unit/test_echeckCredit.rb +16 -16
  113. data/test/unit/test_echeckRedeposit.rb +19 -19
  114. data/test/unit/test_echeckSale.rb +16 -16
  115. data/test/unit/test_echeckVerification.rb +11 -11
  116. data/test/unit/test_echeckVoid.rb +8 -8
  117. data/test/unit/test_forceCapture.rb +19 -19
  118. data/test/unit/test_fraudCheck.rb +4 -4
  119. data/test/unit/test_giftCardAuthReversal.rb +5 -5
  120. data/test/unit/test_giftCardCapture.rb +5 -5
  121. data/test/unit/test_giftCardCredit.rb +5 -5
  122. data/test/unit/test_load.rb +4 -4
  123. data/test/unit/test_loadReversal.rb +5 -5
  124. data/test/unit/{test_pgp_LitleRequest → test_pgp_CnpRequest.rb} +32 -32
  125. data/test/unit/test_queryTransaction.rb +8 -8
  126. data/test/unit/test_refundReversal.rb +5 -5
  127. data/test/unit/test_sale.rb +64 -64
  128. data/test/unit/test_token.rb +13 -13
  129. data/test/unit/test_unload.rb +4 -4
  130. data/test/unit/test_unloadReversal.rb +5 -5
  131. data/test/unit/test_updateCardValidationNumOnToken.rb +16 -16
  132. data/test/unit/test_updatePlan.rb +4 -4
  133. data/test/unit/test_updateSubscription.rb +11 -11
  134. data/test/unit/test_wallet.rb +13 -13
  135. data/test/unit/test_xmlfields.rb +119 -119
  136. data/test/unit/ts_unit.rb +6 -6
  137. metadata +35 -26
  138. data/samples/Auth/LitleAuthReversalTransaction.rb +0 -15
  139. data/samples/Capture/LitleCaptureTransaction.rb +0 -14
  140. data/samples/Capture/LitlePartialCapture.rb +0 -16
  141. data/samples/Credit/LitleCreditTransaction.rb +0 -16
  142. data/samples/Other/LitleVoidTransaction.rb +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7208945e0ed36984ca3dce4bb08fa204f3bfc13b9c610eea4fb6394e60537059
4
- data.tar.gz: 6eff86ac54c6e26e845ab636ae0b865a3682585856cad5b7c6ac7b9d871ceda0
3
+ metadata.gz: 277b5d4a525a38c248d36ff659facfceac3a814785b734c7a731ce75f0e9c344
4
+ data.tar.gz: a3dee466b206254c26615f8b5e30cda596801f499be41597ed8473a93b57145a
5
5
  SHA512:
6
- metadata.gz: 12e058a60c489b8c76d490b1b433eb9c1b16c1f3f1294c1aacf29afef20ca0dd96e573f0043da92c2bda79efb4261b57d05c85da1a8536664f251f5039ee25db
7
- data.tar.gz: 66e5c5996e7e85131939189d1baf21007b7ea807f2782c4a03598c61ad7e0767e5a30ccd0fe1bf65a8cd2705fe52cc4d1bd0cd8d9f3907b80d7e220ed44bfff8
6
+ metadata.gz: bf9e56e2325846980ab520936c8189938cfe2f2870c2ad17525fe0ef37ec5980046529c631dab00115f47bbd4381bb666b8f007cb45bff54af2f653f0330635f
7
+ data.tar.gz: d2cb122e3dcb87b849c5132d29c0b1f8d9242546b4ab3dff4c31ce5c80bef5d0b2a7f8331b7a0147ea95dd7fb01e8bb63682ff4fc44053fba35fad4110fc400b
data/CHANGELOG CHANGED
@@ -1,165 +1,5 @@
1
- = LitleOnline CHANGELOG
2
- ==Version 11.4.0 (March 28, 2018)
3
- * Feature: FastAccessFunding support
1
+ ==Version 12.1.0 (March 28, 2018)
2
+ *Feature: Added FastAcessFunding support
4
3
 
5
- ==Version 11.0.1 (March 27, 2017)
6
- * Feature: added PGP encryption support
7
-
8
- == Version 11.0 (April 12, 2017)
9
- * Feature: implement Vantiv eCommerce XMLv11.0
10
- * Feature: SEPA Support
11
- * Feature: iDEAL support
12
- * Feature: new giftCard transactions
13
- * Feature: giroPay support
14
- * Feature: Network Enhancements mandates
15
- * Feature: add support for raw network response
16
- * Bug fix: specify char encoding in HTTP header
17
-
18
-
19
- ==Version 10.1.1
20
- * Feature: support standalone FraudCheck transaction type
21
-
22
- ==Version 10.1
23
- * Feature: Support for the following new transactions:
24
- FundingInstructionVoid and QueryTransaction
25
- * Feature: 'id' field should be added to all incoming transaction types
26
- * Feature: Constraints were added to ApplepayType and ApplyPayHeaderType
27
- * Feature: Wallet class was added and new enum types were introduced
28
-
29
- ==Version 9.3.2
30
- HTTP timeout set to 500ms
31
-
32
- ==Version 9.3.1 (March 9, 2015)
33
- *Feature: PFIF instruction transaction support was added
34
-
35
- == Version 9.3.0
36
- * Feature: Applepay support was added
37
- * Feature: Secondary amount support was added
38
- * Feature: Add support for new Batch transaction in version 9.3 schema
39
-
40
- == Version 9.0.0 (August 27,2014)
41
- * Feature: Add support for new element in version 9 schema
42
-
43
- == Version 8.27.0 (August 27,2014)
44
- * Feature : Added samples for all kinds of transactions
45
-
46
- == version 8.25.1(July 18,2014)
47
- * Feature : Added Env variables to setup ruby config
48
-
49
- == version 8.25.0 (March 17, 2014)
50
- * Feature: Added support for ROAM: Authorization, ForceCapture, CaptureGivenAuth, Sale, Credit
51
-
52
- == version 8.24.0 (March 17, 2014)
53
- * Feature: add triggered rules for advancedFraudCheckResult
54
-
55
- == Version 8.23.0 (March 14, 2014)
56
- * Feature: advancedFraudChecks now available in authorization and sale
57
- * Feature: catLevel (Cardholder Activated Terminal) now available in pos
58
- * Feature: advancedFraudResults now available in fraudResult
59
-
60
- == Version 8.22.0 (March 14, 2014)
61
- * Feature: Support for the following new gift card transactions:
62
- ActivateReversal, DeactivateReversal, LoadReversal, RefundReversal,
63
- UnloadReversal, DepositReversal
64
- * Feature: UpdateSubscription now can take token or paypage updates, and
65
- can return token in the response
66
- * Feature: Support for virtualGiftCard in giftCard activations and can be returned in EnhancedAuthResponses
67
- * Feature: Gift Card responses can be returned from AuthReversal
68
-
69
- == Version 8.21.0 (March 13, 2014)
70
- * Feature: Support for the following new recurring transactions:
71
- CreatePlan, UpdatePlan
72
- * Feature: Support for the following new gift card transactions:
73
- Activate, Deactivate, Load, Unload, Balance Inquiry
74
- * Feature: Gift card responses are now returned as part of
75
- authorzationResponse, authReversalResponse, captureResponse,
76
- forceCapture, captureGivenAuthResponse, saleResponse, creditResponse
77
- * Feature: fraudResult is now returned as part of captureResponse,
78
- forceCaptureResponse, captureGivenAuthResponse, creditResponse
79
-
80
- == Version 8.20.0 (December 17, 2013)
81
- * Feature: More initial support for Recurring, including the ability to update or cancel subscriptions
82
-
83
- == Version 8.19.0 (March 07, 2014)
84
- * Feature: Added deptRepayment as a choice for authorizations, forceCapture, captureGivenAuth, sale
85
- * Feature: More initial support for Recurring, including a backwards incompatible changing a field from numberOfPaymentsRemaining to numberOfPayments
86
-
87
- == Version 8.18.0 (July 31, 2013)
88
- * Feature: Add initial support for Recurring
89
- * Feature: Add support for Gift Card as a card type (GC)
90
-
91
- == Version 8.17.0 (June 13, 2013)
92
- * Feature: Batch support - see https://gist.github.com/litleSDK/5687345, https://gist.github.com/litleSDK/5714803 and https://gist.github.com/litleSDK/5714847
93
- * Feature: Add support for surcharging credit card transactions
94
- * Feature: Add support for specifying the terminalId on a pos transaction
95
- * Feature: Add support for pos transactions on tied refunds
96
- * Cleanup: Drop support for 1.8.6
97
-
98
- == Version 8.16.0 (March 29, 2013)
99
-
100
- * Feature: Merged pull request #7 from pierre to add external logging support
101
- * Feature: Add recyling to voidResponse
102
- * Bugfix: Force the "version" attribute of a LitleOnlineRequest to be the major and minor version of the sdk submitting the transaction instead of using the value from the configuration file
103
- * Bugfix: Add Connection: close header to reduce the chance of 403s from reaching the ip connection limit
104
- * Bugfix: Merged pull request #5 from simeonwillbanks to fix a typo in sale when payPalOrderComplete is specified
105
-
106
- == Version 8.15.0 (January 31, 2013)
107
-
108
- * Feature: Add merchantData to echeck verifications and echeck redeposits
109
-
110
- == Version 8.14.0 (January 31, 2013)
111
-
112
- * Feature: Temporary storage of card validation num on tokens
113
- * Feature: Updating card validation numbers on tokens
114
-
115
- == Version 8.13.2 (June 28, 2012)
116
-
117
- * Feature: Most schema validations are now handled by ruby code and throw errors.
118
- * Bugfix: Remove hardcoded username/password fields
119
-
120
- == Version 8.13.1 (May 22, 2012)
121
-
122
- * Feature: Echeck Void now supported
123
-
124
- == Version 8.13.0 (May 18, 2012)
125
-
126
- * Feature: Authorizations and Sales can accept an optional fraudFilterOverride parameter
127
-
128
- == Version 8.12.4 (May 17, 2012)
129
-
130
- * Bugfix: Use modules so that we are not polluting the global namespace
131
-
132
- == Version 8.12.3 (May 17, 2012)
133
-
134
- * Bugfix: Allow use without the configuration file
135
-
136
- == Version 8.12.2 (May 16, 2012)
137
-
138
- * Bugfix: Fix bug where rails "capture" method was interfering with Litle's "capture"
139
-
140
- == Version 8.12.1 (May 15, 2012)
141
-
142
- * Feature: Support Ruby 1.8.7
143
- * Bugfix: Add support for line item data and tax detail to enhanced auth
144
-
145
- == Version 8.12.0 (April 16, 2012)
146
-
147
- * Feature: Add support for actionReason on credit
148
- * Feature: Track SDK Usage
149
- * Bugfix: Add support for MerchantData on auth and sale
150
-
151
- == Version 8.10.3 (April 16, 2012)
152
-
153
- * Feature: Support Ruby 1.8.6
154
- * Bugfix: Setup sandbox url was incorrect
155
- * Cleanup: Support newest sandbox conventions
156
-
157
- == Version 8.10.1 (March 2, 2012)
158
-
159
- * Feature: Allow use without the configuration file
160
- * Bugfix: Reauth works
161
- * Cleanup: Use ruby conventions
162
-
163
- == Version 8.10.0 (February 17, 2012)
164
-
165
- * Initial release
4
+ ==Version 12.0.1 (March 16, 2017)
5
+ *Feature: Added PGP encryption/decryption support in batches
File without changes
@@ -1,2 +0,0 @@
1
- Simeon Willbanks - https://github.com/LitleCo/litle-sdk-for-ruby/pull/5
2
- Pierre-Alexandre Meyer - https://github.com/LitleCo/litle-sdk-for-ruby/pull/7
@@ -1,4 +1,4 @@
1
- Vantiv eCommerce Online Ruby SDK created for version 11.0 of Vantiv eCommerce XML format, see the XSD schema for specific fields that are supported by this format.
1
+ Vantiv eCommerce Online Ruby SDK created for version 12.0 of Vantiv eCommerce XML format, see the XSD schema for specific fields that are supported by this format.
2
2
 
3
3
  This gem contains an application interface in the Ruby programming language created by Vantiv eCommerce.
4
4
 
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Vantiv eCommerce Ruby SDK
1
+ Vantiv eCommerce Ruby SDK
2
2
  =====================
3
3
  #### Warning:
4
4
  #### All version changes require recertification to the new version. Once certified for the use of a new version, Vantiv modifies your Merchant Profile, allowing you to submit transaction to the Production Environment using the new version. Updating your code without recertification and modification of your Merchant Profile will result in transaction declines. Please consult you Implementation Analyst for additional information about this process.
@@ -9,8 +9,6 @@ About Vantiv eCommerce
9
9
 
10
10
  About this SDK
11
11
  --------------
12
- ##### No major updates are planned for this repository. SDK Version 12 and above can be found here: [cnp-sdk-for-ruby](https://github.com/Vantiv/cnp-sdk-for-ruby)
13
-
14
12
  The Vantiv eCommerce Ruby SDK is a Ruby implementation of the [Vantiv eCommerce](http://www.vantiv.com). XML API. This SDK was created to make it as easy as possible to connect process your payments with Vantiv eCommerce. This SDK utilizes the HTTPS protocol to securely connect to Vantiv eCommerce. Using the SDK requires coordination with the Vantiv eCommerce team in order to be provided with credentials for accessing our systems.
15
13
 
16
14
  Each Ruby SDK release supports all of the functionality present in the associated Vantiv eCommerce XML version (e.g., SDK v9.3.2 supports Vantiv eCommerce XML v9.3). Please see the online copy of our XSD for Vantiv eCommerce XML to get more details on what the Vantiv eCommerce payments engine supports.
@@ -19,7 +17,7 @@ This SDK was implemented to support the Ruby programming language and was create
19
17
 
20
18
  See LICENSE file for details on using this software.
21
19
 
22
- Source Code available from : https://github.com/LitleCo/litle-sdk-for-ruby
20
+ Source Code available from : [https://github.com/Vantiv/cnp-sdk-for-ruby](https://github.com/Vantiv/cnp-sdk-for-ruby)
23
21
 
24
22
  Please contact [Vantiv eCommerce](http://www.vantiv.com) to receive valid merchant credentials in order to run tests successfully or if you require assistance in any way. We are reachable at sdksupport@vantiv.com
25
23
 
@@ -34,18 +32,18 @@ Our gem is available publicly from rubygems.org. Use the command below to insta
34
32
  Note: If you get errors, you might have to configure your proxy.
35
33
 
36
34
  2) Once the gem is installed run our setup program to generate a configuration file. The configuration file resides in your home directory
37
- $HOME/.litle_SDK_config.yml
35
+ $HOME/.cnp_SDK_config.yml
38
36
 
39
- For more details on setup see our instructions [here](https://github.com/LitleCo/litle-sdk-for-ruby/blob/master/SETUP.md)
37
+ For more details on setup see our instructions [here](https://github.com/Vantiv/cnp-sdk-for-ruby/blob/master/SETUP.md)
40
38
 
41
39
  3.) Create a ruby file similar to:
42
40
 
43
41
  ```ruby
44
- require 'LitleOnline'
45
- include LitleOnline
42
+ require 'CnpOnline'
43
+ include CnpOnline
46
44
 
47
45
  # Visa $10 Sale
48
- litleSaleTxn = {
46
+ cnpSaleTxn = {
49
47
  'reportGroup'=>'rpt_grp',
50
48
  'orderId'=>'1234567',
51
49
  'card'=>{
@@ -56,19 +54,19 @@ litleSaleTxn = {
56
54
  'amount'=>'1000'
57
55
  }
58
56
 
59
- # Peform the transaction on the Litle Platform
60
- response = LitleOnlineRequest.new.sale(litleSaleTxn)
57
+ # Peform the transaction on the Cnp Platform
58
+ response = CnpOnlineRequest.new.sale(cnpSaleTxn)
61
59
 
62
60
  # display result
63
61
  puts "Message: "+ response.message
64
- puts "Litle Transaction ID: "+ response.saleResponse.litleTxnId
62
+ puts "Cnp Transaction ID: "+ response.saleResponse.cnpTxnId
65
63
  ```
66
64
 
67
- 3) Next run this file using ruby. You should see the following result provided you have connectivity to the Litle certification environment. You will see an HTTP error if you don't have access to the Litle URL
65
+ 3) Next run this file using ruby. You should see the following result provided you have connectivity to the Cnp certification environment. You will see an HTTP error if you don't have access to the Cnp URL
68
66
 
69
67
  Message: Valid Format
70
- Litle Transaction ID: <your-numeric-litle-txn-id>
68
+ Cnp Transaction ID: <your-numeric-cnp-txn-id>
71
69
 
72
- More examples (including batch processing with sFTP) can be found here [Ruby Gists](https://gist.github.com/litleSDK)
70
+ More examples can be found here [Ruby SDK](https://vantiv.github.io/ruby/#gettingStarted)
73
71
 
74
72
  Please contact Vantiv eCommerce with any further questions. You can reach us at sdksupport@vantiv.com.
data/Rakefile CHANGED
@@ -28,11 +28,11 @@ require 'rake/clean'
28
28
  spec = Gem::Specification.new do |s|
29
29
  FileUtils.rm_rf('pkg')
30
30
  s.name = 'CnpOnline'
31
- s.summary = 'Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv eCommerce XML format v11.0'
31
+ s.summary = 'Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv eCommerce XML format v12.0'
32
32
  s.description = File.read(File.join(File.dirname(__FILE__), 'DESCRIPTION'))
33
33
  s.requirements =
34
34
  ['Contact sdksupport@vantiv.com for more information']
35
- s.version = '11.4.0'
35
+ s.version = '12.1.0'
36
36
  s.author = 'Vantiv - eCommerce'
37
37
  s.email = 'sdksupport@vantiv.com'
38
38
  s.homepage = 'https://developer.vantiv.com/community/ecommerce/pages/sdks#jive_content_id_Ruby_SDK'
@@ -47,6 +47,7 @@ spec = Gem::Specification.new do |s|
47
47
  s.add_dependency('net-sftp')
48
48
  s.add_dependency('libxml-ruby')
49
49
  s.add_dependency('crack')
50
+ s.add_dependency('iostreams')
50
51
  s.add_development_dependency('mocha')
51
52
  end
52
53
 
data/Rakefile~ CHANGED
@@ -27,12 +27,12 @@ require 'rake/clean'
27
27
 
28
28
  spec = Gem::Specification.new do |s|
29
29
  FileUtils.rm_rf('pkg')
30
- s.name = 'LitleOnline'
31
- s.summary = 'Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv eCommerce XML format v11.0'
30
+ s.name = 'CnpOnline'
31
+ s.summary = 'Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv eCommerce XML format v12.0'
32
32
  s.description = File.read(File.join(File.dirname(__FILE__), 'DESCRIPTION'))
33
33
  s.requirements =
34
34
  ['Contact sdksupport@vantiv.com for more information']
35
- s.version = '11.4.0'
35
+ s.version = '12.0.0'
36
36
  s.author = 'Vantiv - eCommerce'
37
37
  s.email = 'sdksupport@vantiv.com'
38
38
  s.homepage = 'https://developer.vantiv.com/community/ecommerce/pages/sdks#jive_content_id_Ruby_SDK'
@@ -47,6 +47,7 @@ spec = Gem::Specification.new do |s|
47
47
  s.add_dependency('net-sftp')
48
48
  s.add_dependency('libxml-ruby')
49
49
  s.add_dependency('crack')
50
+ s.add_dependency('iostreams')
50
51
  s.add_development_dependency('mocha')
51
52
  end
52
53
 
data/SETUP.md CHANGED
@@ -14,33 +14,36 @@ please input your user name:
14
14
  test_user
15
15
  please input your password:
16
16
  test_password
17
- Please choose Vantiv eCommerce url from the following list (example: 'cert') or directly input another URL:
18
- cert => https://cert.litle.com/vap/communicator/online
19
- precert => https://precert.litle.com/vap/communicator/online
20
- production1 => https://payments.litle.com/vap/communicator/online
21
- production2 => https://payments2.litle.com/vap/communicator/online
22
- cert
17
+ Please choose Vantiv eCommerce url from the following list (example: 'prelive') or directly input another URL:
18
+ sandbox => hhttps://www.testvantivcnp.com/sandbox/new/sandbox/communicator/online
19
+ prelive => https://payments.vantivprelive.com/vap/communicator/online
20
+ postlive => https://payments.vantivpostlive.com/vap/communicator/online
21
+ production => https://payments.vantivcnp.com/vap/communicator/online
22
+ transact_prelive => https://transact.vantivprelive.com/vap/communicator/online
23
+ transact_postlive => https://transact.vantivpostlive.com/vap/communicator/online
24
+ transact_production => https://transact.vantivcnp.com/vap/communicator/online
25
+ sandbox
23
26
  Please input the proxy address, if no proxy hit enter key:
24
27
 
25
28
  Please input the proxy port, if no proxy hit enter key:
26
29
 
27
- The Vantiv eCommerce configuration file has been generated, the file is located at: /<your-home-directory>/.litle_SDK_config.yml
30
+ The Vantiv eCommerce configuration file has been generated, the file is located at: /<your-home-directory>/.cnp_SDK_config.yml
28
31
  ```
29
32
 
30
33
  Modifying your configuration
31
34
  ----------------------------
32
35
  You may change the configuration values at anytime by running Setup.rb again, or simpy opening the configuration file directly in the editor of your choice and changing the appropriate fields.
33
36
 
34
- Changing the location of the Litle configuration file:
37
+ Changing the location of the Cnp configuration file:
35
38
  ------------------------------------------------------
36
- NOTICE you can set the environment variable $LITLE_CONFIG_DIR to locate your configuration file in a location other than the $HOME Directory, the the file will reside in $LITLE_CONFIG_DIR/.litle_SDK_config.yml
39
+ NOTICE you can set the environment variable $CNP_CONFIG_DIR to locate your configuration file in a location other than the $HOME Directory, the the file will reside in $CNP_CONFIG_DIR/.cnp_SDK_config.yml
37
40
 
38
41
  Sample configuration file contents
39
42
  ----------------------------------
40
43
  ```
41
44
  user: test_user
42
45
  password: test_password
43
- url: https://www.testlitle.com/vap/communicator/online
46
+ url: https://www.testcnp.com/vap/communicator/online
44
47
  proxy_addr: yourproxyserver
45
48
  proxy_port: 8080
46
49
  ```
@@ -47,7 +47,7 @@ class Setup
47
47
  f.puts ' DEFAULT: ' + gets
48
48
  f.puts "default_report_group: 'Default Report Group'"
49
49
  puts "Please choose Vantiv eCommerce url from the following list (example: 'prelive') or directly input another URL:
50
- sandbox => https://www.testvantivcnp.com/sandbox/communicator/online
50
+ sandbox => hhttps://www.testvantivcnp.com/sandbox/new/sandbox/communicator/online
51
51
  prelive => https://payments.vantivprelive.com/vap/communicator/online
52
52
  postlive => https://payments.vantivpostlive.com/vap/communicator/online
53
53
  production => https://payments.vantivcnp.com/vap/communicator/online
@@ -72,6 +72,10 @@ transact_production => https://transact.vantivcnp.com/vap/communicator/online"
72
72
  f.puts 'printxml: false'
73
73
  # default http timeout set to 500 ms
74
74
  f.puts 'timeout: 500'
75
+
76
+ puts 'Delete batch files after sending request/processing response (true/false) (false by default): '
77
+ deleteBatchFiles = (gets.chomp() == 'true')
78
+ f.puts "deleteBatchFiles: #{deleteBatchFiles}"
75
79
  puts 'Use PGP encryption for sending batch files through sftp (true/false) (No encryption by default): '
76
80
  useEncryption = (gets.chomp() == 'true')
77
81
  f.puts "useEncryption: #{useEncryption}"
@@ -87,7 +91,7 @@ transact_production => https://transact.vantivcnp.com/vap/communicator/online"
87
91
  key_id = key_info[0][:key_id]
88
92
  f.puts "vantivPublicKeyID: " + key_id
89
93
  puts "Enter passphrase of your merchant key for decrypting responses: "
90
- f.puts "passphrase: " + gets
94
+ f.puts "passphrase: " + gets.chomp()
91
95
  end
92
96
  end
93
97
  end
@@ -96,22 +100,22 @@ transact_production => https://transact.vantivcnp.com/vap/communicator/online"
96
100
  @handle.close
97
101
  end
98
102
 
99
- def Setup.choice(litle_env)
100
- litle_online_ctx = 'vap/communicator/online'
101
- if litle_env == "sandbox\n"
103
+ def Setup.choice(cnp_env)
104
+ cnp_online_ctx = 'vap/communicator/online'
105
+ if cnp_env == "sandbox\n"
102
106
  return 'https://www.testvantivcnp.com/sandbox/communicator/online'
103
- elsif litle_env == "prelive\n"
104
- return 'https://payments.vantivprelive.com/' + litle_online_ctx
105
- elsif litle_env == "postlive\n"
106
- return 'https://payments.vantivpostlive.com/' + litle_online_ctx
107
- elsif litle_env == "production\n"
108
- return 'https://payments.vantivcnp.com/' + litle_online_ctx
109
- elsif litle_env == "transact_production\n"
110
- return 'https://transact.vantivcnp.com/' + litle_online_ctx
111
- elsif litle_env == "transact_prelive\n"
112
- return 'https://transact.vantivprelive.com/' + litle_online_ctx
113
- elsif litle_env == "transact_postlive\n"
114
- return 'https://transact.vantivpostlive.com/' + litle_online_ctx
107
+ elsif cnp_env == "prelive\n"
108
+ return 'https://payments.vantivprelive.com/' + cnp_online_ctx
109
+ elsif cnp_env == "postlive\n"
110
+ return 'https://payments.vantivpostlive.com/' + cnp_online_ctx
111
+ elsif cnp_env == "production\n"
112
+ return 'https://payments.vantivcnp.com/' + cnp_online_ctx
113
+ elsif cnp_env == "transact_production\n"
114
+ return 'https://transact.vantivcnp.com/' + cnp_online_ctx
115
+ elsif cnp_env == "transact_prelive\n"
116
+ return 'https://transact.vantivprelive.com/' + cnp_online_ctx
117
+ elsif cnp_env == "transact_postlive\n"
118
+ return 'https://transact.vantivpostlive.com/' + cnp_online_ctx
115
119
  else
116
120
  return 'https://www.testvantivcnp.com/sandbox/communicator/online'
117
121
  end
@@ -121,19 +125,19 @@ end
121
125
  #
122
126
  #
123
127
  # Optionally enable the configuration to reside in a custom location
124
- # if the $LITLE_CONFIG_DIR directory is set
128
+ # if the $CNP_CONFIG_DIR directory is set
125
129
  #
126
130
 
127
- # make the config.yml file in the LITLE_CONFIG_DIR directory or HOME directory
128
- if !(ENV['LITLE_CONFIG_DIR'].nil?)
129
- path = ENV['LITLE_CONFIG_DIR']
131
+ # make the config.yml file in the CNP_CONFIG_DIR directory or HOME directory
132
+ if !(ENV['CNP_CONFIG_DIR'].nil?)
133
+ path = ENV['CNP_CONFIG_DIR']
130
134
  else
131
135
  path = ENV['HOME']
132
136
  end
133
137
 
134
138
  # make the config.yml file hidden
135
139
  # create a config file contain all the configuration data
136
- config_file = path + '/.litle_SDK_config.yml'
140
+ config_file = path + '/.cnp_SDK_config.yml'
137
141
  f = Setup.new(config_file)
138
142
 
139
143
  # return the path of the config file and the path file