LitleOnline 9.12.0 → 10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +7 -16
- data/CONTRIBUTORS +0 -0
- data/DESCRIPTION +2 -2
- data/LICENSE +1 -1
- data/README.md +9 -9
- data/Rakefile +9 -8
- data/SETUP.md +3 -3
- data/bin/Setup.rb +4 -4
- data/bin/sample_batch_driver.rb +1 -1
- data/bin/sample_driver.rb +1 -1
- data/lib/Communications.rb +7 -7
- data/lib/Configuration.rb +1 -1
- data/lib/EnvironmentVariables.rb +0 -0
- data/lib/LitleBatchRequest.rb +22 -8
- data/lib/LitleListeners.rb +9 -9
- data/lib/LitleOnline.rb +2 -2
- data/lib/LitleOnlineRequest.rb +16 -10
- data/lib/LitleRequest.rb +10 -10
- data/lib/LitleTransaction.rb +66 -64
- data/lib/LitleXmlMapper.rb +4 -9
- data/lib/XMLFields.rb +129 -116
- data/lib/cacert.pem +0 -0
- data/samples/Auth/LitleAuthReversalTransaction.rb +2 -2
- data/samples/Auth/LitleAuthorizationTransaction.rb +1 -0
- data/samples/Auth/LitlePaymentFullLifeCycle.rb +12 -6
- data/samples/Batch/AccountUpdate.rb +1 -0
- data/samples/Batch/SampleBatchDriver.rb +2 -1
- data/samples/Capture/LitleCaptureGivenAuthTransaction.rb +2 -1
- data/samples/Capture/LitleCaptureTransaction.rb +2 -2
- data/samples/Capture/LitleForceCaptureTransaction.rb +2 -1
- data/samples/Capture/LitlePartialCapture.rb +3 -3
- data/samples/Credit/LitleCreditTransaction.rb +2 -2
- data/samples/Credit/LitleRefundTransaction.rb +2 -1
- data/samples/Other/LitleAvsTransaction.rb +2 -1
- data/samples/Other/LitleVoidTransaction.rb +2 -1
- data/samples/Paypage/FullPaypageLifeCycle.rb +7 -2
- data/samples/Run_all.rb +0 -0
- data/samples/Sale/LitleSaleTransaction.rb +2 -1
- data/samples/Sale/SampleSaleTransaction.rb +2 -1
- data/test/certification/certTest1_base.rb +53 -52
- data/test/certification/certTest2_authenhanced.rb +16 -15
- data/test/certification/certTest3_authreversal.rb +16 -15
- data/test/certification/certTest4_echeck.rb +11 -10
- data/test/certification/certTest5_token.rb +2 -1
- data/test/certification/certTest_batchAll.rb +40 -16
- data/test/certification/ts_all.rb +1 -1
- data/test/functional/test_activate.rb +8 -9
- data/test/functional/test_activateReversal.rb +4 -7
- data/test/functional/test_auth.rb +50 -113
- data/test/functional/test_authReversal.rb +6 -5
- data/test/functional/test_balanceInquiry.rb +5 -5
- data/test/functional/test_batch.rb +1 -1
- data/test/functional/test_batchStream.rb +3 -5
- data/test/functional/test_cancelSubscription.rb +3 -5
- data/test/functional/test_capture.rb +6 -34
- data/test/functional/test_captureGivenAuth.rb +13 -55
- data/test/functional/test_configuration.rb +1 -1
- data/test/functional/test_createPlan.rb +3 -5
- data/test/functional/test_credit.rb +10 -17
- data/test/functional/test_deactivate.rb +5 -5
- data/test/functional/test_deactivateReversal.rb +4 -5
- data/test/functional/test_depositReversal.rb +5 -5
- data/test/functional/test_echeckCredit.rb +17 -13
- data/test/functional/test_echeckRedeposit.rb +7 -5
- data/test/functional/test_echeckSale.rb +42 -21
- data/test/functional/test_echeckVerification.rb +19 -20
- data/test/functional/test_echeckVoid.rb +3 -2
- data/test/functional/test_forceCapture.rb +16 -30
- data/test/functional/test_litle_requests.rb +5 -9
- data/test/functional/test_load.rb +5 -5
- data/test/functional/test_loadReversal.rb +4 -5
- data/test/functional/test_override.rb +3 -0
- data/test/functional/test_queryTransaction.rb +146 -0
- data/test/functional/test_refundReversal.rb +4 -5
- data/test/functional/test_sale.rb +94 -170
- data/test/functional/test_token.rb +9 -18
- data/test/functional/test_unload.rb +5 -5
- data/test/functional/test_unloadReversal.rb +5 -6
- data/test/functional/test_updateCardValidationNumOnToken.rb +2 -1
- data/test/functional/test_updatePlan.rb +4 -5
- data/test/functional/test_updateSubscription.rb +5 -5
- data/test/functional/test_wallet.rb +74 -0
- data/test/functional/test_xmlfields.rb +25 -10
- data/test/functional/ts_all.rb +4 -2
- data/test/unit/test_LitleAUBatch.rb +1 -1
- data/test/unit/test_LitleBatchRequest.rb +4 -4
- data/test/unit/test_LitleOnlineRequest.rb +54 -37
- data/test/unit/test_LitleRequest.rb +3 -4
- data/test/unit/test_LitleTransaction.rb +35 -6
- data/test/unit/test_activate.rb +21 -1
- data/test/unit/test_activateReversal.rb +1 -1
- data/test/unit/test_auth.rb +16 -55
- data/test/unit/test_authReversal.rb +1 -1
- data/test/unit/test_balanceInquiry.rb +1 -1
- data/test/unit/test_cancelSubscription.rb +1 -1
- data/test/unit/test_capture.rb +1 -27
- data/test/unit/test_captureGivenAuth.rb +18 -44
- data/test/unit/test_createPlan.rb +1 -1
- data/test/unit/test_credit.rb +3 -16
- data/test/unit/test_deactivate.rb +1 -1
- data/test/unit/test_deactivateReversal.rb +1 -1
- data/test/unit/test_depositReversal.rb +1 -1
- data/test/unit/test_echeckCredit.rb +1 -1
- data/test/unit/test_echeckRedeposit.rb +1 -1
- data/test/unit/test_echeckSale.rb +2 -2
- data/test/unit/test_echeckVerification.rb +1 -1
- data/test/unit/test_echeckVoid.rb +1 -1
- data/test/unit/test_forceCapture.rb +2 -20
- data/test/unit/test_load.rb +1 -1
- data/test/unit/test_loadReversal.rb +1 -1
- data/test/unit/test_queryTransaction.rb +122 -0
- data/test/unit/test_refundReversal.rb +1 -1
- data/test/unit/test_sale.rb +8 -73
- data/test/unit/test_token.rb +8 -15
- data/test/unit/test_unload.rb +1 -1
- data/test/unit/test_unloadReversal.rb +1 -1
- data/test/unit/test_updateCardValidationNumOnToken.rb +1 -1
- data/test/unit/test_updatePlan.rb +1 -1
- data/test/unit/test_updateSubscription.rb +1 -1
- data/test/unit/test_wallet.rb +262 -0
- data/test/unit/test_xmlfields.rb +1 -1
- data/test/unit/ts_unit.rb +3 -3
- metadata +15 -16
- data/temp.xml +0 -21
- data/test/functional/test_fraudCheck.rb +0 -77
- data/test/functional/test_utf8.rb +0 -44
- data/test/unit/test_LitleXmlMapper.rb +0 -136
- data/test/unit/test_fraudCheck.rb +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d2579c938a2cd3f7b6faf95171f2e4540a12105
|
4
|
+
data.tar.gz: ce71d903457a0476d758c3ba1a5698bd1c3ed272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d191b166b62f2b2b5b29d9a940c47e001d322ad0c2a7ae74f403c8bd82f77718719ec22372cdd6ef0899a8377bf14187197338b7f9bfcb9e65326c95132f9df7
|
7
|
+
data.tar.gz: f7e82cfd440af0d7e09f377069a5b36976bfed6464a82211bf45e8c3776b0e795db831c78b02470a497ccc8711b76cb9517ff1c7295825b27c8fc0b8c5c5a12b
|
data/CHANGELOG
CHANGED
@@ -1,23 +1,14 @@
|
|
1
1
|
= LitleOnline CHANGELOG
|
2
2
|
|
3
|
-
==Version
|
4
|
-
*Feature:
|
5
|
-
|
6
|
-
*Feature: added
|
7
|
-
|
8
|
-
|
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
|
-
|
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
|
data/CONTRIBUTORS
CHANGED
File without changes
|
data/DESCRIPTION
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
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
|
3
|
+
This gem contains an application interface in the Ruby programming language created by Litle & Co.
|
4
4
|
|
5
5
|
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
|
1
|
+
Litle Online Ruby SDK
|
2
2
|
=====================
|
3
3
|
|
4
|
-
About
|
4
|
+
About Litle
|
5
5
|
------------
|
6
|
-
[
|
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
|
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
|
-
|
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
|
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 [
|
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
|
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
|
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)
|
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
|
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@
|
37
|
-
s.version = "
|
38
|
-
s.author = "Vantiv eCommerce"
|
39
|
-
s.
|
40
|
-
s.
|
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.
|
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
|
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
|
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
|
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
|
|
data/bin/Setup.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
=begin
|
4
|
-
Copyright (c)
|
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
|
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
|
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
|
123
|
+
puts "The Litle configuration file has been generated, the file is located at: " + @path
|
124
124
|
f.finished
|
125
125
|
|
data/bin/sample_batch_driver.rb
CHANGED
data/bin/sample_driver.rb
CHANGED
data/lib/Communications.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
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
|
-
|
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
|
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
|
75
|
-
Under normal operating circumstances, the transmission time to and from
|
76
|
-
and processing overhead by
|
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,
|
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
|
data/lib/Configuration.rb
CHANGED
data/lib/EnvironmentVariables.rb
CHANGED
File without changes
|
data/lib/LitleBatchRequest.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
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
|
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
|
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]
|
data/lib/LitleListeners.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
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"] == "
|
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
|
data/lib/LitleOnline.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
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
|
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(/"/, '"')}"]
|
data/lib/LitleOnlineRequest.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
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
|
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
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
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 = '
|
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;
|
298
|
+
options['merchantSdk'] || 'Ruby;10.1'
|
293
299
|
end
|
294
300
|
|
295
301
|
def get_report_group(options)
|
data/lib/LitleRequest.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
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 = '
|
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 = '
|
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
|