LitleOnline 9.12.0 → 10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +7 -16
  3. data/CONTRIBUTORS +0 -0
  4. data/DESCRIPTION +2 -2
  5. data/LICENSE +1 -1
  6. data/README.md +9 -9
  7. data/Rakefile +9 -8
  8. data/SETUP.md +3 -3
  9. data/bin/Setup.rb +4 -4
  10. data/bin/sample_batch_driver.rb +1 -1
  11. data/bin/sample_driver.rb +1 -1
  12. data/lib/Communications.rb +7 -7
  13. data/lib/Configuration.rb +1 -1
  14. data/lib/EnvironmentVariables.rb +0 -0
  15. data/lib/LitleBatchRequest.rb +22 -8
  16. data/lib/LitleListeners.rb +9 -9
  17. data/lib/LitleOnline.rb +2 -2
  18. data/lib/LitleOnlineRequest.rb +16 -10
  19. data/lib/LitleRequest.rb +10 -10
  20. data/lib/LitleTransaction.rb +66 -64
  21. data/lib/LitleXmlMapper.rb +4 -9
  22. data/lib/XMLFields.rb +129 -116
  23. data/lib/cacert.pem +0 -0
  24. data/samples/Auth/LitleAuthReversalTransaction.rb +2 -2
  25. data/samples/Auth/LitleAuthorizationTransaction.rb +1 -0
  26. data/samples/Auth/LitlePaymentFullLifeCycle.rb +12 -6
  27. data/samples/Batch/AccountUpdate.rb +1 -0
  28. data/samples/Batch/SampleBatchDriver.rb +2 -1
  29. data/samples/Capture/LitleCaptureGivenAuthTransaction.rb +2 -1
  30. data/samples/Capture/LitleCaptureTransaction.rb +2 -2
  31. data/samples/Capture/LitleForceCaptureTransaction.rb +2 -1
  32. data/samples/Capture/LitlePartialCapture.rb +3 -3
  33. data/samples/Credit/LitleCreditTransaction.rb +2 -2
  34. data/samples/Credit/LitleRefundTransaction.rb +2 -1
  35. data/samples/Other/LitleAvsTransaction.rb +2 -1
  36. data/samples/Other/LitleVoidTransaction.rb +2 -1
  37. data/samples/Paypage/FullPaypageLifeCycle.rb +7 -2
  38. data/samples/Run_all.rb +0 -0
  39. data/samples/Sale/LitleSaleTransaction.rb +2 -1
  40. data/samples/Sale/SampleSaleTransaction.rb +2 -1
  41. data/test/certification/certTest1_base.rb +53 -52
  42. data/test/certification/certTest2_authenhanced.rb +16 -15
  43. data/test/certification/certTest3_authreversal.rb +16 -15
  44. data/test/certification/certTest4_echeck.rb +11 -10
  45. data/test/certification/certTest5_token.rb +2 -1
  46. data/test/certification/certTest_batchAll.rb +40 -16
  47. data/test/certification/ts_all.rb +1 -1
  48. data/test/functional/test_activate.rb +8 -9
  49. data/test/functional/test_activateReversal.rb +4 -7
  50. data/test/functional/test_auth.rb +50 -113
  51. data/test/functional/test_authReversal.rb +6 -5
  52. data/test/functional/test_balanceInquiry.rb +5 -5
  53. data/test/functional/test_batch.rb +1 -1
  54. data/test/functional/test_batchStream.rb +3 -5
  55. data/test/functional/test_cancelSubscription.rb +3 -5
  56. data/test/functional/test_capture.rb +6 -34
  57. data/test/functional/test_captureGivenAuth.rb +13 -55
  58. data/test/functional/test_configuration.rb +1 -1
  59. data/test/functional/test_createPlan.rb +3 -5
  60. data/test/functional/test_credit.rb +10 -17
  61. data/test/functional/test_deactivate.rb +5 -5
  62. data/test/functional/test_deactivateReversal.rb +4 -5
  63. data/test/functional/test_depositReversal.rb +5 -5
  64. data/test/functional/test_echeckCredit.rb +17 -13
  65. data/test/functional/test_echeckRedeposit.rb +7 -5
  66. data/test/functional/test_echeckSale.rb +42 -21
  67. data/test/functional/test_echeckVerification.rb +19 -20
  68. data/test/functional/test_echeckVoid.rb +3 -2
  69. data/test/functional/test_forceCapture.rb +16 -30
  70. data/test/functional/test_litle_requests.rb +5 -9
  71. data/test/functional/test_load.rb +5 -5
  72. data/test/functional/test_loadReversal.rb +4 -5
  73. data/test/functional/test_override.rb +3 -0
  74. data/test/functional/test_queryTransaction.rb +146 -0
  75. data/test/functional/test_refundReversal.rb +4 -5
  76. data/test/functional/test_sale.rb +94 -170
  77. data/test/functional/test_token.rb +9 -18
  78. data/test/functional/test_unload.rb +5 -5
  79. data/test/functional/test_unloadReversal.rb +5 -6
  80. data/test/functional/test_updateCardValidationNumOnToken.rb +2 -1
  81. data/test/functional/test_updatePlan.rb +4 -5
  82. data/test/functional/test_updateSubscription.rb +5 -5
  83. data/test/functional/test_wallet.rb +74 -0
  84. data/test/functional/test_xmlfields.rb +25 -10
  85. data/test/functional/ts_all.rb +4 -2
  86. data/test/unit/test_LitleAUBatch.rb +1 -1
  87. data/test/unit/test_LitleBatchRequest.rb +4 -4
  88. data/test/unit/test_LitleOnlineRequest.rb +54 -37
  89. data/test/unit/test_LitleRequest.rb +3 -4
  90. data/test/unit/test_LitleTransaction.rb +35 -6
  91. data/test/unit/test_activate.rb +21 -1
  92. data/test/unit/test_activateReversal.rb +1 -1
  93. data/test/unit/test_auth.rb +16 -55
  94. data/test/unit/test_authReversal.rb +1 -1
  95. data/test/unit/test_balanceInquiry.rb +1 -1
  96. data/test/unit/test_cancelSubscription.rb +1 -1
  97. data/test/unit/test_capture.rb +1 -27
  98. data/test/unit/test_captureGivenAuth.rb +18 -44
  99. data/test/unit/test_createPlan.rb +1 -1
  100. data/test/unit/test_credit.rb +3 -16
  101. data/test/unit/test_deactivate.rb +1 -1
  102. data/test/unit/test_deactivateReversal.rb +1 -1
  103. data/test/unit/test_depositReversal.rb +1 -1
  104. data/test/unit/test_echeckCredit.rb +1 -1
  105. data/test/unit/test_echeckRedeposit.rb +1 -1
  106. data/test/unit/test_echeckSale.rb +2 -2
  107. data/test/unit/test_echeckVerification.rb +1 -1
  108. data/test/unit/test_echeckVoid.rb +1 -1
  109. data/test/unit/test_forceCapture.rb +2 -20
  110. data/test/unit/test_load.rb +1 -1
  111. data/test/unit/test_loadReversal.rb +1 -1
  112. data/test/unit/test_queryTransaction.rb +122 -0
  113. data/test/unit/test_refundReversal.rb +1 -1
  114. data/test/unit/test_sale.rb +8 -73
  115. data/test/unit/test_token.rb +8 -15
  116. data/test/unit/test_unload.rb +1 -1
  117. data/test/unit/test_unloadReversal.rb +1 -1
  118. data/test/unit/test_updateCardValidationNumOnToken.rb +1 -1
  119. data/test/unit/test_updatePlan.rb +1 -1
  120. data/test/unit/test_updateSubscription.rb +1 -1
  121. data/test/unit/test_wallet.rb +262 -0
  122. data/test/unit/test_xmlfields.rb +1 -1
  123. data/test/unit/ts_unit.rb +3 -3
  124. metadata +15 -16
  125. data/temp.xml +0 -21
  126. data/test/functional/test_fraudCheck.rb +0 -77
  127. data/test/functional/test_utf8.rb +0 -44
  128. data/test/unit/test_LitleXmlMapper.rb +0 -136
  129. data/test/unit/test_fraudCheck.rb +0 -45
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9cbe83bd48316c3d23b6c9d917b0d5dc638c27d
4
- data.tar.gz: c5c97ac9a16b8788dde426b86e73a3cc73fb8c33
3
+ metadata.gz: 6d2579c938a2cd3f7b6faf95171f2e4540a12105
4
+ data.tar.gz: ce71d903457a0476d758c3ba1a5698bd1c3ed272
5
5
  SHA512:
6
- metadata.gz: f84797a1d951a8ad627b447810120efc103def3fc9c04819ddbc894413de2a6c68effb24eead03a12f8538b452b1df01a8c239b9b0571112fe44ea9b764ba932
7
- data.tar.gz: d7590a20068c15a31f4daa1b3bad01278cbed76099a3bfaf01573a314a3a5f34182ac7b4cbfa80407fc9e115bfd2b85eb10ba55406fd82f89ffeaba807c081f8
6
+ metadata.gz: d191b166b62f2b2b5b29d9a940c47e001d322ad0c2a7ae74f403c8bd82f77718719ec22372cdd6ef0899a8377bf14187197338b7f9bfcb9e65326c95132f9df7
7
+ data.tar.gz: f7e82cfd440af0d7e09f377069a5b36976bfed6464a82211bf45e8c3776b0e795db831c78b02470a497ccc8711b76cb9517ff1c7295825b27c8fc0b8c5c5a12b
data/CHANGELOG CHANGED
@@ -1,23 +1,14 @@
1
1
  = LitleOnline CHANGELOG
2
2
 
3
- ==Version 9.12.0
4
- *Feature: updated to use XML v9.12
5
- *Feature: added SEPA Direct Debit transaction support
6
- *Feature: added iDeal (Direct Debit) transaction support
7
-
8
- ==Version 9.10.0
9
- * Feature: add androidpay
10
- * Feature: add network enhancements for original txn Id and original amount
11
- * Feature: add processingType
12
- * Feature: add cardSuffix on responses
13
- * Feature: add Card Pin Support
14
- * Feature: add Wallet support
15
-
16
- ==Version 9.3.3
17
- * add fraudCheck transaction type
3
+ ==Version 10.1
4
+ * Feature: Support for the following new transactions:
5
+ FundingInstructionVoid and QueryTransaction
6
+ * Feature: 'id' field should be added to all incoming transaction types
7
+ * Feature: Constraints were added to ApplepayType and ApplyPayHeaderType
8
+ * Feature: Wallet class was added and new enum types were introduced
18
9
 
19
10
  ==Version 9.3.2
20
- * HTTP timeout set to 500ms
11
+ HTTP timeout set to 500ms
21
12
 
22
13
  ==Version 9.3.1 (March 9, 2015)
23
14
  *Feature: PFIF instruction transaction support was added
File without changes
@@ -1,5 +1,5 @@
1
- Vantiv eCommerce Ruby SDK created for version 9.10 of Vantiv eCommerce XML format, see the XSD schema for specific fields that are supported by this format.
1
+ Litle Online Ruby SDK created for version 9.3 of Litle XML format, see the XSD schema for specific fields that are supported by this format.
2
2
 
3
- This gem contains an application interface in the Ruby programming language created by Vantiv eCommerce.
3
+ This gem contains an application interface in the Ruby programming language created by Litle & Co.
4
4
 
5
5
 
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017 Vantiv eCommerce
1
+ Copyright (c) 2011 Litle & Co.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person
4
4
  obtaining a copy of this software and associated documentation
data/README.md CHANGED
@@ -1,24 +1,24 @@
1
- Vantiv eCommerce Ruby SDK
1
+ Litle Online Ruby SDK
2
2
  =====================
3
3
 
4
- About Vantiv eCommerce
4
+ About Litle
5
5
  ------------
6
- [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.
6
+ [Litle & Co.](http://www.litle.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. Litle & Co. is the leading, independent authority in card-not-present (CNP) commerce, transaction processing and merchant services.
7
7
 
8
8
 
9
9
  About this SDK
10
10
  --------------
11
- 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.
11
+ The Litle Ruby SDK is a Ruby implementation of the [Litle & Co.](http://www.litle.com). XML API. This SDK was created to make it as easy as possible to connect process your payments with Litle. This SDK utilizes the HTTPS protocol to securely connect to Litle. Using the SDK requires coordination with the Litle team in order to be provided with credentials for accessing our systems.
12
12
 
13
- 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.
13
+ Our Ruby SDK supports all of the functionality present in Litle XML v8. Please see the online copy of our XSD for Litle XML to get more details on what is supported by the Litle payments engine.
14
14
 
15
- 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.
15
+ This SDK is implemented to support the Ruby programming language and was created by Litle & Co. It is intended use is for online transactions processing utilizing your account on the Litle payments engine.
16
16
 
17
17
  See LICENSE file for details on using this software.
18
18
 
19
19
  Source Code available from : https://github.com/LitleCo/litle-sdk-for-ruby
20
20
 
21
- 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
21
+ Please contact [Litle & Co.](http://www.litle.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@litle.com
22
22
 
23
23
  Setup
24
24
  -----
@@ -61,11 +61,11 @@ puts "Message: "+ response.message
61
61
  puts "Litle Transaction ID: "+ response.saleResponse.litleTxnId
62
62
  ```
63
63
 
64
- 3) Next run this file using ruby. You should see the following result provided you have connectivity to the Vantiv eCommerce certification environment. You will see an HTTP error if you don't have access to the Vantiv eCommerce URL
64
+ 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
65
 
66
66
  Message: Valid Format
67
67
  Litle Transaction ID: <your-numeric-litle-txn-id>
68
68
 
69
69
  More examples (including batch processing with sFTP) can be found here [Ruby Gists](https://gist.github.com/litleSDK)
70
70
 
71
- Please contact Vantiv eCommerce with any further questions. You can reach us at sdksupport@vantiv.com.
71
+ Please contact Litle & Co. with any further questions. You can reach us at sdksupport@litle.com.
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
2
+ Copyright (c) 2011 Litle & Co.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -30,16 +30,17 @@ require 'rake/clean'
30
30
  spec = Gem::Specification.new do |s|
31
31
  FileUtils.rm_rf('pkg')
32
32
  s.name = "LitleOnline"
33
- s.summary = "Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv eCommerce XML format v9.12"
33
+ s.summary = "Ruby SDK produced by Vantiv eCommerce for transaction processing using Litle XML format v10.1"
34
34
  s.description = File.read(File.join(File.dirname(__FILE__), 'DESCRIPTION'))
35
35
  s.requirements =
36
- [ 'Contact sdksupport@vantiv.com for more information' ]
37
- s.version = "9.12.0"
38
- s.author = "Vantiv eCommerce"
39
- s.email = "sdksupport@vantiv.com"
40
- s.homepage = "http://www.vantiv.com/developers"
36
+ [ 'Contact sdksupport@litle.com for more information' ]
37
+ s.version = "10.1"
38
+ s.author = "Vantiv - eCommerce"
39
+ s.author = "Litle & Co"
40
+ s.email = "sdksupport@litle.com"
41
+ s.homepage = "https://www.vantiv.com/developers/ecommerce-payments#sdk-ruby"
41
42
  s.platform = Gem::Platform::RUBY
42
- s.required_ruby_version = '>=2.2.0'
43
+ s.required_ruby_version = '>=2.0.0'
43
44
  s.files = Dir['**/**']
44
45
  s.executables = [ 'sample_driver.rb', 'Setup.rb' ]
45
46
  s.test_files = Dir["test/unit/ts_unit.rb"]
data/SETUP.md CHANGED
@@ -1,4 +1,4 @@
1
- Setting up and Configuring the Vantiv eCommerce SDK
1
+ Setting up and Configuring the Litle SDK
2
2
  =========================================
3
3
 
4
4
  Running the built in configuration file generator
@@ -9,7 +9,7 @@ This program runs as follows:
9
9
 
10
10
  ```
11
11
  >Setup.rb
12
- Welcome to Vantiv eCommerce Ruby_SDK
12
+ Welcome to Litle Ruby_SDK
13
13
  please input your user name:
14
14
  test_user
15
15
  please input your password:
@@ -31,7 +31,7 @@ Modifying your configuration
31
31
  ----------------------------
32
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
33
 
34
- Changing the location of the Vantiv eCommerce configuration file:
34
+ Changing the location of the Litle configuration file:
35
35
  ------------------------------------------------------
36
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
37
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  =begin
4
- Copyright (c) 2017 Vantiv eCommerce
4
+ Copyright (c) 2011 Litle & Co.
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person
7
7
  obtaining a copy of this software and associated documentation
@@ -35,7 +35,7 @@ class Setup
35
35
  def initialize(filename)
36
36
  @handle = File.new(filename, File::CREAT|File::TRUNC|File::RDWR, 0600)
37
37
  File.open(filename, "w") do |f|
38
- puts "Welcome to Vantiv eCommerce Ruby_SDK"
38
+ puts "Welcome to Litle Ruby_SDK"
39
39
  puts "Please input your user name:"
40
40
  f.puts "user: "+ gets
41
41
  puts "Please input your password:"
@@ -46,7 +46,7 @@ class Setup
46
46
  f.puts " DEFAULT: " + gets
47
47
  f.puts "default_report_group: 'Default Report Group'"
48
48
 
49
- puts "Please choose Vantiv eCommerce url from the following list (example: 'prelive') or directly input another URL: \nsandbox => https://www.testlitle.com/sandbox/communicator/online \nprelive => https://prelive.litle.com/vap/communicator/online \npostlive => https://postlive.litle.com/vap/communicator/online \nproduction => https://payments.litle.com/vap/communicator/online \ntransact_prelive => https://transact-prelive.litle.com/vap/communicator/online \ntransact_postlive => https://transact-postlive.litle.com/vap/communicator/online \ntransact_production => https://transact.litle.com/vap/communicator/online \ntransact_betacert => https://transact-betacert.litle.com/vap/communicator/online \nbetacert => https://betacert.litle.com/vap/communicator/online"
49
+ puts "Please choose Litle url from the following list (example: 'prelive') or directly input another URL: \nsandbox => https://www.testlitle.com/sandbox/communicator/online \nprelive => https://prelive.litle.com/vap/communicator/online \npostlive => https://postlive.litle.com/vap/communicator/online \nproduction => https://payments.litle.com/vap/communicator/online \ntransact_prelive => https://transact-prelive.litle.com/vap/communicator/online \ntransact_postlive => https://transact-postlive.litle.com/vap/communicator/online \ntransact_production => https://transact.litle.com/vap/communicator/online \ntransact_betacert => https://transact-betacert.litle.com/vap/communicator/online \nbetacert => https://betacert.litle.com/vap/communicator/online"
50
50
  f.puts "url: " + Setup.choice(gets)
51
51
  puts "Please input the proxy address, if no proxy hit enter key: "
52
52
  f.puts "proxy_addr: " + gets
@@ -120,6 +120,6 @@ f = Setup.new(config_file)
120
120
 
121
121
  # return the path of the config file and the path file
122
122
  @path = File.expand_path(config_file)
123
- puts "The Vantiv eCommerce configuration file has been generated, the file is located at: " + @path
123
+ puts "The Litle configuration file has been generated, the file is located at: " + @path
124
124
  f.finished
125
125
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin
3
- Copyright (c) 2017 Vantiv eCommerce
3
+ Copyright (c) 2011 Litle & Co.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person
6
6
  obtaining a copy of this software and associated documentation
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  =begin
4
- Copyright (c) 2017 Vantiv eCommerce
4
+ Copyright (c) 2011 Litle & Co.
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person
7
7
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
2
+ Copyright (c) 2011 Litle & Co.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -67,17 +67,17 @@ end
67
67
  =begin
68
68
  NOTES ON HTTP TIMEOUT
69
69
 
70
- Vantiv eCommerce optimizes our systems to ensure the return of responses as quickly as possible, some portions of the process are beyond our control.
70
+ Litle & Co. optimizes our systems to ensure the return of responses as quickly as possible, some portions of the process are beyond our control.
71
71
  The round-trip time of an Authorization can be broken down into three parts, as follows:
72
- 1. Transmission time (across the internet) to Vantiv eCommerce and back to the merchant
72
+ 1. Transmission time (across the internet) to Litle & Co. and back to the merchant
73
73
  2. Processing time by the authorization provider
74
- 3. Processing time by Vantiv eCommerce
75
- Under normal operating circumstances, the transmission time to and from Vantiv eCommerce does not exceed 0.6 seconds
76
- and processing overhead by Vantiv eCommerce occurs in 0.1 seconds.
74
+ 3. Processing time by Litle
75
+ Under normal operating circumstances, the transmission time to and from Litle does not exceed 0.6 seconds
76
+ and processing overhead by Litle occurs in 0.1 seconds.
77
77
  Typically, the processing time by the card association or authorization provider can take between 0.5 and 3 seconds,
78
78
  but some percentage of transactions may take significantly longer.
79
79
 
80
- Because the total processing time can vary due to a number of factors, Vantiv eCommerce recommends using a minimum timeout setting of
80
+ Because the total processing time can vary due to a number of factors, Litle & Co. recommends using a minimum timeout setting of
81
81
  60 seconds to accomodate Sale transactions and 30 seconds if you are not utilizing Sale tranactions.
82
82
 
83
83
  These settings should ensure that you do not frequently disconnect prior to receiving a valid authorization causing dropped orders
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
2
+ Copyright (c) 2011 Litle & Co.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
File without changes
@@ -1,6 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
3
-
2
+ Copyright (c) 2011 Litle & Co.
4
3
  Permission is hereby granted, free of charge, to any person
5
4
  obtaining a copy of this software and associated documentation
6
5
  files (the "Software"), to deal in the Software without
@@ -9,10 +8,8 @@ copy, modify, merge, publish, distribute, sublicense, and/or sell
9
8
  copies of the Software, and to permit persons to whom the
10
9
  Software is furnished to do so, subject to the following
11
10
  conditions:
12
-
13
11
  The above copyright notice and this permission notice shall be
14
12
  included in all copies or substantial portions of the Software.
15
-
16
13
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
14
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
15
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -25,9 +22,9 @@ OTHER DEALINGS IN THE SOFTWARE.
25
22
  require_relative 'Configuration'
26
23
 
27
24
  #
28
- # This class creates a new batch to which Vantiv eCommerce XML transactions are added.
25
+ # This class creates a new batch to which Litle XML transactions are added.
29
26
  # The batch is stored in the local file system until it is ready to be sent
30
- # to Vantiv eCommerce.
27
+ # to Litle.
31
28
  #
32
29
  module LitleOnline
33
30
  class LitleBatchRequest
@@ -74,7 +71,9 @@ module LitleOnline
74
71
  :load=>{:numLoads=>0, :loadAmount=>0},
75
72
  :unload=>{:numUnloads=>0, :unloadAmount=>0},
76
73
  :numBalanceInquirys=>0,
77
- :merchantSdk=>nil
74
+ :merchantSdk=>nil,
75
+ #SDK XML 10
76
+ :numFundingInstructionVoid=>0
78
77
  }
79
78
  @litle_txn = LitleTransaction.new
80
79
  @path_to_batch = nil
@@ -381,6 +380,19 @@ module LitleOnline
381
380
 
382
381
  add_txn_to_batch(transaction, :physicalCheckCredit, options)
383
382
  end
383
+
384
+
385
+ # Adding the numfundingInstructionVoid to the batch request
386
+ # Date: 01-25-2016
387
+ # Change Type: New
388
+ # Desc: Change proposed as a part of SDK XML 10 to incorporate the feature of voiding transactions
389
+ # on request.
390
+ def funding_txn_void(options)
391
+ transaction = @litle_txn.funding_txn_void(options)
392
+ @txn_counts[:numFundingInstructionVoid] += 1
393
+
394
+ add_txn_to_batch(transaction, :fundingInstructionVoid, options)
395
+ end
384
396
 
385
397
  def payFac_debit(options)
386
398
  transaction = @litle_txn.payFac_debit(options)
@@ -503,7 +515,9 @@ module LitleOnline
503
515
  request.vendorCreditAmount = @txn_counts[:vendorCredit][:vendorCreditAmount]
504
516
  request.numPhysicalCheckCredit = @txn_counts[:physicalCheckCredit][:numPhysicalCheckCredit]
505
517
  request.physicalCheckCreditAmount = @txn_counts[:physicalCheckCredit][:physicalCheckCreditAmount]
506
-
518
+ #SDK XML 10
519
+ request.numFundingInstructionVoid = @txn_counts[:numFundingInstructionVoid]
520
+
507
521
  request.numPayFacDebit = @txn_counts[:payFacDebit][:numPayFacDebit]
508
522
  request.payFacDebitAmount = @txn_counts[:payFacDebit][:payFacDebitAmount]
509
523
  request.numSubmerchantDebit = @txn_counts[:submerchantDebit][:numSubmerchantDebit]
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
2
+ Copyright (c) 2011 Litle & Co.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -229,13 +229,13 @@ module LitleOnline
229
229
  end
230
230
  end
231
231
  end
232
-
233
- class FraudCheckListener < DefaultLitleListener
234
- def apply(duck)
235
- if(duck["type"] == "advancedFraudResult") then
236
- @action.call(duck)
237
- end
238
- end
239
- end
232
+ #
233
+ # class FraudCheckListener < DefaultLitleListener
234
+ # def apply(duck)
235
+ # if(duck["type"] == "fraudCheckResponse") then
236
+ # @action.call(duck)
237
+ # end
238
+ # end
239
+ # end
240
240
 
241
241
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
2
+ Copyright (c) 2011 Litle & Co.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -54,7 +54,7 @@ require_relative 'LitleRequest'
54
54
  require_relative 'LitleListeners'
55
55
  require_relative 'Configuration'
56
56
 
57
- #allows attribute values to be in double quotes, required by Vantiv eCommerce Server
57
+ #allows attribute values to be in double quotes, required by Litle Server
58
58
  REXML::Attribute.class_eval( %q^
59
59
  def to_string
60
60
  %Q[#@expanded_name="#{to_s().gsub(/"/, '&quot;')}"]
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
2
+ Copyright (c) 2011 Litle & Co.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
25
25
  require_relative 'Configuration'
26
26
 
27
27
  #
28
- # This class handles sending the Vantiv eCommerce online request
28
+ # This class handles sending the Litle online request
29
29
  #
30
30
  module LitleOnline
31
31
 
@@ -135,7 +135,7 @@ module LitleOnline
135
135
 
136
136
  def authorization(options)
137
137
  transaction = @litle_transaction.authorization(options)
138
-
138
+
139
139
  commit(transaction, :authorization, options)
140
140
  end
141
141
 
@@ -229,11 +229,18 @@ module LitleOnline
229
229
  commit(transaction, :echeckVoid, options)
230
230
  end
231
231
 
232
- def fraud_check_request(options)
233
- transaction = @litle_transaction.fraud_check_request(options)
234
-
235
- commit(transaction, :fraudCheck, options)
232
+ #SDK XML 10
233
+ def query_Transaction(options)
234
+ transaction = @litle_transaction.query_Transaction(options)
235
+
236
+ commit(transaction, :queryTransaction, options)
236
237
  end
238
+
239
+ # def fraud_check_request(options)
240
+ # transaction = @litle_transaction.fraud_check_request(options)
241
+ #
242
+ # commit(transaction, :fraudCheck, options)
243
+ # end
237
244
 
238
245
  private
239
246
 
@@ -258,11 +265,10 @@ module LitleOnline
258
265
 
259
266
  request.authentication = authentication
260
267
  request.merchantId = get_merchant_id(options)
261
- request.version = '9.12'
268
+ request.version = '10.1'
262
269
  request.loggedInUser = get_logged_in_user(options)
263
270
  request.xmlns = "http://www.litle.com/schema"
264
271
  request.merchantSdk = get_merchant_sdk(options)
265
-
266
272
  request
267
273
  end
268
274
 
@@ -289,7 +295,7 @@ module LitleOnline
289
295
  end
290
296
 
291
297
  def get_merchant_sdk(options)
292
- options['merchantSdk'] || 'Ruby;9.12.0'
298
+ options['merchantSdk'] || 'Ruby;10.1'
293
299
  end
294
300
 
295
301
  def get_report_group(options)
@@ -1,6 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
3
-
2
+ Copyright (c) 2011 Litle & Co.
4
3
  Permission is hereby granted, free of charge, to any person
5
4
  obtaining a copy of this software and associated documentation
6
5
  files (the "Software"), to deal in the Software without
@@ -9,10 +8,8 @@ copy, modify, merge, publish, distribute, sublicense, and/or sell
9
8
  copies of the Software, and to permit persons to whom the
10
9
  Software is furnished to do so, subject to the following
11
10
  conditions:
12
-
13
11
  The above copyright notice and this permission notice shall be
14
12
  included in all copies or substantial portions of the Software.
15
-
16
13
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
14
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
15
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -191,7 +188,7 @@ module LitleOnline
191
188
  litleRequest.authentication = authentication
192
189
  litleRequest.numBatchRequests = "0"
193
190
 
194
- litleRequest.version = '9.10'
191
+ litleRequest.version = '10.1'
195
192
  litleRequest.xmlns = "http://www.litle.com/schema"
196
193
 
197
194
 
@@ -280,6 +277,7 @@ module LitleOnline
280
277
  def send_to_litle_stream(options = {}, path = (File.dirname(@path_to_batches)))
281
278
  url = get_config(:fast_url, options)
282
279
  port = get_config(:fast_port, options)
280
+
283
281
 
284
282
  if(url == nil or url == "") then
285
283
  raise ArgumentError, "A URL for fastbatch was not specified in the config file or passed options. Reconfigure and try again."
@@ -306,20 +304,22 @@ module LitleOnline
306
304
  ssl_socket = OpenSSL::SSL::SSLSocket.new(socket, ssl_context)
307
305
  ssl_socket.sync_close = true
308
306
  ssl_socket.connect
307
+
309
308
  rescue => e
310
309
  raise "A connection couldn't be established. Are you sure you have the correct credentials? Exception: " + e.message
311
310
  end
312
311
 
313
312
  File.foreach(path + filename) do |li|
314
313
  ssl_socket.puts li
314
+
315
315
  end
316
316
  File.rename(path + filename, path + filename + '.sent')
317
317
  File.open(path + 'responses/' + (filename + '.asc.received').gsub("request", "response"), 'a+') do |fo|
318
318
  while line = ssl_socket.gets
319
319
  fo.puts(line)
320
- end
321
320
  end
322
-
321
+ end
322
+
323
323
  end
324
324
  end
325
325
  end
@@ -499,7 +499,7 @@ module LitleOnline
499
499
  authentication.password = get_config(:password, options)
500
500
 
501
501
  litle_request.authentication = authentication
502
- litle_request.version = '9.10'
502
+ litle_request.version = '10.1'
503
503
  litle_request.xmlns = "http://www.litle.com/schema"
504
504
  # litle_request.id = options['sessionId'] #grab from options; okay if nil
505
505
  litle_request.numBatchRequests = @num_batch_requests
@@ -512,9 +512,9 @@ module LitleOnline
512
512
  def get_config(field, options)
513
513
  if options[field.to_s] == nil and options[field] == nil then
514
514
  return @config_hash[field.to_s]
515
- elsif options[field.to_s] != nil then
515
+ elsif options[field.to_s] != nil then
516
516
  return options[field.to_s]
517
- else
517
+ else
518
518
  return options[field]
519
519
  end
520
520
  end