CnpOnline 8.31.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG +139 -0
  3. data/CONTRIBUTORS +2 -0
  4. data/DESCRIPTION +5 -0
  5. data/LICENSE +22 -0
  6. data/README.md +72 -0
  7. data/Rakefile +89 -0
  8. data/Rakefile~ +89 -0
  9. data/SETUP.md +46 -0
  10. data/bin/Setup.rb +124 -0
  11. data/bin/sample_batch_driver.rb +123 -0
  12. data/bin/sample_driver.rb +49 -0
  13. data/lib/Communications.rb +85 -0
  14. data/lib/Configuration.rb +67 -0
  15. data/lib/EnvironmentVariables.rb +22 -0
  16. data/lib/LitleBatchRequest.rb +562 -0
  17. data/lib/LitleListeners.rb +142 -0
  18. data/lib/LitleOnline.rb +62 -0
  19. data/lib/LitleOnlineRequest.rb +297 -0
  20. data/lib/LitleRequest.rb +494 -0
  21. data/lib/LitleTransaction.rb +463 -0
  22. data/lib/LitleXmlMapper.rb +64 -0
  23. data/lib/XMLFields.rb +1869 -0
  24. data/lib/cacert.pem +3331 -0
  25. data/samples/Auth/LitleAuthReversalTransaction.rb +15 -0
  26. data/samples/Auth/LitleAuthorizationTransaction.rb +31 -0
  27. data/samples/Auth/LitlePaymentFullLifeCycle.rb +47 -0
  28. data/samples/Batch/AccountUpdate.rb +64 -0
  29. data/samples/Batch/SampleBatchDriver.rb +94 -0
  30. data/samples/Capture/LitleCaptureGivenAuthTransaction.rb +30 -0
  31. data/samples/Capture/LitleCaptureTransaction.rb +14 -0
  32. data/samples/Capture/LitleForceCaptureTransaction.rb +26 -0
  33. data/samples/Capture/LitlePartialCapture.rb +16 -0
  34. data/samples/Credit/LitleCreditTransaction.rb +16 -0
  35. data/samples/Credit/LitleRefundTransaction.rb +29 -0
  36. data/samples/Other/LitleAvsTransaction.rb +34 -0
  37. data/samples/Other/LitleVoidTransaction.rb +18 -0
  38. data/samples/Paypage/FullPaypageLifeCycle.rb +74 -0
  39. data/samples/Run_all.rb +17 -0
  40. data/samples/Sale/LitleSaleTransaction.rb +29 -0
  41. data/samples/Sale/SampleSaleTransaction.rb +24 -0
  42. data/test/certification/certTest1_base.rb +945 -0
  43. data/test/certification/certTest2_authenhanced.rb +573 -0
  44. data/test/certification/certTest3_authreversal.rb +185 -0
  45. data/test/certification/certTest4_echeck.rb +278 -0
  46. data/test/certification/certTest5_token.rb +204 -0
  47. data/test/certification/certTest_batchAll.rb +337 -0
  48. data/test/certification/ts_all.rb +33 -0
  49. data/test/functional/test_activate.rb +100 -0
  50. data/test/functional/test_activateReversal.rb +56 -0
  51. data/test/functional/test_auth.rb +298 -0
  52. data/test/functional/test_authReversal.rb +69 -0
  53. data/test/functional/test_balanceInquiry.rb +80 -0
  54. data/test/functional/test_batch.rb +164 -0
  55. data/test/functional/test_batchStream.rb +145 -0
  56. data/test/functional/test_cancelSubscription.rb +55 -0
  57. data/test/functional/test_capture.rb +84 -0
  58. data/test/functional/test_captureGivenAuth.rb +235 -0
  59. data/test/functional/test_configuration.rb +89 -0
  60. data/test/functional/test_createPlan.rb +85 -0
  61. data/test/functional/test_credit.rb +174 -0
  62. data/test/functional/test_deactivate.rb +80 -0
  63. data/test/functional/test_deactivateReversal.rb +56 -0
  64. data/test/functional/test_depositReversal.rb +56 -0
  65. data/test/functional/test_echeckCredit.rb +134 -0
  66. data/test/functional/test_echeckRedeposit.rb +88 -0
  67. data/test/functional/test_echeckSale.rb +177 -0
  68. data/test/functional/test_echeckVerification.rb +127 -0
  69. data/test/functional/test_echeckVoid.rb +41 -0
  70. data/test/functional/test_forceCapture.rb +183 -0
  71. data/test/functional/test_litle_requests.rb +356 -0
  72. data/test/functional/test_load.rb +82 -0
  73. data/test/functional/test_loadReversal.rb +56 -0
  74. data/test/functional/test_override.rb +64 -0
  75. data/test/functional/test_refundReversal.rb +56 -0
  76. data/test/functional/test_sale.rb +259 -0
  77. data/test/functional/test_token.rb +115 -0
  78. data/test/functional/test_unload.rb +82 -0
  79. data/test/functional/test_unloadReversal.rb +56 -0
  80. data/test/functional/test_updateCardValidationNumOnToken.rb +43 -0
  81. data/test/functional/test_updatePlan.rb +58 -0
  82. data/test/functional/test_updateSubscription.rb +76 -0
  83. data/test/functional/test_xmlfields.rb +427 -0
  84. data/test/functional/ts_all.rb +66 -0
  85. data/test/unit/test_LitleAUBatch.rb +216 -0
  86. data/test/unit/test_LitleBatchRequest.rb +643 -0
  87. data/test/unit/test_LitleOnlineRequest.rb +295 -0
  88. data/test/unit/test_LitleRequest.rb +316 -0
  89. data/test/unit/test_LitleTransaction.rb +397 -0
  90. data/test/unit/test_activate.rb +92 -0
  91. data/test/unit/test_activateReversal.rb +44 -0
  92. data/test/unit/test_auth.rb +421 -0
  93. data/test/unit/test_authReversal.rb +82 -0
  94. data/test/unit/test_balanceInquiry.rb +52 -0
  95. data/test/unit/test_cancelSubscription.rb +43 -0
  96. data/test/unit/test_capture.rb +73 -0
  97. data/test/unit/test_captureGivenAuth.rb +188 -0
  98. data/test/unit/test_createPlan.rb +52 -0
  99. data/test/unit/test_credit.rb +342 -0
  100. data/test/unit/test_deactivate.rb +52 -0
  101. data/test/unit/test_deactivateReversal.rb +44 -0
  102. data/test/unit/test_depositReversal.rb +44 -0
  103. data/test/unit/test_echeckCredit.rb +71 -0
  104. data/test/unit/test_echeckRedeposit.rb +94 -0
  105. data/test/unit/test_echeckSale.rb +71 -0
  106. data/test/unit/test_echeckVerification.rb +71 -0
  107. data/test/unit/test_echeckVoid.rb +54 -0
  108. data/test/unit/test_forceCapture.rb +145 -0
  109. data/test/unit/test_load.rb +53 -0
  110. data/test/unit/test_loadReversal.rb +44 -0
  111. data/test/unit/test_refundReversal.rb +44 -0
  112. data/test/unit/test_sale.rb +465 -0
  113. data/test/unit/test_token.rb +144 -0
  114. data/test/unit/test_unload.rb +53 -0
  115. data/test/unit/test_unloadReversal.rb +44 -0
  116. data/test/unit/test_updateCardValidationNumOnToken.rb +80 -0
  117. data/test/unit/test_updatePlan.rb +45 -0
  118. data/test/unit/test_updateSubscription.rb +172 -0
  119. data/test/unit/test_xmlfields.rb +2930 -0
  120. data/test/unit/ts_unit.rb +65 -0
  121. metadata +255 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 77616340b8281f768185936a7fadfffee31dc657b009e3a6f5d9bf433c6ca271
4
+ data.tar.gz: 2d615e52b3b2350a215bbf5e594f5ccfc9d8daf26c8611ccf4c83954e4263b10
5
+ SHA512:
6
+ metadata.gz: c3137b60e13600eba22d9aa59a32571f56a44e9ded5783f4d3cb4985b9fc3e7a9dc31bb91a7aeffc11a8cb023e17b327cbeb221d437bb00344358eb27faafd18
7
+ data.tar.gz: db1418fa473a74ffbc35a334aa41f7232c11a17292e5aaa8a4c9af69b8edd2fd9e26e33d3bbd9225d7612216301d07aea30bb7c291c9bec491f5af30d2cb4a41
@@ -0,0 +1,139 @@
1
+ = LitleOnline CHANGELOG
2
+
3
+ == version 8.31.0(March 29, 2018)
4
+ * Feature : Processingtype elements added to sale, authorization, and forcecapture
5
+
6
+ ==version 8.29.2
7
+ HTTP timeout set to 500ms
8
+
9
+ == version 8.29.1(March 11, 2015)
10
+ * BugFix: fixed a XML field bug in Account Update Token
11
+
12
+ == version 8.29.0(January 28, 2015)
13
+ * Feature : Added support for Applepay and Secondary Amount
14
+ * BugFix: fix an incorrect mapping in fraud check option fields for Sale transaction
15
+
16
+ == version 8.27.0(August 27, 2014)
17
+ * Feature : Added samples for all kinds of transactions
18
+
19
+ == version 8.25.1(July 18,2014)
20
+ * Feature : Added Env variables to setup ruby config
21
+
22
+
23
+ == version 8.25.0 (March 17, 2014)
24
+ * Feature: Added support for ROAM: Authorization, ForceCapture, CaptureGivenAuth, Sale, Credit
25
+
26
+ == version 8.24.0 (March 17, 2014)
27
+ * Feature: add triggered rules for advancedFraudCheckResult
28
+
29
+ == Version 8.23.0 (March 14, 2014)
30
+ * Feature: advancedFraudChecks now available in authorization and sale
31
+ * Feature: catLevel (Cardholder Activated Terminal) now available in pos
32
+ * Feature: advancedFraudResults now available in fraudResult
33
+
34
+ == Version 8.22.0 (March 14, 2014)
35
+ * Feature: Support for the following new gift card transactions:
36
+ ActivateReversal, DeactivateReversal, LoadReversal, RefundReversal,
37
+ UnloadReversal, DepositReversal
38
+ * Feature: UpdateSubscription now can take token or paypage updates, and
39
+ can return token in the response
40
+ * Feature: Support for virtualGiftCard in giftCard activations and can be returned in EnhancedAuthResponses
41
+ * Feature: Gift Card responses can be returned from AuthReversal
42
+
43
+ == Version 8.21.0 (March 13, 2014)
44
+ * Feature: Support for the following new recurring transactions:
45
+ CreatePlan, UpdatePlan
46
+ * Feature: Support for the following new gift card transactions:
47
+ Activate, Deactivate, Load, Unload, Balance Inquiry
48
+ * Feature: Gift card responses are now returned as part of
49
+ authorzationResponse, authReversalResponse, captureResponse,
50
+ forceCapture, captureGivenAuthResponse, saleResponse, creditResponse
51
+ * Feature: fraudResult is now returned as part of captureResponse,
52
+ forceCaptureResponse, captureGivenAuthResponse, creditResponse
53
+
54
+ == Version 8.20.0 (December 17, 2013)
55
+ * Feature: More initial support for Recurring, including the ability to update or cancel subscriptions
56
+
57
+ == Version 8.19.0 (March 07, 2014)
58
+ * Feature: Added deptRepayment as a choice for authorizations, forceCapture, captureGivenAuth, sale
59
+ * Feature: More initial support for Recurring, including a backwards incompatible changing a field from numberOfPaymentsRemaining to numberOfPayments
60
+
61
+ == Version 8.18.0 (July 31, 2013)
62
+ * Feature: Add initial support for Recurring
63
+ * Feature: Add support for Gift Card as a card type (GC)
64
+
65
+ == Version 8.17.0 (June 13, 2013)
66
+ * Feature: Batch support - see https://gist.github.com/litleSDK/5687345, https://gist.github.com/litleSDK/5714803 and https://gist.github.com/litleSDK/5714847
67
+ * Feature: Add support for surcharging credit card transactions
68
+ * Feature: Add support for specifying the terminalId on a pos transaction
69
+ * Feature: Add support for pos transactions on tied refunds
70
+ * Cleanup: Drop support for 1.8.6
71
+
72
+ == Version 8.16.0 (March 29, 2013)
73
+
74
+ * Feature: Merged pull request #7 from pierre to add external logging support
75
+ * Feature: Add recyling to voidResponse
76
+ * 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
77
+ * Bugfix: Add Connection: close header to reduce the chance of 403s from reaching the ip connection limit
78
+ * Bugfix: Merged pull request #5 from simeonwillbanks to fix a typo in sale when payPalOrderComplete is specified
79
+
80
+ == Version 8.15.0 (January 31, 2013)
81
+
82
+ * Feature: Add merchantData to echeck verifications and echeck redeposits
83
+
84
+ == Version 8.14.0 (January 31, 2013)
85
+
86
+ * Feature: Temporary storage of card validation num on tokens
87
+ * Feature: Updating card validation numbers on tokens
88
+
89
+ == Version 8.13.2 (June 28, 2012)
90
+
91
+ * Feature: Most schema validations are now handled by ruby code and throw errors.
92
+ * Bugfix: Remove hardcoded username/password fields
93
+
94
+ == Version 8.13.1 (May 22, 2012)
95
+
96
+ * Feature: Echeck Void now supported
97
+
98
+ == Version 8.13.0 (May 18, 2012)
99
+
100
+ * Feature: Authorizations and Sales can accept an optional fraudFilterOverride parameter
101
+
102
+ == Version 8.12.4 (May 17, 2012)
103
+
104
+ * Bugfix: Use modules so that we are not polluting the global namespace
105
+
106
+ == Version 8.12.3 (May 17, 2012)
107
+
108
+ * Bugfix: Allow use without the configuration file
109
+
110
+ == Version 8.12.2 (May 16, 2012)
111
+
112
+ * Bugfix: Fix bug where rails "capture" method was interfering with Litle's "capture"
113
+
114
+ == Version 8.12.1 (May 15, 2012)
115
+
116
+ * Feature: Support Ruby 1.8.7
117
+ * Bugfix: Add support for line item data and tax detail to enhanced auth
118
+
119
+ == Version 8.12.0 (April 16, 2012)
120
+
121
+ * Feature: Add support for actionReason on credit
122
+ * Feature: Track SDK Usage
123
+ * Bugfix: Add support for MerchantData on auth and sale
124
+
125
+ == Version 8.10.3 (April 16, 2012)
126
+
127
+ * Feature: Support Ruby 1.8.6
128
+ * Bugfix: Setup sandbox url was incorrect
129
+ * Cleanup: Support newest sandbox conventions
130
+
131
+ == Version 8.10.1 (March 2, 2012)
132
+
133
+ * Feature: Allow use without the configuration file
134
+ * Bugfix: Reauth works
135
+ * Cleanup: Use ruby conventions
136
+
137
+ == Version 8.10.0 (February 17, 2012)
138
+
139
+ * Initial release
@@ -0,0 +1,2 @@
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
@@ -0,0 +1,5 @@
1
+ Litle Online Ruby SDK created for version 8.18 of Litle XML format, see the XSD schema for specific fields that are supported by this format.
2
+
3
+ This gem contains an application interface in the Ruby programming language created by Litle & Co.
4
+
5
+
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2011 Litle & Co.
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,72 @@
1
+ Vantiv eCommerce Ruby SDK
2
+ =====================
3
+ #### Warning:
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.
5
+ About Vantiv eCommerce
6
+ ------------
7
+ [Vantiv eCommerce](http://www.vantiv.com) powers the payment processing engines for leading companies that sell directly to consumers through internet retail, direct response marketing (TV, radio and telephone), and online services. Vantiv eCommerce is the leading authority in card-not-present (CNP) commerce, transaction processing and merchant services.
8
+
9
+
10
+ About this SDK
11
+ --------------
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.
13
+
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.
15
+
16
+ This SDK was implemented to support the Ruby programming language and was created by Vantiv eCommerce. Its intended use is for online transaction processing utilizing your account on the Vantiv eCommerce payments engine.
17
+
18
+ See LICENSE file for details on using this software.
19
+
20
+ Source Code available from : https://github.com/LitleCo/litle-sdk-for-ruby
21
+
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
23
+
24
+ Setup
25
+ -----
26
+
27
+ 1) Install the LitleOnline Ruby gem from rubygems.org, this will install the latest SDK gem in your Ruby environment.
28
+ Our gem is available publicly from rubygems.org. Use the command below to install.
29
+
30
+ >sudo gem install LitleOnline
31
+
32
+ Note: If you get errors, you might have to configure your proxy.
33
+
34
+ 2) Once the gem is installed run our setup program to generate a configuration file. The configuration file resides in your home directory
35
+ $HOME/.litle_SDK_config.yml
36
+
37
+ For more details on setup see our instructions [here](https://github.com/LitleCo/litle-sdk-for-ruby/blob/master/SETUP.md)
38
+
39
+ 3.) Create a ruby file similar to:
40
+
41
+ ```ruby
42
+ require 'LitleOnline'
43
+ include LitleOnline
44
+
45
+ # Visa $10 Sale
46
+ litleSaleTxn = {
47
+ 'reportGroup'=>'rpt_grp',
48
+ 'orderId'=>'1234567',
49
+ 'card'=>{
50
+ 'type'=>'VI',
51
+ 'number' =>'4100000000000001',
52
+ 'expDate' =>'1212'},
53
+ 'orderSource'=>'ecommerce',
54
+ 'amount'=>'1000'
55
+ }
56
+
57
+ # Peform the transaction on the Litle Platform
58
+ response = LitleOnlineRequest.new.sale(litleSaleTxn)
59
+
60
+ # display result
61
+ puts "Message: "+ response.message
62
+ puts "Litle Transaction ID: "+ response.saleResponse.litleTxnId
63
+ ```
64
+
65
+ 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
66
+
67
+ Message: Valid Format
68
+ Litle Transaction ID: <your-numeric-litle-txn-id>
69
+
70
+ More examples (including batch processing with sFTP) can be found here [Ruby Gists](https://gist.github.com/litleSDK)
71
+
72
+ Please contact Vantiv eCommerce with any further questions. You can reach us at sdksupport@vantiv.com.
@@ -0,0 +1,89 @@
1
+ # Copyright (c) 2011 Litle & Co.
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person
4
+ # obtaining a copy of this software and associated documentation
5
+ # files (the "Software"), to deal in the Software without
6
+ # restriction, including without limitation the rights to use,
7
+ # copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the
9
+ # Software is furnished to do so, subject to the following
10
+ # conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ # NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ # OTHER DEALINGS IN THE SOFTWARE.
23
+ require 'rubygems'
24
+ require 'rubygems/package_task'
25
+ require 'rake/testtask'
26
+ require 'rake/clean'
27
+
28
+ spec = Gem::Specification.new do |s|
29
+ FileUtils.rm_rf('pkg')
30
+ s.name = 'CnpOnline'
31
+ s.summary = 'Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv eCommerce XML format v8.31'
32
+ s.description = File.read(File.join(File.dirname(__FILE__), 'DESCRIPTION'))
33
+ s.requirements =
34
+ ['Contact sdksupport@vantiv.com for more information']
35
+ s.version = '8.31.0'
36
+ s.author = 'Vantiv eCommerce'
37
+ s.email = 'sdksupport@vantiv.com'
38
+ s.homepage = 'http://www.vantiv.com/developers'
39
+ s.platform = Gem::Platform::RUBY
40
+ s.required_ruby_version = '>=1.8.7'
41
+ s.files = Dir['**/**']
42
+ s.executables = ['sample_driver.rb', 'Setup.rb']
43
+ s.test_files = Dir['test/unit/ts_unit.rb']
44
+ s.has_rdoc = true
45
+ s.add_dependency('xml-object')
46
+ s.add_dependency('xml-mapping')
47
+ s.add_dependency('net-sftp')
48
+ s.add_dependency('libxml-ruby')
49
+ s.add_dependency('crack')
50
+ s.add_development_dependency('mocha')
51
+ end
52
+
53
+ Gem::PackageTask.new(spec) do |pkg|
54
+ pkg.gem_spec = spec
55
+ pkg.need_zip = true
56
+ pkg.need_tar = true
57
+ end
58
+
59
+ namespace :test do
60
+ Rake::TestTask.new do |t|
61
+ t.libs << '.'
62
+ t.name = 'unit'
63
+ t.test_files = FileList['test/unit/ts_unit.rb']
64
+ t.verbose = true
65
+ end
66
+
67
+ Rake::TestTask.new do |t|
68
+ t.libs << '.'
69
+ t.name = 'functional'
70
+ t.test_files = FileList['test/functional/ts_all.rb']
71
+ t.verbose = true
72
+ end
73
+
74
+ Rake::TestTask.new do |t|
75
+ t.libs << '.'
76
+ t.name = 'certification'
77
+ t.test_files = FileList['test/certification/certTest*.rb']
78
+ t.verbose = true
79
+ end
80
+
81
+ Rake::TestTask.new do |t|
82
+ t.libs << '.'
83
+ t.name = 'all'
84
+ t.test_files = FileList['test/**/*.rb']
85
+ t.verbose = true
86
+ end
87
+ end
88
+
89
+ task default: 'gem'
@@ -0,0 +1,89 @@
1
+ # Copyright (c) 2011 Litle & Co.
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person
4
+ # obtaining a copy of this software and associated documentation
5
+ # files (the "Software"), to deal in the Software without
6
+ # restriction, including without limitation the rights to use,
7
+ # copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the
9
+ # Software is furnished to do so, subject to the following
10
+ # conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ # NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ # OTHER DEALINGS IN THE SOFTWARE.
23
+ require 'rubygems'
24
+ require 'rubygems/package_task'
25
+ require 'rake/testtask'
26
+ require 'rake/clean'
27
+
28
+ spec = Gem::Specification.new do |s|
29
+ FileUtils.rm_rf('pkg')
30
+ s.name = 'VantivCnp'
31
+ s.summary = 'Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv eCommerce XML format v8.31'
32
+ s.description = File.read(File.join(File.dirname(__FILE__), 'DESCRIPTION'))
33
+ s.requirements =
34
+ ['Contact sdksupport@vantiv.com for more information']
35
+ s.version = '8.31.0'
36
+ s.author = 'Vantiv eCommerce'
37
+ s.email = 'sdksupport@vantiv.com'
38
+ s.homepage = 'http://www.vantiv.com/developers'
39
+ s.platform = Gem::Platform::RUBY
40
+ s.required_ruby_version = '>=1.8.7'
41
+ s.files = Dir['**/**']
42
+ s.executables = ['sample_driver.rb', 'Setup.rb']
43
+ s.test_files = Dir['test/unit/ts_unit.rb']
44
+ s.has_rdoc = true
45
+ s.add_dependency('xml-object')
46
+ s.add_dependency('xml-mapping')
47
+ s.add_dependency('net-sftp')
48
+ s.add_dependency('libxml-ruby')
49
+ s.add_dependency('crack')
50
+ s.add_development_dependency('mocha')
51
+ end
52
+
53
+ Gem::PackageTask.new(spec) do |pkg|
54
+ pkg.gem_spec = spec
55
+ pkg.need_zip = true
56
+ pkg.need_tar = true
57
+ end
58
+
59
+ namespace :test do
60
+ Rake::TestTask.new do |t|
61
+ t.libs << '.'
62
+ t.name = 'unit'
63
+ t.test_files = FileList['test/unit/ts_unit.rb']
64
+ t.verbose = true
65
+ end
66
+
67
+ Rake::TestTask.new do |t|
68
+ t.libs << '.'
69
+ t.name = 'functional'
70
+ t.test_files = FileList['test/functional/ts_all.rb']
71
+ t.verbose = true
72
+ end
73
+
74
+ Rake::TestTask.new do |t|
75
+ t.libs << '.'
76
+ t.name = 'certification'
77
+ t.test_files = FileList['test/certification/certTest*.rb']
78
+ t.verbose = true
79
+ end
80
+
81
+ Rake::TestTask.new do |t|
82
+ t.libs << '.'
83
+ t.name = 'all'
84
+ t.test_files = FileList['test/**/*.rb']
85
+ t.verbose = true
86
+ end
87
+ end
88
+
89
+ task default: 'gem'
@@ -0,0 +1,46 @@
1
+ Setting up and Configuring the Litle SDK
2
+ =========================================
3
+
4
+ Running the built in configuration file generator
5
+ -------------------------------------------------
6
+ The Ruby SDK ships with a built in program which can be used to generate your specific configuration.
7
+
8
+ This program runs as follows:
9
+
10
+ ```
11
+ >Setup.rb
12
+ Welcome to Litle Ruby_SDK
13
+ please input your user name:
14
+ test_user
15
+ please input your password:
16
+ test_password
17
+ Please choose Litle 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
23
+ Please input the proxy address, if no proxy hit enter key:
24
+
25
+ Please input the proxy port, if no proxy hit enter key:
26
+
27
+ The Litle configuration file has been generated, the file is located at: /<your-home-directory>/.litle_SDK_config.yml
28
+ ```
29
+
30
+ Modifying your configuration
31
+ ----------------------------
32
+ 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
+
34
+ Changing the location of the Litle configuration file:
35
+ ------------------------------------------------------
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
37
+
38
+ Sample configuration file contents
39
+ ----------------------------------
40
+ ```
41
+ user: test_user
42
+ password: test_password
43
+ url: https://www.testlitle.com/vap/communicator/online
44
+ proxy_addr: yourproxyserver
45
+ proxy_port: 8080
46
+ ```