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
data/test/unit/test_credit.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
|
@@ -129,8 +129,7 @@ module LitleOnline
|
|
129
129
|
'reportGroup'=>'Planets',
|
130
130
|
'actionReason'=> 'SUSPECT_FRAUD'
|
131
131
|
}
|
132
|
-
|
133
|
-
Communications.expects(:http_post).with(regexp_matches(/.*<actionReason>SUSPECT_FRAUD<\/actionReason>.*/m),kind_of(Hash))
|
132
|
+
LitleXmlMapper.expects(:request).with(regexp_matches(/.*<actionReason>SUSPECT_FRAUD<\/actionReason>.*/m), is_a(Hash))
|
134
133
|
LitleOnlineRequest.new.credit(hash)
|
135
134
|
end
|
136
135
|
|
@@ -338,5 +337,19 @@ module LitleOnline
|
|
338
337
|
LitleOnlineRequest.new.credit(hash)
|
339
338
|
end
|
340
339
|
|
340
|
+
def test_pin
|
341
|
+
hash = {
|
342
|
+
'merchantId' => '101',
|
343
|
+
'version'=>'8.8',
|
344
|
+
'reportGroup'=>'Planets',
|
345
|
+
'amount'=>'106',
|
346
|
+
'secondaryAmount'=>'20',
|
347
|
+
'litleTxnId'=>'1234',
|
348
|
+
'pin'=>'3333'
|
349
|
+
}
|
350
|
+
LitleXmlMapper.expects(:request).with(regexp_matches(/.*<pin>3333<\/pin>.*/m), is_a(Hash))
|
351
|
+
LitleOnlineRequest.new.credit(hash)
|
352
|
+
end
|
353
|
+
|
341
354
|
end
|
342
355
|
end
|
@@ -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
|
@@ -78,7 +78,7 @@ module LitleOnline
|
|
78
78
|
'orderId'=>'12345',
|
79
79
|
'orderSource'=>'ecommerce',
|
80
80
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455','ccdPaymentInformation'=>'12345678901234567890123456789012345678901234567890123456789012345678901234567890'},
|
81
|
-
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'
|
81
|
+
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
|
82
82
|
}
|
83
83
|
LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>123<\/amount><secondaryAmount>1<\/secondaryAmount>.*?<echeck>.*?<ccdPaymentInformation>.*<\/ccdPaymentInformation><\/echeck>.*/m), is_a(Hash))
|
84
84
|
LitleOnlineRequest.new.echeck_sale(hash)
|
@@ -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
|
@@ -108,7 +108,7 @@ module LitleOnline
|
|
108
108
|
LitleOnlineRequest.new.force_capture(hash)
|
109
109
|
end
|
110
110
|
|
111
|
-
def test_secondary_amount
|
111
|
+
def test_secondary_amount
|
112
112
|
hash = {
|
113
113
|
'amount' => '2',
|
114
114
|
'secondaryAmount' => '1',
|
@@ -140,6 +140,24 @@ def test_secondary_amount
|
|
140
140
|
LitleOnlineRequest.new.force_capture(hash)
|
141
141
|
end
|
142
142
|
|
143
|
+
def test_processing_type
|
144
|
+
hash = {
|
145
|
+
'merchantId' => '101',
|
146
|
+
'version'=>'8.8',
|
147
|
+
'reportGroup'=>'Planets',
|
148
|
+
'orderId'=>'12344',
|
149
|
+
'amount'=>'106',
|
150
|
+
'orderSource'=>'ecommerce',
|
151
|
+
'processingType'=>'accountFunding',
|
152
|
+
'card'=>{
|
153
|
+
'type'=>'VI',
|
154
|
+
'number' =>'4100000000000001',
|
155
|
+
'expDate' =>'1210'
|
156
|
+
}}
|
157
|
+
LitleXmlMapper.expects(:request).with(regexp_matches(/.*<processingType>accountFunding<\/processingType>.*/m), is_a(Hash))
|
158
|
+
LitleOnlineRequest.new.force_capture(hash)
|
159
|
+
end
|
160
|
+
|
143
161
|
end
|
144
162
|
|
145
163
|
end
|
data/test/unit/test_load.rb
CHANGED
data/test/unit/test_sale.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
|
@@ -68,7 +68,7 @@ module LitleOnline
|
|
68
68
|
'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
69
69
|
},
|
70
70
|
'signature' =>'sign',
|
71
|
-
'version' =>'1'
|
71
|
+
'version' =>'1.0.0'
|
72
72
|
}
|
73
73
|
}
|
74
74
|
|
@@ -255,8 +255,7 @@ module LitleOnline
|
|
255
255
|
}
|
256
256
|
}
|
257
257
|
|
258
|
-
|
259
|
-
Communications.expects(:http_post).with(regexp_matches(/.*<merchantData>.*?<affiliate>bar<\/affiliate>.*?<\/merchantData>.*/m),kind_of(Hash))
|
258
|
+
LitleXmlMapper.expects(:request).with(regexp_matches(/.*<merchantData>.*?<affiliate>bar<\/affiliate>.*?<\/merchantData>.*/m), is_a(Hash))
|
260
259
|
LitleOnlineRequest.new.sale(hash)
|
261
260
|
end
|
262
261
|
|
@@ -291,8 +290,7 @@ module LitleOnline
|
|
291
290
|
'fraudFilterOverride'=> 'false'
|
292
291
|
}
|
293
292
|
|
294
|
-
|
295
|
-
Communications.expects(:http_post).with(regexp_matches(/.*<sale.*?<fraudFilterOverride>false<\/fraudFilterOverride>.*?<\/sale>.*/m),kind_of(Hash))
|
293
|
+
LitleXmlMapper.expects(:request).with(regexp_matches(/.*<sale.*?<fraudFilterOverride>false<\/fraudFilterOverride>.*?<\/sale>.*/m), is_a(Hash))
|
296
294
|
LitleOnlineRequest.new.sale(hash)
|
297
295
|
end
|
298
296
|
|
@@ -461,5 +459,73 @@ module LitleOnline
|
|
461
459
|
LitleOnlineRequest.new.sale(hash)
|
462
460
|
end
|
463
461
|
|
462
|
+
def test_processingType
|
463
|
+
hash = {
|
464
|
+
'merchantId' => '101',
|
465
|
+
'version'=>'8.8',
|
466
|
+
'reportGroup'=>'Planets',
|
467
|
+
'litleTxnId'=>'123456',
|
468
|
+
'orderId'=>'12344',
|
469
|
+
'amount'=>'106',
|
470
|
+
'orderSource'=>'ecommerce',
|
471
|
+
'card'=>
|
472
|
+
{
|
473
|
+
'type'=>'MC',
|
474
|
+
'number' =>'5400000000000000',
|
475
|
+
'expDate' =>'1210'
|
476
|
+
},
|
477
|
+
'processingType'=>'initialInstallment'
|
478
|
+
}
|
479
|
+
LitleXmlMapper.expects(:request).with(regexp_matches(/.*<processingType>initialInstallment<\/processingType>.*/m), is_a(Hash))
|
480
|
+
LitleOnlineRequest.new.sale(hash)
|
481
|
+
end
|
482
|
+
|
483
|
+
def test_originalNetworkTransactionId_originalTransactionAmount_pin
|
484
|
+
hash = {
|
485
|
+
'merchantId' => '101',
|
486
|
+
'version'=>'8.8',
|
487
|
+
'reportGroup'=>'Planets',
|
488
|
+
'litleTxnId'=>'123456',
|
489
|
+
'orderId'=>'12344',
|
490
|
+
'amount'=>'106',
|
491
|
+
'orderSource'=>'ecommerce',
|
492
|
+
'card'=>
|
493
|
+
{
|
494
|
+
'type'=>'VI',
|
495
|
+
'number' =>'4100700000000000',
|
496
|
+
'expDate' =>'1210',
|
497
|
+
'pin'=>'1111'
|
498
|
+
},
|
499
|
+
'originalNetworkTransactionId'=>'98765432109876543210',
|
500
|
+
'originalTransactionAmount'=>'7001'
|
501
|
+
}
|
502
|
+
LitleXmlMapper.expects(:request).with(regexp_matches(/.*<originalNetworkTransactionId>98765432109876543210<\/originalNetworkTransactionId><originalTransactionAmount>7001<\/originalTransactionAmount>.*/m), is_a(Hash))
|
503
|
+
LitleOnlineRequest.new.sale(hash)
|
504
|
+
end
|
505
|
+
|
506
|
+
def test_wallet
|
507
|
+
hash = {
|
508
|
+
'merchantId' => '101',
|
509
|
+
'version'=>'8.8',
|
510
|
+
'reportGroup'=>'Planets',
|
511
|
+
'litleTxnId'=>'123456',
|
512
|
+
'orderId'=>'12344',
|
513
|
+
'amount'=>'106',
|
514
|
+
'orderSource'=>'ecommerce',
|
515
|
+
'card'=>
|
516
|
+
{
|
517
|
+
'type'=>'VI',
|
518
|
+
'number' =>'4100700000000000',
|
519
|
+
'expDate' =>'1210',
|
520
|
+
},
|
521
|
+
'wallet'=>{
|
522
|
+
'walletSourceType'=>'VisaCheckout',
|
523
|
+
'walletSourceTypeId'=>'VCIND'
|
524
|
+
}
|
525
|
+
}
|
526
|
+
LitleXmlMapper.expects(:request).with(regexp_matches(/.*<wallet><walletSourceType>VisaCheckout<\/walletSourceType><walletSourceTypeId>VCIND<\/walletSourceTypeId><\/wallet>.*/m), is_a(Hash))
|
527
|
+
LitleOnlineRequest.new.sale(hash)
|
528
|
+
end
|
529
|
+
|
464
530
|
end
|
465
531
|
end
|
data/test/unit/test_token.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
|
@@ -43,7 +43,7 @@ module LitleOnline
|
|
43
43
|
'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
44
44
|
},
|
45
45
|
'signature' =>'sign',
|
46
|
-
'version' =>'1'
|
46
|
+
'version' =>'1.0.0'
|
47
47
|
}
|
48
48
|
}
|
49
49
|
LitleXmlMapper.expects(:request).with(regexp_matches(/.*?<litleOnlineRequest.*?<registerTokenRequest.*?<applepay>.*?<data>user<\/data>.*?<\/applepay>.*?<\/registerTokenRequest>.*?/m), is_a(Hash))
|
@@ -66,7 +66,7 @@ module LitleOnline
|
|
66
66
|
'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
67
67
|
},
|
68
68
|
'signature' =>'sign',
|
69
|
-
'version' =>'1'
|
69
|
+
'version' =>'1.0.0'
|
70
70
|
}
|
71
71
|
}
|
72
72
|
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.register_token_request(hash)}
|
@@ -138,7 +138,18 @@ module LitleOnline
|
|
138
138
|
LitleXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
|
139
139
|
LitleOnlineRequest.new.register_token_request(hash)
|
140
140
|
end
|
141
|
+
|
142
|
+
def test_androidpay
|
143
|
+
hash = {
|
144
|
+
'merchantId' => '101',
|
145
|
+
'version'=>'8.8',
|
146
|
+
'reportGroup'=>'Planets',
|
147
|
+
'orderId'=>'androidpay',
|
148
|
+
'accountNumber'=>'1233456789103801'
|
149
|
+
}
|
150
|
+
LitleXmlMapper.expects(:request).with(regexp_matches(/.*<orderId>androidpay<\/orderId>.*<accountNumber>1233456789103801<\/accountNumber>.*/m), is_a(Hash))
|
151
|
+
LitleOnlineRequest.new.register_token_request(hash)
|
152
|
+
end
|
141
153
|
|
142
154
|
end
|
143
|
-
|
144
155
|
end
|
data/test/unit/test_unload.rb
CHANGED
data/test/unit/test_xmlfields.rb
CHANGED
data/test/unit/ts_unit.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: LitleOnline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Vantiv eCommerce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xml-object
|
@@ -95,12 +95,12 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description: |+
|
98
|
-
|
98
|
+
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.
|
99
99
|
|
100
|
-
This gem contains an application interface in the Ruby programming language created by
|
100
|
+
This gem contains an application interface in the Ruby programming language created by Vantiv eCommerce.
|
101
101
|
|
102
102
|
|
103
|
-
email: sdksupport@
|
103
|
+
email: sdksupport@vantiv.com
|
104
104
|
executables:
|
105
105
|
- sample_driver.rb
|
106
106
|
- Setup.rb
|
@@ -146,6 +146,7 @@ files:
|
|
146
146
|
- samples/Run_all.rb
|
147
147
|
- samples/Sale/LitleSaleTransaction.rb
|
148
148
|
- samples/Sale/SampleSaleTransaction.rb
|
149
|
+
- temp.xml
|
149
150
|
- test/certification/certTest1_base.rb
|
150
151
|
- test/certification/certTest2_authenhanced.rb
|
151
152
|
- test/certification/certTest3_authreversal.rb
|
@@ -188,6 +189,7 @@ files:
|
|
188
189
|
- test/functional/test_updateCardValidationNumOnToken.rb
|
189
190
|
- test/functional/test_updatePlan.rb
|
190
191
|
- test/functional/test_updateSubscription.rb
|
192
|
+
- test/functional/test_utf8.rb
|
191
193
|
- test/functional/test_xmlfields.rb
|
192
194
|
- test/functional/ts_all.rb
|
193
195
|
- test/unit/test_LitleAUBatch.rb
|
@@ -195,6 +197,7 @@ files:
|
|
195
197
|
- test/unit/test_LitleOnlineRequest.rb
|
196
198
|
- test/unit/test_LitleRequest.rb
|
197
199
|
- test/unit/test_LitleTransaction.rb
|
200
|
+
- test/unit/test_LitleXmlMapper.rb
|
198
201
|
- test/unit/test_activate.rb
|
199
202
|
- test/unit/test_activateReversal.rb
|
200
203
|
- test/unit/test_auth.rb
|
@@ -227,7 +230,7 @@ files:
|
|
227
230
|
- test/unit/test_updateSubscription.rb
|
228
231
|
- test/unit/test_xmlfields.rb
|
229
232
|
- test/unit/ts_unit.rb
|
230
|
-
homepage: http://www.
|
233
|
+
homepage: http://www.vantiv.com/developers
|
231
234
|
licenses: []
|
232
235
|
metadata: {}
|
233
236
|
post_install_message:
|
@@ -238,19 +241,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
238
241
|
requirements:
|
239
242
|
- - '>='
|
240
243
|
- !ruby/object:Gem::Version
|
241
|
-
version:
|
244
|
+
version: 2.2.0
|
242
245
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
246
|
requirements:
|
244
247
|
- - '>='
|
245
248
|
- !ruby/object:Gem::Version
|
246
249
|
version: '0'
|
247
250
|
requirements:
|
248
|
-
- Contact sdksupport@
|
251
|
+
- Contact sdksupport@vantiv.com for more information
|
249
252
|
rubyforge_project:
|
250
253
|
rubygems_version: 2.4.8
|
251
254
|
signing_key:
|
252
255
|
specification_version: 4
|
253
|
-
summary: Ruby SDK produced by
|
254
|
-
format
|
256
|
+
summary: Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv
|
257
|
+
eCommerce XML format v9.12
|
255
258
|
test_files:
|
256
259
|
- test/unit/ts_unit.rb
|