LitleOnline 9.3.3 → 9.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +15 -2
- data/DESCRIPTION +2 -2
- data/LICENSE +1 -1
- data/README.md +9 -9
- data/Rakefile +8 -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/LitleBatchRequest.rb +3 -3
- data/lib/LitleListeners.rb +1 -1
- data/lib/LitleOnline.rb +2 -2
- data/lib/LitleOnlineRequest.rb +4 -4
- data/lib/LitleRequest.rb +3 -3
- data/lib/LitleTransaction.rb +45 -21
- data/lib/LitleXmlMapper.rb +9 -4
- data/lib/XMLFields.rb +100 -15
- data/temp.xml +21 -0
- data/test/certification/certTest_batchAll.rb +15 -10
- data/test/certification/ts_all.rb +1 -1
- data/test/functional/test_activate.rb +7 -3
- data/test/functional/test_activateReversal.rb +7 -3
- data/test/functional/test_auth.rb +119 -16
- data/test/functional/test_authReversal.rb +5 -3
- data/test/functional/test_balanceInquiry.rb +5 -3
- data/test/functional/test_batch.rb +1 -1
- data/test/functional/test_batchStream.rb +1 -1
- data/test/functional/test_cancelSubscription.rb +5 -3
- data/test/functional/test_capture.rb +34 -3
- data/test/functional/test_captureGivenAuth.rb +55 -4
- data/test/functional/test_configuration.rb +1 -1
- data/test/functional/test_createPlan.rb +5 -3
- data/test/functional/test_credit.rb +17 -1
- data/test/functional/test_deactivate.rb +5 -3
- data/test/functional/test_deactivateReversal.rb +5 -3
- data/test/functional/test_depositReversal.rb +5 -3
- data/test/functional/test_echeckCredit.rb +13 -9
- data/test/functional/test_echeckRedeposit.rb +5 -3
- data/test/functional/test_echeckSale.rb +20 -29
- data/test/functional/test_echeckVerification.rb +20 -12
- data/test/functional/test_echeckVoid.rb +1 -1
- data/test/functional/test_forceCapture.rb +27 -5
- data/test/functional/test_fraudCheck.rb +10 -10
- data/test/functional/test_litle_requests.rb +1 -1
- data/test/functional/test_load.rb +5 -3
- data/test/functional/test_loadReversal.rb +5 -3
- data/test/functional/test_refundReversal.rb +5 -3
- data/test/functional/test_sale.rb +176 -29
- data/test/functional/test_token.rb +18 -3
- data/test/functional/test_unload.rb +5 -3
- data/test/functional/test_unloadReversal.rb +6 -4
- data/test/functional/test_updateCardValidationNumOnToken.rb +1 -1
- data/test/functional/test_updatePlan.rb +5 -3
- data/test/functional/test_updateSubscription.rb +5 -3
- data/test/functional/test_utf8.rb +44 -0
- data/test/functional/test_xmlfields.rb +10 -6
- data/test/functional/ts_all.rb +1 -1
- data/test/unit/test_LitleAUBatch.rb +1 -1
- data/test/unit/test_LitleBatchRequest.rb +4 -4
- data/test/unit/test_LitleOnlineRequest.rb +37 -54
- data/test/unit/test_LitleRequest.rb +1 -1
- data/test/unit/test_LitleTransaction.rb +5 -5
- data/test/unit/test_LitleXmlMapper.rb +136 -0
- data/test/unit/test_activate.rb +1 -21
- data/test/unit/test_activateReversal.rb +1 -1
- data/test/unit/test_auth.rb +51 -11
- 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 +27 -1
- data/test/unit/test_captureGivenAuth.rb +44 -18
- data/test/unit/test_createPlan.rb +1 -1
- data/test/unit/test_credit.rb +16 -3
- 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 +20 -2
- data/test/unit/test_fraudCheck.rb +1 -1
- data/test/unit/test_load.rb +1 -1
- data/test/unit/test_loadReversal.rb +1 -1
- data/test/unit/test_refundReversal.rb +1 -1
- data/test/unit/test_sale.rb +72 -6
- data/test/unit/test_token.rb +15 -4
- 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_xmlfields.rb +1 -1
- data/test/unit/ts_unit.rb +1 -1
- metadata +14 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9cbe83bd48316c3d23b6c9d917b0d5dc638c27d
|
4
|
+
data.tar.gz: c5c97ac9a16b8788dde426b86e73a3cc73fb8c33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f84797a1d951a8ad627b447810120efc103def3fc9c04819ddbc894413de2a6c68effb24eead03a12f8538b452b1df01a8c239b9b0571112fe44ea9b764ba932
|
7
|
+
data.tar.gz: d7590a20068c15a31f4daa1b3bad01278cbed76099a3bfaf01573a314a3a5f34182ac7b4cbfa80407fc9e115bfd2b85eb10ba55406fd82f89ffeaba807c081f8
|
data/CHANGELOG
CHANGED
@@ -1,10 +1,23 @@
|
|
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
|
+
|
3
16
|
==Version 9.3.3
|
4
|
-
*add fraudCheck transaction type
|
17
|
+
* add fraudCheck transaction type
|
5
18
|
|
6
19
|
==Version 9.3.2
|
7
|
-
HTTP timeout set to 500ms
|
20
|
+
* HTTP timeout set to 500ms
|
8
21
|
|
9
22
|
==Version 9.3.1 (March 9, 2015)
|
10
23
|
*Feature: PFIF instruction transaction support was added
|
data/DESCRIPTION
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
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.
|
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 Vantiv eCommerce.
|
4
4
|
|
5
5
|
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
|
1
|
+
Vantiv eCommerce Ruby SDK
|
2
2
|
=====================
|
3
3
|
|
4
|
-
About
|
4
|
+
About Vantiv eCommerce
|
5
5
|
------------
|
6
|
-
[
|
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.
|
7
7
|
|
8
8
|
|
9
9
|
About this SDK
|
10
10
|
--------------
|
11
|
-
The
|
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.
|
12
12
|
|
13
|
-
|
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.
|
14
14
|
|
15
|
-
This SDK
|
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.
|
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 [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
|
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 Vantiv eCommerce certification environment. You will see an HTTP error if you don't have access to the Vantiv eCommerce 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 Vantiv eCommerce with any further questions. You can reach us at sdksupport@vantiv.com.
|
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
2
|
+
Copyright (c) 2017 Vantiv eCommerce
|
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,16 @@ 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
|
33
|
+
s.summary = "Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv eCommerce XML format v9.12"
|
34
34
|
s.description = File.read(File.join(File.dirname(__FILE__), 'DESCRIPTION'))
|
35
35
|
s.requirements =
|
36
|
-
[ 'Contact sdksupport@
|
37
|
-
s.version = "9.
|
38
|
-
s.author = "
|
39
|
-
s.email = "sdksupport@
|
40
|
-
s.homepage = "http://www.
|
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"
|
41
41
|
s.platform = Gem::Platform::RUBY
|
42
|
-
s.required_ruby_version = '>=
|
42
|
+
s.required_ruby_version = '>=2.2.0'
|
43
43
|
s.files = Dir['**/**']
|
44
44
|
s.executables = [ 'sample_driver.rb', 'Setup.rb' ]
|
45
45
|
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 Vantiv eCommerce 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 Vantiv eCommerce 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 Vantiv eCommerce 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) 2017 Vantiv eCommerce
|
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 Vantiv eCommerce 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 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"
|
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 Vantiv eCommerce 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) 2017 Vantiv eCommerce
|
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
|
+
Vantiv eCommerce 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 Vantiv eCommerce 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 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.
|
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, Vantiv eCommerce 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/LitleBatchRequest.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
2
|
+
Copyright (c) 2017 Vantiv eCommerce
|
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,9 +25,9 @@ OTHER DEALINGS IN THE SOFTWARE.
|
|
25
25
|
require_relative 'Configuration'
|
26
26
|
|
27
27
|
#
|
28
|
-
# This class creates a new batch to which
|
28
|
+
# This class creates a new batch to which Vantiv eCommerce XML transactions are added.
|
29
29
|
# The batch is stored in the local file system until it is ready to be sent
|
30
|
-
# to
|
30
|
+
# to Vantiv eCommerce.
|
31
31
|
#
|
32
32
|
module LitleOnline
|
33
33
|
class LitleBatchRequest
|
data/lib/LitleListeners.rb
CHANGED
data/lib/LitleOnline.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
2
|
+
Copyright (c) 2017 Vantiv eCommerce
|
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 Vantiv eCommerce 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) 2017 Vantiv eCommerce
|
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 Vantiv eCommerce online request
|
29
29
|
#
|
30
30
|
module LitleOnline
|
31
31
|
|
@@ -258,7 +258,7 @@ module LitleOnline
|
|
258
258
|
|
259
259
|
request.authentication = authentication
|
260
260
|
request.merchantId = get_merchant_id(options)
|
261
|
-
request.version = '9.
|
261
|
+
request.version = '9.12'
|
262
262
|
request.loggedInUser = get_logged_in_user(options)
|
263
263
|
request.xmlns = "http://www.litle.com/schema"
|
264
264
|
request.merchantSdk = get_merchant_sdk(options)
|
@@ -289,7 +289,7 @@ module LitleOnline
|
|
289
289
|
end
|
290
290
|
|
291
291
|
def get_merchant_sdk(options)
|
292
|
-
options['merchantSdk'] || 'Ruby;9.
|
292
|
+
options['merchantSdk'] || 'Ruby;9.12.0'
|
293
293
|
end
|
294
294
|
|
295
295
|
def get_report_group(options)
|
data/lib/LitleRequest.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
2
|
+
Copyright (c) 2017 Vantiv eCommerce
|
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
|
@@ -191,7 +191,7 @@ module LitleOnline
|
|
191
191
|
litleRequest.authentication = authentication
|
192
192
|
litleRequest.numBatchRequests = "0"
|
193
193
|
|
194
|
-
litleRequest.version = '9.
|
194
|
+
litleRequest.version = '9.10'
|
195
195
|
litleRequest.xmlns = "http://www.litle.com/schema"
|
196
196
|
|
197
197
|
|
@@ -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.
|
502
|
+
litle_request.version = '9.10'
|
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
|
data/lib/LitleTransaction.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
2
|
+
Copyright (c) 2017 Vantiv eCommerce
|
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 does all the heavy lifting of mapping the Ruby hash into
|
28
|
+
# This class does all the heavy lifting of mapping the Ruby hash into Vantiv eCommerce XML format
|
29
29
|
# It also handles validation looking for missing or incorrect fields
|
30
30
|
# contains the methods to properly create each transaction type
|
31
31
|
#
|
@@ -39,7 +39,11 @@ module LitleOnline
|
|
39
39
|
transaction.debtRepayment = options['debtRepayment']
|
40
40
|
transaction.advancedFraudChecks = AdvancedFraudChecks.from_hash(options, 'advancedFraudChecks')
|
41
41
|
add_transaction_info(transaction, options)
|
42
|
-
|
42
|
+
#9.10
|
43
|
+
transaction.wallet = Wallet.from_hash(options, 'wallet')
|
44
|
+
transaction.processingType = options['processingType']
|
45
|
+
transaction.originalNetworkTransactionId = options['originalNetworkTransactionId']
|
46
|
+
transaction.originalTransactionAmount = options['originalTransactionAmount']
|
43
47
|
return transaction
|
44
48
|
end
|
45
49
|
|
@@ -192,15 +196,23 @@ module LitleOnline
|
|
192
196
|
def sale(options)
|
193
197
|
transaction = Sale.new
|
194
198
|
add_transaction_info(transaction, options)
|
195
|
-
transaction.secondaryAmount
|
196
|
-
transaction.surchargeAmount
|
197
|
-
transaction.fraudCheck
|
198
|
-
transaction.payPalOrderComplete
|
199
|
-
transaction.payPalNotes
|
200
|
-
transaction.recurringRequest
|
201
|
-
transaction.litleInternalRecurringRequest
|
202
|
-
transaction.debtRepayment
|
203
|
-
transaction.advancedFraudChecks
|
199
|
+
transaction.secondaryAmount = options['secondaryAmount']
|
200
|
+
transaction.surchargeAmount = options['surchargeAmount']
|
201
|
+
transaction.fraudCheck = FraudCheck.from_hash(options,'fraudCheck')
|
202
|
+
transaction.payPalOrderComplete = options['payPalOrderComplete']
|
203
|
+
transaction.payPalNotes = options['payPalNotes']
|
204
|
+
transaction.recurringRequest = RecurringRequest.from_hash(options,'recurringRequest')
|
205
|
+
transaction.litleInternalRecurringRequest = LitleInternalRecurringRequest.from_hash(options,'litleInternalRecurringRequest')
|
206
|
+
transaction.debtRepayment = options['debtRepayment']
|
207
|
+
transaction.advancedFraudChecks = AdvancedFraudChecks.from_hash(options, 'advancedFraudChecks')
|
208
|
+
#9.10
|
209
|
+
transaction.wallet = Wallet.from_hash(options, 'wallet')
|
210
|
+
transaction.processingType = options['processingType']
|
211
|
+
transaction.originalNetworkTransactionId = options['originalNetworkTransactionId']
|
212
|
+
transaction.originalTransactionAmount = options['originalTransactionAmount']
|
213
|
+
#9.12
|
214
|
+
transaction.sepaDirectDebit = SepaDirectDebitType.from_hash(options,'sepaDirectDebit')
|
215
|
+
transaction.ideal = IdealType.from_hash(options,'ideal')
|
204
216
|
return transaction
|
205
217
|
end
|
206
218
|
|
@@ -225,6 +237,9 @@ module LitleOnline
|
|
225
237
|
transaction.enhancedData = EnhancedData.from_hash(options)
|
226
238
|
transaction.processingInstructions = ProcessingInstructions.from_hash(options)
|
227
239
|
transaction.pos = Pos.from_hash(options)
|
240
|
+
#9.10
|
241
|
+
transaction.pin = options['pin']
|
242
|
+
#9.10 end
|
228
243
|
transaction.billMeLaterRequest = BillMeLaterRequest.from_hash(options)
|
229
244
|
transaction.payPalNotes = options['payPalNotes']
|
230
245
|
transaction.actionReason = options['actionReason']
|
@@ -275,10 +290,12 @@ module LitleOnline
|
|
275
290
|
|
276
291
|
def force_capture(options)
|
277
292
|
transaction = ForceCapture.new
|
278
|
-
transaction.secondaryAmount
|
293
|
+
transaction.secondaryAmount = options['secondaryAmount']
|
279
294
|
transaction.surchargeAmount = options['surchargeAmount']
|
280
295
|
transaction.customBilling = CustomBilling.from_hash(options)
|
281
296
|
transaction.debtRepayment = options['debtRepayment']
|
297
|
+
#9.10
|
298
|
+
transaction.processingType = options['processingType']
|
282
299
|
add_order_info(transaction, options)
|
283
300
|
|
284
301
|
return transaction
|
@@ -295,7 +312,10 @@ module LitleOnline
|
|
295
312
|
transaction.processingInstructions = ProcessingInstructions.from_hash(options)
|
296
313
|
transaction.payPalOrderComplete = options['payPalOrderComplete']
|
297
314
|
transaction.payPalNotes = options['payPalNotes']
|
298
|
-
|
315
|
+
#9.10
|
316
|
+
transaction.customBilling = CustomBilling.from_hash(options)
|
317
|
+
transaction.pin = options['pin']
|
318
|
+
|
299
319
|
add_account_info(transaction, options)
|
300
320
|
return transaction
|
301
321
|
end
|
@@ -303,13 +323,17 @@ module LitleOnline
|
|
303
323
|
def capture_given_auth(options)
|
304
324
|
transaction = CaptureGivenAuth.new
|
305
325
|
add_order_info(transaction, options)
|
306
|
-
transaction.secondaryAmount
|
307
|
-
transaction.surchargeAmount
|
308
|
-
transaction.authInformation
|
309
|
-
transaction.shipToAddress
|
310
|
-
transaction.customBilling
|
311
|
-
transaction.billMeLaterRequest
|
312
|
-
transaction.debtRepayment
|
326
|
+
transaction.secondaryAmount = options['secondaryAmount']
|
327
|
+
transaction.surchargeAmount = options['surchargeAmount']
|
328
|
+
transaction.authInformation = AuthInformation.from_hash(options)
|
329
|
+
transaction.shipToAddress = Contact.from_hash(options,'shipToAddress')
|
330
|
+
transaction.customBilling = CustomBilling.from_hash(options)
|
331
|
+
transaction.billMeLaterRequest = BillMeLaterRequest.from_hash(options)
|
332
|
+
transaction.debtRepayment = options['debtRepayment']
|
333
|
+
#9.10
|
334
|
+
transaction.processingType = options['processingType']
|
335
|
+
transaction.originalNetworkTransactionId = options['originalNetworkTransactionId']
|
336
|
+
transaction.originalTransactionAmount = options['originalTransactionAmount']
|
313
337
|
return transaction
|
314
338
|
end
|
315
339
|
|