LitleOnline 8.10.0 → 8.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/Communications.rb +3 -4
- data/lib/Configuration.rb +1 -1
- data/lib/LitleOnlineRequest.rb +170 -139
- data/lib/XMLFields.rb +29 -29
- data/test/certification/certTest1_base.rb +602 -606
- data/test/certification/certTest2_authenhanced.rb +6 -6
- data/test/certification/certTest3_authreversal.rb +29 -30
- data/test/certification/certTest4_echeck.rb +13 -16
- data/test/certification/certTest5_token.rb +11 -31
- data/test/functional/test_auth.rb +6 -6
- data/test/functional/test_authReversal.rb +6 -6
- data/test/functional/test_capture.rb +3 -3
- data/test/functional/test_captureGivenAuth.rb +12 -12
- data/test/functional/test_credit.rb +7 -7
- data/test/functional/test_echeckCredit.rb +11 -11
- data/test/functional/test_echeckRedeposit.rb +8 -8
- data/test/functional/test_echeckSale.rb +34 -32
- data/test/functional/test_echeckVerification.rb +8 -8
- data/test/functional/test_forceCapture.rb +8 -8
- data/test/functional/test_sale.rb +9 -11
- data/test/functional/test_token.rb +12 -12
- data/test/functional/test_xmlfields.rb +18 -18
- data/test/unit/test_LitleOnlineRequest.rb +26 -17
- data/test/unit/test_auth.rb +22 -10
- data/test/unit/test_authReversal.rb +2 -2
- data/test/unit/test_capture.rb +1 -1
- data/test/unit/test_captureGivenAuth.rb +6 -6
- data/test/unit/test_credit.rb +4 -7
- data/test/unit/test_echeckCredit.rb +2 -2
- data/test/unit/test_echeckRedeposit.rb +8 -8
- data/test/unit/test_echeckSale.rb +2 -2
- data/test/unit/test_echeckVerification.rb +8 -8
- data/test/unit/test_forceCapture.rb +8 -8
- data/test/unit/test_sale.rb +9 -9
- data/test/unit/test_token.rb +4 -4
- data/test/unit/test_xmlfields.rb +7 -9
- metadata +12 -12
@@ -155,7 +155,7 @@ class Litle_certTest2 < Test::Unit::TestCase
|
|
155
155
|
assert_equal('PAYROLL', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.prepaidCardType)
|
156
156
|
end
|
157
157
|
|
158
|
-
def
|
158
|
+
def test_21
|
159
159
|
customer_hash = {
|
160
160
|
'orderId' => '21',
|
161
161
|
'amount' => '5000',
|
@@ -431,7 +431,7 @@ class Litle_certTest2 < Test::Unit::TestCase
|
|
431
431
|
#test 32B
|
432
432
|
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId}
|
433
433
|
hash1b = authReversal_hash.merge(@@merchant_hash)
|
434
|
-
authReversal_response = LitleOnlineRequest.new.
|
434
|
+
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
435
435
|
assert_equal('111', authReversal_response.authReversalResponse.response)
|
436
436
|
assert_equal('Authorization amount has already been depleted', authReversal_response.authReversalResponse.message)
|
437
437
|
end
|
@@ -467,7 +467,7 @@ class Litle_certTest2 < Test::Unit::TestCase
|
|
467
467
|
#test 33A
|
468
468
|
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId}
|
469
469
|
hash1b = authReversal_hash.merge(@@merchant_hash)
|
470
|
-
authReversal_response = LitleOnlineRequest.new.
|
470
|
+
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
471
471
|
assert_equal('000', authReversal_response.authReversalResponse.response)
|
472
472
|
assert_equal('Approved', authReversal_response.authReversalResponse.message)
|
473
473
|
end
|
@@ -501,7 +501,7 @@ class Litle_certTest2 < Test::Unit::TestCase
|
|
501
501
|
#test 34A
|
502
502
|
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId}
|
503
503
|
hash1b = authReversal_hash.merge(@@merchant_hash)
|
504
|
-
authReversal_response = LitleOnlineRequest.new.
|
504
|
+
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
505
505
|
assert_equal('000', authReversal_response.authReversalResponse.response)
|
506
506
|
assert_equal('Approved', authReversal_response.authReversalResponse.message)
|
507
507
|
end
|
@@ -540,7 +540,7 @@ class Litle_certTest2 < Test::Unit::TestCase
|
|
540
540
|
#test 35B
|
541
541
|
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId, 'amount' => '20020'}
|
542
542
|
hash1b = authReversal_hash.merge(@@merchant_hash)
|
543
|
-
authReversal_response = LitleOnlineRequest.new.
|
543
|
+
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
544
544
|
assert_equal('000', authReversal_response.authReversalResponse.response)
|
545
545
|
assert_equal('Approved', authReversal_response.authReversalResponse.message)
|
546
546
|
end
|
@@ -563,7 +563,7 @@ class Litle_certTest2 < Test::Unit::TestCase
|
|
563
563
|
#test 36A
|
564
564
|
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId, 'amount' => '10000'}
|
565
565
|
hash1b = authReversal_hash.merge(@@merchant_hash)
|
566
|
-
authReversal_response = LitleOnlineRequest.new.
|
566
|
+
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
567
567
|
assert_equal('336', authReversal_response.authReversalResponse.response)
|
568
568
|
assert_equal('Reversal Amount does not match Authorization amount', authReversal_response.authReversalResponse.message)
|
569
569
|
end
|
@@ -40,12 +40,12 @@ class Litle_certTest3 < Test::Unit::TestCase
|
|
40
40
|
assert_equal('000', capture_response.captureResponse.response)
|
41
41
|
assert_equal('Approved', capture_response.captureResponse.message)
|
42
42
|
|
43
|
-
#
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
43
|
+
#test 32B
|
44
|
+
auth_r_hash = {'litleTxnId' => auth_response.authorizationResponse.litleTxnId }
|
45
|
+
hash1b = auth_r_hash.merge(@@merchant_hash)
|
46
|
+
auth_r_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
47
|
+
assert_equal('111', auth_r_response.authReversalResponse.response)
|
48
|
+
assert_equal('Authorization amount has already been depleted', auth_r_response.authReversalResponse.message)
|
49
49
|
end
|
50
50
|
|
51
51
|
def test_33
|
@@ -76,12 +76,12 @@ class Litle_certTest3 < Test::Unit::TestCase
|
|
76
76
|
assert_equal('10', auth_response.authorizationResponse.fraudResult.avsResult)
|
77
77
|
assert_equal('M', auth_response.authorizationResponse.fraudResult.cardValidationResult)
|
78
78
|
|
79
|
-
#
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
79
|
+
#test 33A
|
80
|
+
auth_reversal_hash = {'litleTxnId' => auth_response.authorizationResponse.litleTxnId}
|
81
|
+
hash1a = auth_reversal_hash.merge(@@merchant_hash)
|
82
|
+
auth_reversal_response = LitleOnlineRequest.new.auth_reversal(hash1a)
|
83
|
+
assert_equal('000', auth_reversal_response.authReversalResponse.response)
|
84
|
+
assert_equal('Approved', auth_reversal_response.authReversalResponse.message)
|
85
85
|
end
|
86
86
|
|
87
87
|
def test_34
|
@@ -110,12 +110,12 @@ class Litle_certTest3 < Test::Unit::TestCase
|
|
110
110
|
assert_equal('10', auth_response.authorizationResponse.fraudResult.avsResult)
|
111
111
|
assert_equal('M', auth_response.authorizationResponse.fraudResult.cardValidationResult)
|
112
112
|
|
113
|
-
#
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
113
|
+
#test 34A
|
114
|
+
auth_reversal_hash = {'litleTxnId' => auth_response.authorizationResponse.litleTxnId}
|
115
|
+
hash1a = auth_reversal_hash.merge(@@merchant_hash)
|
116
|
+
auth_reversal_response = LitleOnlineRequest.new.auth_reversal(hash1a)
|
117
|
+
assert_equal('000', auth_reversal_response.authReversalResponse.response)
|
118
|
+
assert_equal('Approved', auth_reversal_response.authReversalResponse.message)
|
119
119
|
end
|
120
120
|
|
121
121
|
def test_35
|
@@ -149,13 +149,12 @@ class Litle_certTest3 < Test::Unit::TestCase
|
|
149
149
|
assert_equal('000', capture_response.captureResponse.response)
|
150
150
|
assert_equal('Approved', capture_response.captureResponse.message)
|
151
151
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
# assert_equal('Approved', authReversal_response.authReversalResponse.message)
|
152
|
+
# #test 35B
|
153
|
+
auth_reversal_hash = {'litleTxnId' => auth_response.authorizationResponse.litleTxnId, 'amount' => '20020'}
|
154
|
+
hash2a = auth_reversal_hash.merge(@@merchant_hash)
|
155
|
+
auth_reversal_response = LitleOnlineRequest.new.auth_reversal(hash2a)
|
156
|
+
assert_equal('000', auth_reversal_response.authReversalResponse.response)
|
157
|
+
assert_equal('Approved', auth_reversal_response.authReversalResponse.message)
|
159
158
|
end
|
160
159
|
|
161
160
|
def test_36
|
@@ -174,11 +173,11 @@ class Litle_certTest3 < Test::Unit::TestCase
|
|
174
173
|
assert_equal('Approved', auth_response.authorizationResponse.message)
|
175
174
|
|
176
175
|
#test 36A
|
177
|
-
|
178
|
-
hash1a =
|
179
|
-
|
180
|
-
assert_equal('336',
|
181
|
-
assert_equal('Reversal Amount does not match Authorization amount',
|
176
|
+
auth_reversal_hash = {'litleTxnId' => auth_response.authorizationResponse.litleTxnId, 'amount' => '10000'}
|
177
|
+
hash1a = auth_reversal_hash.merge(@@merchant_hash)
|
178
|
+
auth_reversal_response = LitleOnlineRequest.new.auth_reversal(hash1a)
|
179
|
+
assert_equal('336', auth_reversal_response.authReversalResponse.response)
|
180
|
+
assert_equal('Reversal Amount does not match Authorization amount', auth_reversal_response.authReversalResponse.message)
|
182
181
|
end
|
183
182
|
|
184
183
|
end
|
@@ -24,7 +24,7 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
24
24
|
'routingNum' => '053100300'}
|
25
25
|
}
|
26
26
|
hash = customer_hash.merge(@@merchant_hash)
|
27
|
-
echeck_response = LitleOnlineRequest.new.
|
27
|
+
echeck_response = LitleOnlineRequest.new.echeck_verification(hash)
|
28
28
|
assert_equal('301', echeck_response.echeckVerificationResponse.response)
|
29
29
|
assert_equal('Invalid Account Number', echeck_response.echeckVerificationResponse.message)
|
30
30
|
end
|
@@ -46,7 +46,7 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
46
46
|
'routingNum' => '053000219'}
|
47
47
|
}
|
48
48
|
hash = customer_hash.merge(@@merchant_hash)
|
49
|
-
echeck_response = LitleOnlineRequest.new.
|
49
|
+
echeck_response = LitleOnlineRequest.new.echeck_verification(hash)
|
50
50
|
assert_equal('000', echeck_response.echeckVerificationResponse.response)
|
51
51
|
assert_equal('Approved', echeck_response.echeckVerificationResponse.message)
|
52
52
|
end
|
@@ -69,7 +69,7 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
69
69
|
'routingNum' => '053100300'}
|
70
70
|
}
|
71
71
|
hash = customer_hash.merge(@@merchant_hash)
|
72
|
-
echeck_response = LitleOnlineRequest.new.
|
72
|
+
echeck_response = LitleOnlineRequest.new.echeck_verification(hash)
|
73
73
|
assert_equal('950', echeck_response.echeckVerificationResponse.response)
|
74
74
|
assert_equal('Declined - Negative Information on File', echeck_response.echeckVerificationResponse.message)
|
75
75
|
end
|
@@ -92,7 +92,7 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
92
92
|
'routingNum' => '063102152'}
|
93
93
|
}
|
94
94
|
hash = customer_hash.merge(@@merchant_hash)
|
95
|
-
echeck_response = LitleOnlineRequest.new.
|
95
|
+
echeck_response = LitleOnlineRequest.new.echeck_verification(hash)
|
96
96
|
assert_equal('951', echeck_response.echeckVerificationResponse.response)
|
97
97
|
assert_equal('Absolute Decline', echeck_response.echeckVerificationResponse.message)
|
98
98
|
end
|
@@ -114,7 +114,7 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
114
114
|
'routingNum' => '053100300'}
|
115
115
|
}
|
116
116
|
hash = customer_hash.merge(@@merchant_hash)
|
117
|
-
echeck_response = LitleOnlineRequest.new.
|
117
|
+
echeck_response = LitleOnlineRequest.new.echeck_sale(hash)
|
118
118
|
|
119
119
|
assert_equal('301', echeck_response.echeckSalesResponse.response)
|
120
120
|
assert_equal('Invalid Account Number', echeck_response.echeckSalesResponse.message)
|
@@ -135,7 +135,7 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
135
135
|
'routingNum' => '211370545'}
|
136
136
|
}
|
137
137
|
hash = customer_hash.merge(@@merchant_hash)
|
138
|
-
echeck_response = LitleOnlineRequest.new.
|
138
|
+
echeck_response = LitleOnlineRequest.new.echeck_sale(hash)
|
139
139
|
|
140
140
|
assert_equal('000', echeck_response.echeckSalesResponse.response)
|
141
141
|
assert_equal('Approved', echeck_response.echeckSalesResponse.message)
|
@@ -158,7 +158,7 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
158
158
|
'routingNum' => '211370545'}
|
159
159
|
}
|
160
160
|
hash = customer_hash.merge(@@merchant_hash)
|
161
|
-
echeck_response = LitleOnlineRequest.new.
|
161
|
+
echeck_response = LitleOnlineRequest.new.echeck_sale(hash)
|
162
162
|
|
163
163
|
assert_equal('000', echeck_response.echeckSalesResponse.response)
|
164
164
|
assert_equal('Approved', echeck_response.echeckSalesResponse.message)
|
@@ -181,7 +181,7 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
181
181
|
'routingNum' => '053133052'}
|
182
182
|
}
|
183
183
|
hash = customer_hash.merge(@@merchant_hash)
|
184
|
-
echeck_response = LitleOnlineRequest.new.
|
184
|
+
echeck_response = LitleOnlineRequest.new.echeck_sale(hash)
|
185
185
|
|
186
186
|
assert_equal('900', echeck_response.echeckSalesResponse.response)
|
187
187
|
assert_equal('Invalid Bank Routing Number', echeck_response.echeckSalesResponse.message)
|
@@ -203,10 +203,9 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
203
203
|
'routingNum' => '053100300'}
|
204
204
|
}
|
205
205
|
hash = customer_hash.merge(@@merchant_hash)
|
206
|
-
echeck_response = LitleOnlineRequest.new.
|
206
|
+
echeck_response = LitleOnlineRequest.new.echeck_credit(hash)
|
207
207
|
|
208
208
|
assert_equal('301', echeck_response.echeckCreditResponse.response)
|
209
|
-
# assert_equal('InValid Account Number', echeck_response.echeckCreditResponse.message)
|
210
209
|
end
|
211
210
|
|
212
211
|
def test_46
|
@@ -225,7 +224,7 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
225
224
|
'routingNum' => '063102152'}
|
226
225
|
}
|
227
226
|
hash = customer_hash.merge(@@merchant_hash)
|
228
|
-
echeck_response = LitleOnlineRequest.new.
|
227
|
+
echeck_response = LitleOnlineRequest.new.echeck_credit(hash)
|
229
228
|
|
230
229
|
assert_equal('000', echeck_response.echeckCreditResponse.response)
|
231
230
|
assert_equal('Approved', echeck_response.echeckCreditResponse.message)
|
@@ -247,7 +246,7 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
247
246
|
'routingNum' => '211370545'}
|
248
247
|
}
|
249
248
|
hash = customer_hash.merge(@@merchant_hash)
|
250
|
-
echeck_response = LitleOnlineRequest.new.
|
249
|
+
echeck_response = LitleOnlineRequest.new.echeck_credit(hash)
|
251
250
|
|
252
251
|
assert_equal('000', echeck_response.echeckCreditResponse.response)
|
253
252
|
assert_equal('Approved', echeck_response.echeckCreditResponse.message)
|
@@ -255,11 +254,10 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
255
254
|
|
256
255
|
def test_48
|
257
256
|
customer_hash = {
|
258
|
-
#'orderId' => '48',
|
259
257
|
'litleTxnId' => '430000000000000001'
|
260
258
|
}
|
261
259
|
hash = customer_hash.merge(@@merchant_hash)
|
262
|
-
echeck_response = LitleOnlineRequest.new.
|
260
|
+
echeck_response = LitleOnlineRequest.new.echeck_credit(hash)
|
263
261
|
|
264
262
|
assert_equal('000', echeck_response.echeckCreditResponse.response)
|
265
263
|
assert_equal('Approved', echeck_response.echeckCreditResponse.message)
|
@@ -267,11 +265,10 @@ class Litle_certTest4 < Test::Unit::TestCase
|
|
267
265
|
|
268
266
|
def test_49
|
269
267
|
customer_hash = {
|
270
|
-
#'orderId' => '49',
|
271
268
|
'litleTxnId' => '2'
|
272
269
|
}
|
273
270
|
hash = customer_hash.merge(@@merchant_hash)
|
274
|
-
echeck_response = LitleOnlineRequest.new.
|
271
|
+
echeck_response = LitleOnlineRequest.new.echeck_credit(hash)
|
275
272
|
|
276
273
|
assert_equal('360', echeck_response.echeckCreditResponse.response)
|
277
274
|
assert_equal('No transaction found with specified litleTxnId', echeck_response.echeckCreditResponse.message)
|
@@ -2,7 +2,6 @@ require 'lib/LitleOnline'
|
|
2
2
|
require 'test/unit'
|
3
3
|
|
4
4
|
class Litle_certTest5 < Test::Unit::TestCase
|
5
|
-
#### test token transactions with merchantid 087902 username IMPTKN, password cert3d6Z#####
|
6
5
|
@@merchant_hash = {'reportGroup'=>'Planets',
|
7
6
|
'merchantId'=>'101'
|
8
7
|
}
|
@@ -13,7 +12,7 @@ class Litle_certTest5 < Test::Unit::TestCase
|
|
13
12
|
'accountNumber' => '4457119922390123'
|
14
13
|
}
|
15
14
|
hash = customer_hash.merge(@@merchant_hash)
|
16
|
-
token_response = LitleOnlineRequest.new.
|
15
|
+
token_response = LitleOnlineRequest.new.register_token_request(hash)
|
17
16
|
assert_equal('445711', token_response.registerTokenResponse.bin)
|
18
17
|
assert_equal('VI', token_response.registerTokenResponse.type)
|
19
18
|
assert_equal('801', token_response.registerTokenResponse.response)
|
@@ -27,7 +26,7 @@ class Litle_certTest5 < Test::Unit::TestCase
|
|
27
26
|
'accountNumber' => '4457119999999999'
|
28
27
|
}
|
29
28
|
hash = customer_hash.merge(@@merchant_hash)
|
30
|
-
token_response = LitleOnlineRequest.new.
|
29
|
+
token_response = LitleOnlineRequest.new.register_token_request(hash)
|
31
30
|
assert_equal('820', token_response.registerTokenResponse.response)
|
32
31
|
assert_equal('Credit card number was invalid', token_response.registerTokenResponse.message)
|
33
32
|
end
|
@@ -38,7 +37,7 @@ class Litle_certTest5 < Test::Unit::TestCase
|
|
38
37
|
'accountNumber' => '4457119922390123'
|
39
38
|
}
|
40
39
|
hash = customer_hash.merge(@@merchant_hash)
|
41
|
-
token_response = LitleOnlineRequest.new.
|
40
|
+
token_response = LitleOnlineRequest.new.register_token_request(hash)
|
42
41
|
assert_equal('445711', token_response.registerTokenResponse.bin)
|
43
42
|
assert_equal('VI', token_response.registerTokenResponse.type)
|
44
43
|
assert_equal('802', token_response.registerTokenResponse.response)
|
@@ -46,13 +45,13 @@ class Litle_certTest5 < Test::Unit::TestCase
|
|
46
45
|
assert_equal('Account number was previously registered', token_response.registerTokenResponse.message)
|
47
46
|
end
|
48
47
|
|
49
|
-
def test_53
|
48
|
+
def test_53
|
50
49
|
customer_hash = {
|
51
50
|
'orderId' => '53',
|
52
51
|
'echeckForToken'=>{'accNum'=>'1099999998','routingNum'=>'114567895'}
|
53
52
|
}
|
54
53
|
hash = customer_hash.merge(@@merchant_hash)
|
55
|
-
token_response = LitleOnlineRequest.new.
|
54
|
+
token_response = LitleOnlineRequest.new.register_token_request(hash)
|
56
55
|
assert_equal('EC', token_response.registerTokenResponse.type)
|
57
56
|
assert_equal('998', token_response.registerTokenResponse.eCheckAccountSuffix)
|
58
57
|
assert_equal('801', token_response.registerTokenResponse.response)
|
@@ -60,13 +59,13 @@ class Litle_certTest5 < Test::Unit::TestCase
|
|
60
59
|
assert_equal('111922223333000998', token_response.registerTokenResponse.litleToken)
|
61
60
|
end
|
62
61
|
|
63
|
-
def test_54
|
62
|
+
def test_54
|
64
63
|
customer_hash = {
|
65
64
|
'orderId' => '54',
|
66
65
|
'echeckForToken'=>{'accNum'=>'1022222102','routingNum'=>'1145_7895'}
|
67
66
|
}
|
68
67
|
hash = customer_hash.merge(@@merchant_hash)
|
69
|
-
token_response = LitleOnlineRequest.new.
|
68
|
+
token_response = LitleOnlineRequest.new.register_token_request(hash)
|
70
69
|
assert_equal('900', token_response.registerTokenResponse.response)
|
71
70
|
assert_equal('Invalid bank routing number', token_response.registerTokenResponse.message)
|
72
71
|
end
|
@@ -117,25 +116,7 @@ class Litle_certTest5 < Test::Unit::TestCase
|
|
117
116
|
assert_equal('MC', token_response.authorizationResponse.tokenResponse.type)
|
118
117
|
assert_equal('543510', token_response.authorizationResponse.tokenResponse.bin)
|
119
118
|
end
|
120
|
-
|
121
|
-
## def test_58
|
122
|
-
## customer_hash = {
|
123
|
-
## 'orderId' => '58',
|
124
|
-
## 'amount' => '15000',
|
125
|
-
## 'orderSource' => 'ecommerce',
|
126
|
-
##
|
127
|
-
## 'card' => {'expDate' => '1112', 'cardValidationNum' => '987'}
|
128
|
-
## }
|
129
|
-
## hash = customer_hash.merge(@@merchant_hash)
|
130
|
-
## token_response = LitleOnlineRequest.new.authorization(hash)
|
131
|
-
## assert_equal('000', token_response.authorizationResponse.response)
|
132
|
-
## assert_equal('Approved', token_response.authorizationResponse.message)
|
133
|
-
## assert_equal('801', token_response.authorizationResponse.tokenResponse.tokenResponseCode)
|
134
|
-
## assert_equal('Account number was successfully registered', token_response.authorizationResponse.tokenResponse.tokenMessage)
|
135
|
-
## assert_equal('MC', token_response.authorizationResponse.tokenResponse.type)
|
136
|
-
## assert_equal('543510', token_response.authorizationResponse.tokenResponse.bin)
|
137
|
-
## end
|
138
|
-
#
|
119
|
+
|
139
120
|
def test_59
|
140
121
|
customer_hash = {
|
141
122
|
'orderId' => '59',
|
@@ -162,7 +143,6 @@ class Litle_certTest5 < Test::Unit::TestCase
|
|
162
143
|
assert_equal('Token was invalid', token_response.authorizationResponse.message)
|
163
144
|
end
|
164
145
|
|
165
|
-
# test 61-64 need echecksale to support token. merchantid not authoried.
|
166
146
|
def test_61
|
167
147
|
customer_hash = {
|
168
148
|
'orderId' => '61',
|
@@ -174,7 +154,7 @@ class Litle_certTest5 < Test::Unit::TestCase
|
|
174
154
|
'echeck' => {'accType' => 'Checking', 'accNum' => '1099999003', 'routingNum' => '114567895'}
|
175
155
|
}
|
176
156
|
hash = customer_hash.merge(@@merchant_hash)
|
177
|
-
token_response = LitleOnlineRequest.new.
|
157
|
+
token_response = LitleOnlineRequest.new.echeck_sale(hash)
|
178
158
|
assert_equal('801', token_response.echeckSalesResponse.tokenResponse.tokenResponseCode)
|
179
159
|
assert_equal('Account number was successfully registered', token_response.echeckSalesResponse.tokenResponse.tokenMessage)
|
180
160
|
assert_equal('EC', token_response.echeckSalesResponse.tokenResponse.type)
|
@@ -193,7 +173,7 @@ class Litle_certTest5 < Test::Unit::TestCase
|
|
193
173
|
'echeck' => {'accType' => 'Checking', 'accNum' => '1099999999', 'routingNum' => '114567895'}
|
194
174
|
}
|
195
175
|
hash = customer_hash.merge(@@merchant_hash)
|
196
|
-
token_response = LitleOnlineRequest.new.
|
176
|
+
token_response = LitleOnlineRequest.new.echeck_sale(hash)
|
197
177
|
assert_equal('801', token_response.echeckSalesResponse.tokenResponse.tokenResponseCode)
|
198
178
|
assert_equal('Account number was successfully registered', token_response.echeckSalesResponse.tokenResponse.tokenMessage)
|
199
179
|
assert_equal('EC', token_response.echeckSalesResponse.tokenResponse.type)
|
@@ -212,7 +192,7 @@ class Litle_certTest5 < Test::Unit::TestCase
|
|
212
192
|
'echeck' => {'accType' => 'Checking', 'accNum' => '1099999999', 'routingNum' => '214567892'}
|
213
193
|
}
|
214
194
|
hash = customer_hash.merge(@@merchant_hash)
|
215
|
-
token_response = LitleOnlineRequest.new.
|
195
|
+
token_response = LitleOnlineRequest.new.echeck_sale(hash)
|
216
196
|
assert_equal('801', token_response.echeckSalesResponse.tokenResponse.tokenResponseCode)
|
217
197
|
assert_equal('Account number was successfully registered', token_response.echeckSalesResponse.tokenResponse.tokenMessage)
|
218
198
|
assert_equal('EC', token_response.echeckSalesResponse.tokenResponse.type)
|
@@ -27,7 +27,7 @@ require 'test/unit'
|
|
27
27
|
|
28
28
|
#test Authorization Transaction
|
29
29
|
class TestAuth < Test::Unit::TestCase
|
30
|
-
def
|
30
|
+
def test_simple_auth_with_card
|
31
31
|
hash = {
|
32
32
|
'merchantId' => '101',
|
33
33
|
'version'=>'8.8',
|
@@ -44,7 +44,7 @@ class TestAuth < Test::Unit::TestCase
|
|
44
44
|
assert_equal('000', response.authorizationResponse.response)
|
45
45
|
end
|
46
46
|
|
47
|
-
def
|
47
|
+
def test_simple_auth_with_paypal
|
48
48
|
hash = {
|
49
49
|
'merchantId' => '101',
|
50
50
|
'version'=>'8.8',
|
@@ -61,7 +61,7 @@ class TestAuth < Test::Unit::TestCase
|
|
61
61
|
assert_equal 'Valid Format', response.message
|
62
62
|
end
|
63
63
|
|
64
|
-
def
|
64
|
+
def test_illegal_order_source
|
65
65
|
hash = {
|
66
66
|
'merchantId' => '101',
|
67
67
|
'version'=>'8.8',
|
@@ -78,7 +78,7 @@ class TestAuth < Test::Unit::TestCase
|
|
78
78
|
assert(response.message =~ /Error validating xml data against the schema/)
|
79
79
|
end
|
80
80
|
|
81
|
-
def
|
81
|
+
def test_fields_out_of_order
|
82
82
|
hash = {
|
83
83
|
'merchantId' => '101',
|
84
84
|
'version'=>'8.8',
|
@@ -96,7 +96,7 @@ class TestAuth < Test::Unit::TestCase
|
|
96
96
|
assert_equal('000', response.authorizationResponse.response)
|
97
97
|
end
|
98
98
|
|
99
|
-
def
|
99
|
+
def test_invalid_field
|
100
100
|
hash = {
|
101
101
|
'merchantId' => '101',
|
102
102
|
'version'=>'8.8',
|
@@ -114,7 +114,7 @@ class TestAuth < Test::Unit::TestCase
|
|
114
114
|
assert_equal('000', response.authorizationResponse.response)
|
115
115
|
end
|
116
116
|
|
117
|
-
def
|
117
|
+
def test_pos_without_capability_and_entry_mode
|
118
118
|
hash = {
|
119
119
|
'merchantId' => '101',
|
120
120
|
'version'=>'8.8',
|
@@ -26,7 +26,7 @@ require 'lib/LitleOnline'
|
|
26
26
|
require 'test/unit'
|
27
27
|
|
28
28
|
class TestAuthReversal < Test::Unit::TestCase
|
29
|
-
def
|
29
|
+
def test_simple_auth_reversal
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
@@ -35,11 +35,11 @@ class TestAuthReversal < Test::Unit::TestCase
|
|
35
35
|
'amount'=>'106',
|
36
36
|
'payPalNotes'=>'Notes'
|
37
37
|
}
|
38
|
-
response= LitleOnlineRequest.new.
|
38
|
+
response= LitleOnlineRequest.new.auth_reversal(hash)
|
39
39
|
assert_equal('Valid Format', response.message)
|
40
40
|
end
|
41
41
|
|
42
|
-
def
|
42
|
+
def test_fields_out_of_order
|
43
43
|
hash = {
|
44
44
|
'merchantId' => '101',
|
45
45
|
'version'=>'8.8',
|
@@ -48,11 +48,11 @@ class TestAuthReversal < Test::Unit::TestCase
|
|
48
48
|
'amount'=>'106',
|
49
49
|
'reportGroup'=>'Planets',
|
50
50
|
}
|
51
|
-
response= LitleOnlineRequest.new.
|
51
|
+
response= LitleOnlineRequest.new.auth_reversal(hash)
|
52
52
|
assert_equal('Valid Format', response.message)
|
53
53
|
end
|
54
54
|
|
55
|
-
def
|
55
|
+
def test_invalid_field
|
56
56
|
hash = {
|
57
57
|
'merchantId' => '101',
|
58
58
|
'version'=>'8.8',
|
@@ -62,7 +62,7 @@ class TestAuthReversal < Test::Unit::TestCase
|
|
62
62
|
'amount'=>'106',
|
63
63
|
'reportGroup'=>'Planets',
|
64
64
|
}
|
65
|
-
response= LitleOnlineRequest.new.
|
65
|
+
response= LitleOnlineRequest.new.auth_reversal(hash)
|
66
66
|
assert_equal('Valid Format', response.message)
|
67
67
|
end
|
68
68
|
end
|