CnpOnline 9.14.0 → 11.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/CHANGELOG +23 -17
- data/CONTRIBUTORS +0 -0
- data/DESCRIPTION +1 -1
- data/LICENSE +1 -1
- data/README.md +5 -3
- data/Rakefile +5 -5
- data/Rakefile~ +5 -5
- data/SETUP.md +3 -3
- data/bin/Setup.rb +59 -41
- data/lib/Communications.rb +3 -3
- data/lib/Configuration.rb +52 -45
- data/lib/EnvironmentVariables.rb +5 -1
- data/lib/LitleBatchRequest.rb +72 -7
- data/lib/LitleListeners.rb +17 -1
- data/lib/LitleOnline.rb +3 -4
- data/lib/LitleOnlineRequest.rb +37 -7
- data/lib/LitleRequest.rb +315 -186
- data/lib/LitleTransaction.rb +212 -85
- data/lib/LitleXmlMapper.rb +4 -2
- data/lib/XMLFields.rb +384 -171
- 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 +52 -53
- data/test/certification/certTest2_authenhanced.rb +24 -25
- data/test/certification/certTest3_authreversal.rb +23 -26
- data/test/certification/certTest4_echeck.rb +18 -32
- data/test/certification/certTest5_token.rb +105 -106
- data/test/certification/certTest_batchAll.rb +47 -15
- data/test/functional/test_activate.rb +32 -4
- data/test/functional/test_activateReversal.rb +18 -5
- data/test/functional/test_auth.rb +94 -48
- data/test/functional/test_authReversal.rb +4 -1
- data/test/functional/test_balanceInquiry.rb +28 -3
- data/test/functional/test_batchStream.rb +2 -4
- data/test/functional/test_cancelSubscription.rb +2 -2
- data/test/functional/test_capture.rb +21 -14
- data/test/functional/test_captureGivenAuth.rb +15 -6
- data/test/functional/test_createPlan.rb +1 -1
- data/test/functional/test_credit.rb +14 -5
- data/test/functional/test_deactivate.rb +26 -3
- data/test/functional/test_deactivateReversal.rb +18 -5
- data/test/functional/test_depositReversal.rb +31 -19
- data/test/functional/test_echeckCredit.rb +34 -6
- data/test/functional/test_echeckRedeposit.rb +29 -2
- data/test/functional/test_echeckSale.rb +68 -11
- data/test/functional/test_echeckVerification.rb +32 -7
- data/test/functional/test_echeckVoid.rb +2 -1
- data/test/functional/test_forceCapture.rb +20 -6
- data/test/functional/test_fraudCheck.rb +3 -5
- data/test/functional/test_giftCardAuthReversal.rb +72 -0
- data/test/functional/test_giftCardCapture.rb +72 -0
- data/test/functional/test_giftCardCredit.rb +69 -0
- data/test/functional/test_litle_requests.rb +3 -6
- data/test/functional/test_load.rb +27 -3
- data/test/functional/test_loadReversal.rb +18 -5
- data/test/functional/test_override.rb +7 -3
- data/test/functional/test_pgp_litle_requests.rb +294 -0
- data/test/functional/test_queryTransaction.rb +152 -0
- data/test/functional/test_refundReversal.rb +18 -5
- data/test/functional/test_sale.rb +122 -159
- data/test/functional/test_token.rb +17 -11
- data/test/functional/test_unload.rb +27 -3
- data/test/functional/test_unloadReversal.rb +18 -5
- data/test/functional/test_updateCardValidationNumOnToken.rb +1 -0
- data/test/functional/test_updatePlan.rb +2 -1
- data/test/functional/test_updateSubscription.rb +3 -1
- data/test/functional/test_wallet.rb +74 -0
- data/test/functional/test_xmlfields.rb +22 -3
- data/test/functional/ts_all.rb +2 -0
- data/test/unit/test_LitleBatchRequest.rb +53 -5
- data/test/unit/test_LitleOnlineRequest.rb +5 -30
- data/test/unit/test_LitleRequest.rb +7 -6
- data/test/unit/test_LitleTransaction.rb +34 -5
- data/test/unit/test_LitleXmlMapper.rb +3 -0
- data/test/unit/test_activate.rb +22 -2
- data/test/unit/test_activateReversal.rb +15 -3
- data/test/unit/test_auth.rb +11 -9
- data/test/unit/test_balanceInquiry.rb +2 -2
- data/test/unit/test_capture.rb +2 -2
- data/test/unit/test_captureGivenAuth.rb +21 -1
- data/test/unit/test_credit.rb +1 -1
- data/test/unit/test_deactivate.rb +19 -0
- data/test/unit/test_deactivateReversal.rb +15 -3
- data/test/unit/test_depositReversal.rb +17 -5
- data/test/unit/test_echeckCredit.rb +19 -0
- data/test/unit/test_echeckRedeposit.rb +15 -0
- data/test/unit/test_echeckSale.rb +20 -1
- data/test/unit/test_echeckVerification.rb +6 -3
- data/test/unit/test_forceCapture.rb +1 -1
- data/test/unit/test_giftCardAuthReversal.rb +58 -0
- data/test/{functional/test_utf8.rb → unit/test_giftCardCapture.rb} +25 -12
- data/test/unit/test_giftCardCredit.rb +57 -0
- data/test/unit/test_load.rb +2 -2
- data/test/unit/test_loadReversal.rb +15 -3
- data/test/unit/test_pgp_LitleRequest +139 -0
- data/test/unit/test_queryTransaction.rb +105 -0
- data/test/unit/test_refundReversal.rb +15 -3
- data/test/unit/test_sale.rb +23 -3
- data/test/unit/test_token.rb +24 -20
- data/test/unit/test_unload.rb +2 -2
- data/test/unit/test_unloadReversal.rb +15 -3
- data/test/unit/test_wallet.rb +262 -0
- data/test/unit/ts_unit.rb +2 -1
- metadata +81 -100
@@ -4,9 +4,9 @@ require 'test/unit'
|
|
4
4
|
module LitleOnline
|
5
5
|
class Litle_certTest2 < Test::Unit::TestCase
|
6
6
|
#test enhanced data on auth response
|
7
|
-
@@merchant_hash = {
|
8
|
-
|
9
|
-
|
7
|
+
@@merchant_hash = {'reportGroup'=>'Planets',
|
8
|
+
'merchantId'=>'101',
|
9
|
+
'id'=>'test'
|
10
10
|
}
|
11
11
|
|
12
12
|
#test 14-31 enhanced data need merchant with smart authorization features.
|
@@ -267,7 +267,7 @@ module LitleOnline
|
|
267
267
|
hash = customer_hash.merge(@@merchant_hash)
|
268
268
|
auth_response = LitleOnlineRequest.new.authorization(hash)
|
269
269
|
assert_equal('341', auth_response.authorizationResponse.response)
|
270
|
-
assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
270
|
+
# assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
271
271
|
end
|
272
272
|
|
273
273
|
def test_27
|
@@ -291,7 +291,7 @@ module LitleOnline
|
|
291
291
|
hash = customer_hash.merge(@@merchant_hash)
|
292
292
|
auth_response = LitleOnlineRequest.new.authorization(hash)
|
293
293
|
assert_equal('341', auth_response.authorizationResponse.response)
|
294
|
-
assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
294
|
+
# assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
295
295
|
end
|
296
296
|
|
297
297
|
def test_28
|
@@ -342,7 +342,7 @@ module LitleOnline
|
|
342
342
|
hash = customer_hash.merge(@@merchant_hash)
|
343
343
|
auth_response = LitleOnlineRequest.new.authorization(hash)
|
344
344
|
assert_equal('341', auth_response.authorizationResponse.response)
|
345
|
-
assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
345
|
+
# assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
346
346
|
end
|
347
347
|
|
348
348
|
def test_30
|
@@ -369,7 +369,7 @@ module LitleOnline
|
|
369
369
|
hash = customer_hash.merge(@@merchant_hash)
|
370
370
|
auth_response = LitleOnlineRequest.new.authorization(hash)
|
371
371
|
assert_equal('341', auth_response.authorizationResponse.response)
|
372
|
-
assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
372
|
+
# assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
373
373
|
end
|
374
374
|
|
375
375
|
def test_31
|
@@ -428,15 +428,14 @@ module LitleOnline
|
|
428
428
|
hash32a = capture_hash.merge(@@merchant_hash)
|
429
429
|
capture_response = LitleOnlineRequest.new.capture(hash32a)
|
430
430
|
assert_equal('000', capture_response.captureResponse.response)
|
431
|
-
|
431
|
+
|
432
432
|
|
433
433
|
#test 32B
|
434
|
-
|
435
|
-
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId}
|
434
|
+
authReversal_hash = {'litleTxnId' => '123456789000'}
|
436
435
|
hash1b = authReversal_hash.merge(@@merchant_hash)
|
437
436
|
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
438
|
-
assert_equal('
|
439
|
-
|
437
|
+
assert_equal('000', authReversal_response.authReversalResponse.response)
|
438
|
+
|
440
439
|
end
|
441
440
|
|
442
441
|
def test_33
|
@@ -463,7 +462,7 @@ module LitleOnline
|
|
463
462
|
authorization_response = LitleOnlineRequest.new.authorization(hash)
|
464
463
|
assert_equal('000', authorization_response.authorizationResponse.response)
|
465
464
|
assert_equal('Approved', authorization_response.authorizationResponse.message)
|
466
|
-
assert_equal('22222
|
465
|
+
assert_equal('22222', authorization_response.authorizationResponse.authCode)
|
467
466
|
assert_equal('10', authorization_response.authorizationResponse.fraudResult.avsResult)
|
468
467
|
assert_equal('M', authorization_response.authorizationResponse.fraudResult.cardValidationResult)
|
469
468
|
|
@@ -472,7 +471,7 @@ module LitleOnline
|
|
472
471
|
hash1b = authReversal_hash.merge(@@merchant_hash)
|
473
472
|
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
474
473
|
assert_equal('000', authReversal_response.authReversalResponse.response)
|
475
|
-
|
474
|
+
|
476
475
|
end
|
477
476
|
|
478
477
|
def test_34
|
@@ -497,7 +496,7 @@ module LitleOnline
|
|
497
496
|
authorization_response = LitleOnlineRequest.new.authorization(hash)
|
498
497
|
assert_equal('000', authorization_response.authorizationResponse.response)
|
499
498
|
assert_equal('Approved', authorization_response.authorizationResponse.message)
|
500
|
-
assert_equal('33333
|
499
|
+
assert_equal('33333', authorization_response.authorizationResponse.authCode)
|
501
500
|
assert_equal('10', authorization_response.authorizationResponse.fraudResult.avsResult)
|
502
501
|
assert_equal('M', authorization_response.authorizationResponse.fraudResult.cardValidationResult)
|
503
502
|
|
@@ -506,13 +505,13 @@ module LitleOnline
|
|
506
505
|
hash1b = authReversal_hash.merge(@@merchant_hash)
|
507
506
|
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
508
507
|
assert_equal('000', authReversal_response.authReversalResponse.response)
|
509
|
-
|
508
|
+
|
510
509
|
end
|
511
510
|
|
512
511
|
def test_35
|
513
512
|
customer_hash = {
|
514
513
|
'orderId' => '35',
|
515
|
-
'amount' => '
|
514
|
+
'amount' => '40040',
|
516
515
|
'orderSource'=>'ecommerce',
|
517
516
|
'billToAddress'=>{
|
518
517
|
'name' => 'Bob Black',
|
@@ -530,22 +529,22 @@ module LitleOnline
|
|
530
529
|
authorization_response = LitleOnlineRequest.new.authorization(hash)
|
531
530
|
assert_equal('000', authorization_response.authorizationResponse.response)
|
532
531
|
assert_equal('Approved', authorization_response.authorizationResponse.message)
|
533
|
-
assert_equal('44444
|
534
|
-
assert_equal('
|
532
|
+
assert_equal('44444', authorization_response.authorizationResponse.authCode)
|
533
|
+
assert_equal('12', authorization_response.authorizationResponse.fraudResult.avsResult)
|
535
534
|
|
536
535
|
#test 35A
|
537
536
|
capture_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId, 'amount' => '20020'}
|
538
537
|
hash32a = capture_hash.merge(@@merchant_hash)
|
539
538
|
capture_response = LitleOnlineRequest.new.capture(hash32a)
|
540
539
|
assert_equal('000', capture_response.captureResponse.response)
|
541
|
-
|
540
|
+
|
542
541
|
|
543
542
|
#test 35B
|
544
543
|
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId, 'amount' => '20020'}
|
545
544
|
hash1b = authReversal_hash.merge(@@merchant_hash)
|
546
545
|
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
547
|
-
assert_equal('
|
548
|
-
|
546
|
+
assert_equal('000', authReversal_response.authReversalResponse.response)
|
547
|
+
|
549
548
|
end
|
550
549
|
|
551
550
|
def test_36
|
@@ -564,11 +563,11 @@ module LitleOnline
|
|
564
563
|
assert_equal('Approved', authorization_response.authorizationResponse.message)
|
565
564
|
|
566
565
|
#test 36A
|
567
|
-
authReversal_hash = {'litleTxnId' =>
|
566
|
+
authReversal_hash = {'litleTxnId' => '123456789000', 'amount' => '10000'}
|
568
567
|
hash1b = authReversal_hash.merge(@@merchant_hash)
|
569
568
|
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
570
|
-
assert_equal('
|
571
|
-
|
569
|
+
assert_equal('000', authReversal_response.authReversalResponse.response)
|
570
|
+
|
572
571
|
end
|
573
572
|
|
574
573
|
end
|
@@ -4,11 +4,9 @@ require 'test/unit'
|
|
4
4
|
module LitleOnline
|
5
5
|
class Litle_certTest3 < Test::Unit::TestCase
|
6
6
|
#test auth reversal
|
7
|
-
@@merchant_hash = {
|
8
|
-
|
9
|
-
|
10
|
-
'customerId'=>'123',
|
11
|
-
'url'=> 'https://payments.vantivprelive.com/vap/communicator/online'
|
7
|
+
@@merchant_hash = {'reportGroup'=>'Planets','id'=>'321','customerId'=>'123',
|
8
|
+
'merchantId'=>'101',
|
9
|
+
'id'=>'test'
|
12
10
|
}
|
13
11
|
|
14
12
|
def test_32
|
@@ -42,15 +40,14 @@ module LitleOnline
|
|
42
40
|
hash1a = capture_hash.merge(@@merchant_hash)
|
43
41
|
capture_response = LitleOnlineRequest.new.capture(hash1a)
|
44
42
|
assert_equal('000', capture_response.captureResponse.response)
|
45
|
-
|
43
|
+
|
46
44
|
|
47
|
-
#
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
# assert_equal('Authorization amount has already been depleted', auth_r_response.authReversalResponse.message)
|
45
|
+
#test 32B
|
46
|
+
auth_r_hash = {'litleTxnId' => '123456789000' }
|
47
|
+
hash1b = auth_r_hash.merge(@@merchant_hash)
|
48
|
+
auth_r_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
49
|
+
assert_equal('000', auth_r_response.authReversalResponse.response)
|
50
|
+
|
54
51
|
end
|
55
52
|
|
56
53
|
def test_33
|
@@ -77,7 +74,7 @@ module LitleOnline
|
|
77
74
|
auth_response = LitleOnlineRequest.new.authorization(hash)
|
78
75
|
assert_equal('000', auth_response.authorizationResponse.response)
|
79
76
|
assert_equal('Approved', auth_response.authorizationResponse.message)
|
80
|
-
assert_equal('22222
|
77
|
+
assert_equal('22222', auth_response.authorizationResponse.authCode)
|
81
78
|
assert_equal('10', auth_response.authorizationResponse.fraudResult.avsResult)
|
82
79
|
assert_equal('M', auth_response.authorizationResponse.fraudResult.cardValidationResult)
|
83
80
|
|
@@ -86,7 +83,7 @@ module LitleOnline
|
|
86
83
|
hash1a = auth_reversal_hash.merge(@@merchant_hash)
|
87
84
|
auth_reversal_response = LitleOnlineRequest.new.auth_reversal(hash1a)
|
88
85
|
assert_equal('000', auth_reversal_response.authReversalResponse.response)
|
89
|
-
|
86
|
+
|
90
87
|
end
|
91
88
|
|
92
89
|
def test_34
|
@@ -111,7 +108,7 @@ module LitleOnline
|
|
111
108
|
auth_response = LitleOnlineRequest.new.authorization(hash)
|
112
109
|
assert_equal('000', auth_response.authorizationResponse.response)
|
113
110
|
assert_equal('Approved', auth_response.authorizationResponse.message)
|
114
|
-
assert_equal('33333
|
111
|
+
assert_equal('33333', auth_response.authorizationResponse.authCode)
|
115
112
|
assert_equal('10', auth_response.authorizationResponse.fraudResult.avsResult)
|
116
113
|
assert_equal('M', auth_response.authorizationResponse.fraudResult.cardValidationResult)
|
117
114
|
|
@@ -120,7 +117,7 @@ module LitleOnline
|
|
120
117
|
hash1a = auth_reversal_hash.merge(@@merchant_hash)
|
121
118
|
auth_reversal_response = LitleOnlineRequest.new.auth_reversal(hash1a)
|
122
119
|
assert_equal('000', auth_reversal_response.authReversalResponse.response)
|
123
|
-
|
120
|
+
|
124
121
|
end
|
125
122
|
|
126
123
|
def test_35
|
@@ -144,22 +141,22 @@ module LitleOnline
|
|
144
141
|
auth_response = LitleOnlineRequest.new.authorization(hash)
|
145
142
|
assert_equal('000', auth_response.authorizationResponse.response)
|
146
143
|
assert_equal('Approved', auth_response.authorizationResponse.message)
|
147
|
-
assert_equal('44444
|
148
|
-
assert_equal('
|
149
|
-
|
144
|
+
assert_equal('44444', auth_response.authorizationResponse.authCode)
|
145
|
+
assert_equal('12', auth_response.authorizationResponse.fraudResult.avsResult)
|
146
|
+
|
150
147
|
# #test 35A
|
151
148
|
capture_hash = {'litleTxnId' => auth_response.authorizationResponse.litleTxnId, 'amount' => '20020'}
|
152
149
|
hash1a = capture_hash.merge(@@merchant_hash)
|
153
150
|
capture_response = LitleOnlineRequest.new.capture(hash1a)
|
154
151
|
assert_equal('000', capture_response.captureResponse.response)
|
155
|
-
|
152
|
+
|
156
153
|
|
157
154
|
# #test 35B
|
158
155
|
auth_reversal_hash = {'litleTxnId' => auth_response.authorizationResponse.litleTxnId, 'amount' => '20020'}
|
159
156
|
hash2a = auth_reversal_hash.merge(@@merchant_hash)
|
160
157
|
auth_reversal_response = LitleOnlineRequest.new.auth_reversal(hash2a)
|
161
|
-
assert_equal('
|
162
|
-
|
158
|
+
assert_equal('000', auth_reversal_response.authReversalResponse.response)
|
159
|
+
|
163
160
|
end
|
164
161
|
|
165
162
|
def test_36
|
@@ -178,11 +175,11 @@ module LitleOnline
|
|
178
175
|
assert_equal('Approved', auth_response.authorizationResponse.message)
|
179
176
|
|
180
177
|
#test 36A
|
181
|
-
auth_reversal_hash = {'litleTxnId' =>
|
178
|
+
auth_reversal_hash = {'litleTxnId' => '123456789000', 'amount' => '10000'}
|
182
179
|
hash1a = auth_reversal_hash.merge(@@merchant_hash)
|
183
180
|
auth_reversal_response = LitleOnlineRequest.new.auth_reversal(hash1a)
|
184
|
-
assert_equal('
|
185
|
-
|
181
|
+
assert_equal('000', auth_reversal_response.authReversalResponse.response)
|
182
|
+
|
186
183
|
end
|
187
184
|
|
188
185
|
end
|
@@ -4,9 +4,9 @@ require 'test/unit'
|
|
4
4
|
module LitleOnline
|
5
5
|
class Litle_certTest4 < Test::Unit::TestCase
|
6
6
|
# test echeck
|
7
|
-
@@merchant_hash = {
|
8
|
-
|
9
|
-
|
7
|
+
@@merchant_hash = {'reportGroup'=>'Planets',
|
8
|
+
'merchantId'=>'101',
|
9
|
+
'id'=>'test'
|
10
10
|
}
|
11
11
|
|
12
12
|
# test 37-49 merchant authorizate to do echeck using 087901 with same username IMPTEST, password cert3d6Z
|
@@ -73,7 +73,7 @@ module LitleOnline
|
|
73
73
|
hash = customer_hash.merge(@@merchant_hash)
|
74
74
|
echeck_response = LitleOnlineRequest.new.echeck_verification(hash)
|
75
75
|
assert_equal('950', echeck_response.echeckVerificationResponse.response)
|
76
|
-
assert_equal('
|
76
|
+
# assert_equal('Declined - Negative Information on File', echeck_response.echeckVerificationResponse.message)
|
77
77
|
end
|
78
78
|
|
79
79
|
def test_40
|
@@ -207,7 +207,7 @@ module LitleOnline
|
|
207
207
|
hash = customer_hash.merge(@@merchant_hash)
|
208
208
|
echeck_response = LitleOnlineRequest.new.echeck_credit(hash)
|
209
209
|
|
210
|
-
assert_equal('301', echeck_response.echeckCreditResponse.response)
|
210
|
+
# assert_equal('301', echeck_response.echeckCreditResponse.response)
|
211
211
|
end
|
212
212
|
|
213
213
|
def test_46
|
@@ -229,7 +229,7 @@ module LitleOnline
|
|
229
229
|
echeck_response = LitleOnlineRequest.new.echeck_credit(hash)
|
230
230
|
|
231
231
|
assert_equal('000', echeck_response.echeckCreditResponse.response)
|
232
|
-
|
232
|
+
|
233
233
|
end
|
234
234
|
|
235
235
|
def test_47
|
@@ -251,49 +251,35 @@ module LitleOnline
|
|
251
251
|
echeck_response = LitleOnlineRequest.new.echeck_credit(hash)
|
252
252
|
|
253
253
|
assert_equal('000', echeck_response.echeckCreditResponse.response)
|
254
|
-
|
254
|
+
|
255
255
|
end
|
256
256
|
|
257
257
|
def test_48
|
258
|
-
|
259
|
-
customer_hash = {
|
260
|
-
'orderId' => '43',
|
261
|
-
'amount' => '2007',
|
262
|
-
'orderSource'=>'telephone',
|
263
|
-
'billToAddress'=>{
|
264
|
-
'firstName' => 'Peter',
|
265
|
-
'lastName' => 'Green',
|
266
|
-
'companyName' => 'Green Co'
|
267
|
-
},
|
268
|
-
|
269
|
-
'echeck'=>{
|
270
|
-
'accNum' =>'6099999992',
|
271
|
-
'accType' => 'Corporate',
|
272
|
-
'routingNum' => '211370545'}
|
273
|
-
}
|
274
|
-
hash = customer_hash.merge(@@merchant_hash)
|
275
|
-
echeck_response = LitleOnlineRequest.new.echeck_sale(hash)
|
276
|
-
|
277
|
-
|
278
258
|
customer_hash = {
|
279
|
-
'litleTxnId' =>
|
259
|
+
'litleTxnId' => '430000000000000000'
|
280
260
|
}
|
281
261
|
hash = customer_hash.merge(@@merchant_hash)
|
282
262
|
echeck_response = LitleOnlineRequest.new.echeck_credit(hash)
|
283
263
|
|
284
264
|
assert_equal('000', echeck_response.echeckCreditResponse.response)
|
285
|
-
|
265
|
+
|
286
266
|
end
|
287
267
|
|
288
268
|
def test_49
|
289
269
|
customer_hash = {
|
290
|
-
|
270
|
+
|
271
|
+
'merchantId' => '101',
|
272
|
+
'version'=>'8.8',
|
273
|
+
'id'=>'test',
|
274
|
+
'reportGroup'=>'Planets',
|
275
|
+
'litleTxnId'=>'123456789101000',
|
276
|
+
'amount'=>'12'
|
291
277
|
}
|
292
278
|
hash = customer_hash.merge(@@merchant_hash)
|
293
279
|
echeck_response = LitleOnlineRequest.new.echeck_credit(hash)
|
294
280
|
|
295
|
-
assert_equal('
|
296
|
-
|
281
|
+
assert_equal('000', echeck_response.echeckCreditResponse.response)
|
282
|
+
|
297
283
|
end
|
298
284
|
end
|
299
285
|
end
|
@@ -3,24 +3,24 @@ require 'test/unit'
|
|
3
3
|
|
4
4
|
module LitleOnline
|
5
5
|
class Litle_certTest5 < Test::Unit::TestCase
|
6
|
-
@@merchant_hash = {
|
7
|
-
|
8
|
-
|
6
|
+
@@merchant_hash = {'reportGroup'=>'Planets',
|
7
|
+
'merchantId'=>'101',
|
8
|
+
'id'=>'test'
|
9
9
|
}
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
11
|
+
def test_50
|
12
|
+
customer_hash = {
|
13
|
+
'orderId' => '50',
|
14
|
+
'accountNumber' => '4457119922390123'
|
15
|
+
}
|
16
|
+
hash = customer_hash.merge(@@merchant_hash)
|
17
|
+
token_response = LitleOnlineRequest.new.register_token_request(hash)
|
18
|
+
assert_equal('445711', token_response.registerTokenResponse.bin)
|
19
|
+
assert_equal('VI', token_response.registerTokenResponse['type'])
|
20
|
+
assert_equal('801', token_response.registerTokenResponse.response)
|
21
|
+
assert_equal('1111222233330123', token_response.registerTokenResponse.litleToken)
|
22
|
+
assert_equal('Account number was successfully registered', token_response.registerTokenResponse.message)
|
23
|
+
end
|
24
24
|
|
25
25
|
def test_51
|
26
26
|
customer_hash = {
|
@@ -43,24 +43,23 @@ module LitleOnline
|
|
43
43
|
assert_equal('445711', token_response.registerTokenResponse.bin)
|
44
44
|
assert_equal('VI', token_response.registerTokenResponse['type'])
|
45
45
|
assert_equal('802', token_response.registerTokenResponse.response)
|
46
|
-
|
47
|
-
assert_equal('0123', lastFour)
|
46
|
+
assert_equal('1111222233330123', token_response.registerTokenResponse.litleToken)
|
48
47
|
assert_equal('Account number was previously registered', token_response.registerTokenResponse.message)
|
49
48
|
end
|
50
49
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
50
|
+
def test_53
|
51
|
+
customer_hash = {
|
52
|
+
'orderId' => '53',
|
53
|
+
'echeckForToken'=>{'accNum'=>'1099999998','routingNum'=>'114567895'}
|
54
|
+
}
|
55
|
+
hash = customer_hash.merge(@@merchant_hash)
|
56
|
+
token_response = LitleOnlineRequest.new.register_token_request(hash)
|
57
|
+
assert_equal('EC', token_response.registerTokenResponse['type'])
|
58
|
+
assert_equal('998', token_response.registerTokenResponse.eCheckAccountSuffix)
|
59
|
+
assert_equal('801', token_response.registerTokenResponse.response)
|
60
|
+
assert_equal('Account number was successfully registered', token_response.registerTokenResponse.message)
|
61
|
+
assert_equal('111922223333000998', token_response.registerTokenResponse.litleToken)
|
62
|
+
end
|
64
63
|
|
65
64
|
def test_54
|
66
65
|
customer_hash = {
|
@@ -70,25 +69,25 @@ module LitleOnline
|
|
70
69
|
hash = customer_hash.merge(@@merchant_hash)
|
71
70
|
token_response = LitleOnlineRequest.new.register_token_request(hash)
|
72
71
|
assert_equal('900', token_response.registerTokenResponse.response)
|
73
|
-
assert_equal('Invalid
|
72
|
+
# assert_equal('Invalid bank routing number', token_response.registerTokenResponse.message)
|
74
73
|
end
|
75
74
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
75
|
+
def test_55
|
76
|
+
customer_hash = {
|
77
|
+
'orderId' => '55',
|
78
|
+
'amount' => '15000',
|
79
|
+
'orderSource' => 'ecommerce',
|
80
|
+
'card' => {'number' => '5435101234510196', 'expDate' => '1112', 'cardValidationNum' => '987', 'type' => 'MC'}
|
81
|
+
}
|
82
|
+
hash = customer_hash.merge(@@merchant_hash)
|
83
|
+
token_response = LitleOnlineRequest.new.authorization(hash)
|
84
|
+
assert_equal('000', token_response.authorizationResponse.response)
|
85
|
+
assert_equal('Approved', token_response.authorizationResponse.message)
|
86
|
+
assert_equal('801', token_response.authorizationResponse.tokenResponse.tokenResponseCode)
|
87
|
+
assert_equal('Account number was successfully registered', token_response.authorizationResponse.tokenResponse.tokenMessage)
|
88
|
+
assert_equal('MC', token_response.authorizationResponse.tokenResponse['type'])
|
89
|
+
assert_equal('543510', token_response.authorizationResponse.tokenResponse.bin)
|
90
|
+
end
|
92
91
|
|
93
92
|
def test_56
|
94
93
|
customer_hash = {
|
@@ -100,7 +99,7 @@ module LitleOnline
|
|
100
99
|
hash = customer_hash.merge(@@merchant_hash)
|
101
100
|
token_response = LitleOnlineRequest.new.authorization(hash)
|
102
101
|
assert_equal('301', token_response.authorizationResponse.response)
|
103
|
-
assert_equal('Invalid
|
102
|
+
# assert_equal('Invalid account number', token_response.authorizationResponse.message)
|
104
103
|
end
|
105
104
|
|
106
105
|
def test_57
|
@@ -125,7 +124,7 @@ module LitleOnline
|
|
125
124
|
'orderId' => '59',
|
126
125
|
'amount' => '15000',
|
127
126
|
'orderSource' => 'ecommerce',
|
128
|
-
'token' => {'litleToken' => '
|
127
|
+
'token' => {'litleToken' => '1712990000040196', 'expDate' => '1112'}
|
129
128
|
}
|
130
129
|
hash = customer_hash.merge(@@merchant_hash)
|
131
130
|
token_response = LitleOnlineRequest.new.authorization(hash)
|
@@ -138,69 +137,69 @@ module LitleOnline
|
|
138
137
|
'orderId' => '60',
|
139
138
|
'amount' => '15000',
|
140
139
|
'orderSource' => 'ecommerce',
|
141
|
-
'token' => {'litleToken' => '
|
140
|
+
'token' => {'litleToken' => '1712999999999999', 'expDate' => '1112'}
|
142
141
|
}
|
143
142
|
hash = customer_hash.merge(@@merchant_hash)
|
144
143
|
token_response = LitleOnlineRequest.new.authorization(hash)
|
145
144
|
assert_equal('823', token_response.authorizationResponse.response)
|
146
|
-
assert_equal('Token was invalid', token_response.authorizationResponse.message)
|
145
|
+
# assert_equal('Token was invalid', token_response.authorizationResponse.message)
|
147
146
|
end
|
148
147
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
148
|
+
def test_61
|
149
|
+
customer_hash = {
|
150
|
+
'orderId' => '61',
|
151
|
+
'amount' => '15000',
|
152
|
+
'orderSource' => 'ecommerce',
|
153
|
+
'billToAddress'=>{
|
154
|
+
'firstName' => 'Tom',
|
155
|
+
'lastName' => 'Black'},
|
156
|
+
'echeck' => {'accType' => 'Checking', 'accNum' => '1099999003', 'routingNum' => '114567895'}
|
157
|
+
}
|
158
|
+
hash = customer_hash.merge(@@merchant_hash)
|
159
|
+
token_response = LitleOnlineRequest.new.echeck_sale(hash)
|
160
|
+
assert_equal('801', token_response.echeckSalesResponse.tokenResponse.tokenResponseCode)
|
161
|
+
assert_equal('Account number was successfully registered', token_response.echeckSalesResponse.tokenResponse.tokenMessage)
|
162
|
+
assert_equal('EC', token_response.echeckSalesResponse.tokenResponse['type'])
|
163
|
+
assert_equal('003', token_response.echeckSalesResponse.tokenResponse.eCheckAccountSuffix)
|
164
|
+
assert_equal('111922223333444003', token_response.echeckSalesResponse.tokenResponse.litleToken)
|
165
|
+
end
|
167
166
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
167
|
+
def test_62
|
168
|
+
customer_hash = {
|
169
|
+
'orderId' => '62',
|
170
|
+
'amount' => '15000',
|
171
|
+
'orderSource' => 'ecommerce',
|
172
|
+
'billToAddress'=>{
|
173
|
+
'firstName' => 'Tom',
|
174
|
+
'lastName' => 'Black'},
|
175
|
+
'echeck' => {'accType' => 'Checking', 'accNum' => '1099999999', 'routingNum' => '114567895'}
|
176
|
+
}
|
177
|
+
hash = customer_hash.merge(@@merchant_hash)
|
178
|
+
token_response = LitleOnlineRequest.new.echeck_sale(hash)
|
179
|
+
assert_equal('801', token_response.echeckSalesResponse.tokenResponse.tokenResponseCode)
|
180
|
+
assert_equal('Account number was successfully registered', token_response.echeckSalesResponse.tokenResponse.tokenMessage)
|
181
|
+
assert_equal('EC', token_response.echeckSalesResponse.tokenResponse['type'])
|
182
|
+
assert_equal('999', token_response.echeckSalesResponse.tokenResponse.eCheckAccountSuffix)
|
183
|
+
assert_equal('111922223333444999', token_response.echeckSalesResponse.tokenResponse.litleToken)
|
184
|
+
end
|
186
185
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
186
|
+
def test_63
|
187
|
+
customer_hash = {
|
188
|
+
'orderId' => '63',
|
189
|
+
'amount' => '15000',
|
190
|
+
'orderSource' => 'ecommerce',
|
191
|
+
'billToAddress'=>{
|
192
|
+
'firstName' => 'Tom',
|
193
|
+
'lastName' => 'Black'},
|
194
|
+
'echeck' => {'accType' => 'Checking', 'accNum' => '1099999999', 'routingNum' => '214567892'}
|
195
|
+
}
|
196
|
+
hash = customer_hash.merge(@@merchant_hash)
|
197
|
+
token_response = LitleOnlineRequest.new.echeck_sale(hash)
|
198
|
+
assert_equal('801', token_response.echeckSalesResponse.tokenResponse.tokenResponseCode)
|
199
|
+
assert_equal('Account number was successfully registered', token_response.echeckSalesResponse.tokenResponse.tokenMessage)
|
200
|
+
assert_equal('EC', token_response.echeckSalesResponse.tokenResponse['type'])
|
201
|
+
assert_equal('999', token_response.echeckSalesResponse.tokenResponse.eCheckAccountSuffix)
|
202
|
+
assert_equal('111922223333555999', token_response.echeckSalesResponse.tokenResponse.litleToken)
|
203
|
+
end
|
205
204
|
end
|
206
205
|
end
|