LitleOnline 9.12.0 → 10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +7 -16
- data/CONTRIBUTORS +0 -0
- data/DESCRIPTION +2 -2
- data/LICENSE +1 -1
- data/README.md +9 -9
- data/Rakefile +9 -8
- data/SETUP.md +3 -3
- data/bin/Setup.rb +4 -4
- data/bin/sample_batch_driver.rb +1 -1
- data/bin/sample_driver.rb +1 -1
- data/lib/Communications.rb +7 -7
- data/lib/Configuration.rb +1 -1
- data/lib/EnvironmentVariables.rb +0 -0
- data/lib/LitleBatchRequest.rb +22 -8
- data/lib/LitleListeners.rb +9 -9
- data/lib/LitleOnline.rb +2 -2
- data/lib/LitleOnlineRequest.rb +16 -10
- data/lib/LitleRequest.rb +10 -10
- data/lib/LitleTransaction.rb +66 -64
- data/lib/LitleXmlMapper.rb +4 -9
- data/lib/XMLFields.rb +129 -116
- data/lib/cacert.pem +0 -0
- data/samples/Auth/LitleAuthReversalTransaction.rb +2 -2
- data/samples/Auth/LitleAuthorizationTransaction.rb +1 -0
- data/samples/Auth/LitlePaymentFullLifeCycle.rb +12 -6
- data/samples/Batch/AccountUpdate.rb +1 -0
- data/samples/Batch/SampleBatchDriver.rb +2 -1
- data/samples/Capture/LitleCaptureGivenAuthTransaction.rb +2 -1
- data/samples/Capture/LitleCaptureTransaction.rb +2 -2
- data/samples/Capture/LitleForceCaptureTransaction.rb +2 -1
- data/samples/Capture/LitlePartialCapture.rb +3 -3
- data/samples/Credit/LitleCreditTransaction.rb +2 -2
- data/samples/Credit/LitleRefundTransaction.rb +2 -1
- data/samples/Other/LitleAvsTransaction.rb +2 -1
- data/samples/Other/LitleVoidTransaction.rb +2 -1
- data/samples/Paypage/FullPaypageLifeCycle.rb +7 -2
- data/samples/Run_all.rb +0 -0
- data/samples/Sale/LitleSaleTransaction.rb +2 -1
- data/samples/Sale/SampleSaleTransaction.rb +2 -1
- data/test/certification/certTest1_base.rb +53 -52
- data/test/certification/certTest2_authenhanced.rb +16 -15
- data/test/certification/certTest3_authreversal.rb +16 -15
- data/test/certification/certTest4_echeck.rb +11 -10
- data/test/certification/certTest5_token.rb +2 -1
- data/test/certification/certTest_batchAll.rb +40 -16
- data/test/certification/ts_all.rb +1 -1
- data/test/functional/test_activate.rb +8 -9
- data/test/functional/test_activateReversal.rb +4 -7
- data/test/functional/test_auth.rb +50 -113
- data/test/functional/test_authReversal.rb +6 -5
- data/test/functional/test_balanceInquiry.rb +5 -5
- data/test/functional/test_batch.rb +1 -1
- data/test/functional/test_batchStream.rb +3 -5
- data/test/functional/test_cancelSubscription.rb +3 -5
- data/test/functional/test_capture.rb +6 -34
- data/test/functional/test_captureGivenAuth.rb +13 -55
- data/test/functional/test_configuration.rb +1 -1
- data/test/functional/test_createPlan.rb +3 -5
- data/test/functional/test_credit.rb +10 -17
- data/test/functional/test_deactivate.rb +5 -5
- data/test/functional/test_deactivateReversal.rb +4 -5
- data/test/functional/test_depositReversal.rb +5 -5
- data/test/functional/test_echeckCredit.rb +17 -13
- data/test/functional/test_echeckRedeposit.rb +7 -5
- data/test/functional/test_echeckSale.rb +42 -21
- data/test/functional/test_echeckVerification.rb +19 -20
- data/test/functional/test_echeckVoid.rb +3 -2
- data/test/functional/test_forceCapture.rb +16 -30
- data/test/functional/test_litle_requests.rb +5 -9
- data/test/functional/test_load.rb +5 -5
- data/test/functional/test_loadReversal.rb +4 -5
- data/test/functional/test_override.rb +3 -0
- data/test/functional/test_queryTransaction.rb +146 -0
- data/test/functional/test_refundReversal.rb +4 -5
- data/test/functional/test_sale.rb +94 -170
- data/test/functional/test_token.rb +9 -18
- data/test/functional/test_unload.rb +5 -5
- data/test/functional/test_unloadReversal.rb +5 -6
- data/test/functional/test_updateCardValidationNumOnToken.rb +2 -1
- data/test/functional/test_updatePlan.rb +4 -5
- data/test/functional/test_updateSubscription.rb +5 -5
- data/test/functional/test_wallet.rb +74 -0
- data/test/functional/test_xmlfields.rb +25 -10
- data/test/functional/ts_all.rb +4 -2
- data/test/unit/test_LitleAUBatch.rb +1 -1
- data/test/unit/test_LitleBatchRequest.rb +4 -4
- data/test/unit/test_LitleOnlineRequest.rb +54 -37
- data/test/unit/test_LitleRequest.rb +3 -4
- data/test/unit/test_LitleTransaction.rb +35 -6
- data/test/unit/test_activate.rb +21 -1
- data/test/unit/test_activateReversal.rb +1 -1
- data/test/unit/test_auth.rb +16 -55
- data/test/unit/test_authReversal.rb +1 -1
- data/test/unit/test_balanceInquiry.rb +1 -1
- data/test/unit/test_cancelSubscription.rb +1 -1
- data/test/unit/test_capture.rb +1 -27
- data/test/unit/test_captureGivenAuth.rb +18 -44
- data/test/unit/test_createPlan.rb +1 -1
- data/test/unit/test_credit.rb +3 -16
- data/test/unit/test_deactivate.rb +1 -1
- data/test/unit/test_deactivateReversal.rb +1 -1
- data/test/unit/test_depositReversal.rb +1 -1
- data/test/unit/test_echeckCredit.rb +1 -1
- data/test/unit/test_echeckRedeposit.rb +1 -1
- data/test/unit/test_echeckSale.rb +2 -2
- data/test/unit/test_echeckVerification.rb +1 -1
- data/test/unit/test_echeckVoid.rb +1 -1
- data/test/unit/test_forceCapture.rb +2 -20
- data/test/unit/test_load.rb +1 -1
- data/test/unit/test_loadReversal.rb +1 -1
- data/test/unit/test_queryTransaction.rb +122 -0
- data/test/unit/test_refundReversal.rb +1 -1
- data/test/unit/test_sale.rb +8 -73
- data/test/unit/test_token.rb +8 -15
- data/test/unit/test_unload.rb +1 -1
- data/test/unit/test_unloadReversal.rb +1 -1
- data/test/unit/test_updateCardValidationNumOnToken.rb +1 -1
- data/test/unit/test_updatePlan.rb +1 -1
- data/test/unit/test_updateSubscription.rb +1 -1
- data/test/unit/test_wallet.rb +262 -0
- data/test/unit/test_xmlfields.rb +1 -1
- data/test/unit/ts_unit.rb +3 -3
- metadata +15 -16
- data/temp.xml +0 -21
- data/test/functional/test_fraudCheck.rb +0 -77
- data/test/functional/test_utf8.rb +0 -44
- data/test/unit/test_LitleXmlMapper.rb +0 -136
- data/test/unit/test_fraudCheck.rb +0 -45
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
2
|
+
Copyright (c) 2012 Litle & Co.
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person
|
5
5
|
obtaining a copy of this software and associated documentation
|
@@ -32,6 +32,7 @@ module LitleOnline
|
|
32
32
|
def test_simple_card_happy
|
33
33
|
hash = {
|
34
34
|
'merchantId' => '101',
|
35
|
+
'id' =>'test',
|
35
36
|
'version'=>'8.8',
|
36
37
|
'reportGroup'=>'Planets',
|
37
38
|
'orderId' =>'1001',
|
@@ -41,7 +42,7 @@ def test_simple_card_happy
|
|
41
42
|
'type'=>'VI',
|
42
43
|
'number' =>'4100000000000001',
|
43
44
|
'expDate' =>'1210'
|
44
|
-
|
45
|
+
}
|
45
46
|
}
|
46
47
|
|
47
48
|
response= LitleOnlineRequest.new.activate(hash)
|
@@ -52,6 +53,7 @@ def test_simple_virtualGiftCard_happy
|
|
52
53
|
hash = {
|
53
54
|
'merchantId' => '101',
|
54
55
|
'version'=>'8.8',
|
56
|
+
'id' =>'test',
|
55
57
|
'reportGroup'=>'Planets',
|
56
58
|
'orderId' =>'1001',
|
57
59
|
'amount' =>'500',
|
@@ -59,7 +61,7 @@ def test_simple_virtualGiftCard_happy
|
|
59
61
|
'virtualGiftCard'=>{
|
60
62
|
'accountNumberLength'=>'13',
|
61
63
|
'giftCardBin'=>'giftCardBinString'
|
62
|
-
|
64
|
+
}
|
63
65
|
}
|
64
66
|
|
65
67
|
response= LitleOnlineRequest.new.activate(hash)
|
@@ -70,6 +72,7 @@ def test_simple_virtualGiftCard_happy
|
|
70
72
|
hash = {
|
71
73
|
'merchantId' => '101',
|
72
74
|
'version'=>'8.8',
|
75
|
+
'id' =>'test',
|
73
76
|
'reportGroup'=>'Planets',
|
74
77
|
'amount' =>'500',
|
75
78
|
'orderId' =>'1001',
|
@@ -93,12 +96,8 @@ def test_simple_virtualGiftCard_happy
|
|
93
96
|
'amount' =>'500',
|
94
97
|
}
|
95
98
|
|
96
|
-
|
97
|
-
|
98
|
-
LitleOnlineRequest.new.activate(hash)
|
99
|
-
}
|
100
|
-
#Test
|
101
|
-
assert(exception.message =~ /Error validating xml data against the schema/)
|
99
|
+
response= LitleOnlineRequest.new.activate(hash)
|
100
|
+
assert(response.message =~ /Error validating xml data against the schema/)
|
102
101
|
end
|
103
102
|
end
|
104
103
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
2
|
+
Copyright (c) 2012 Litle & Co.
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person
|
5
5
|
obtaining a copy of this software and associated documentation
|
@@ -32,6 +32,7 @@ module LitleOnline
|
|
32
32
|
def test_simple
|
33
33
|
hash = {
|
34
34
|
'merchantId' => '101',
|
35
|
+
'id' => 'test',
|
35
36
|
'version'=>'8.8',
|
36
37
|
'reportGroup'=>'Planets',
|
37
38
|
'litleTxnId' =>'5000'
|
@@ -49,12 +50,8 @@ def test_simple
|
|
49
50
|
'reportGroup'=>'Planets',
|
50
51
|
}
|
51
52
|
|
52
|
-
|
53
|
-
|
54
|
-
LitleOnlineRequest.new.activate_reversal(hash)
|
55
|
-
}
|
56
|
-
#Test
|
57
|
-
assert(exception.message =~ /Error validating xml data against the schema/)
|
53
|
+
response= LitleOnlineRequest.new.activate_reversal(hash)
|
54
|
+
assert(response.message =~ /Error validating xml data against the schema/)
|
58
55
|
end
|
59
56
|
end
|
60
57
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
2
|
+
Copyright (c) 2012 Litle & Co.
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person
|
5
5
|
obtaining a copy of this software and associated documentation
|
@@ -31,6 +31,7 @@ module LitleOnline
|
|
31
31
|
def test_simple_auth_with_card
|
32
32
|
hash = {
|
33
33
|
'merchantId' => '101',
|
34
|
+
'id' => 'test',
|
34
35
|
'version'=>'8.8',
|
35
36
|
'reportGroup'=>'Planets',
|
36
37
|
'orderId'=>'12344',
|
@@ -48,6 +49,7 @@ module LitleOnline
|
|
48
49
|
def test_simple_auth_with_paypal
|
49
50
|
hash = {
|
50
51
|
'merchantId' => '101',
|
52
|
+
'id' => 'test',
|
51
53
|
'version'=>'8.8',
|
52
54
|
'reportGroup'=>'Planets',
|
53
55
|
'amount'=>'106',
|
@@ -65,6 +67,7 @@ module LitleOnline
|
|
65
67
|
def test_simple_auth_with_applepay_and_secondaryAmount
|
66
68
|
hash = {
|
67
69
|
'merchantId' => '101',
|
70
|
+
'id' => 'test',
|
68
71
|
'version'=>'8.8',
|
69
72
|
'reportGroup'=>'Planets',
|
70
73
|
'orderId'=>'12344',
|
@@ -80,7 +83,9 @@ module LitleOnline
|
|
80
83
|
'transactionId'=>'1234'
|
81
84
|
},
|
82
85
|
'signature' =>'1',
|
83
|
-
|
86
|
+
# RUby SDK XML 10
|
87
|
+
#'version'=>'1'
|
88
|
+
'version'=>'1000000'
|
84
89
|
}}
|
85
90
|
response= LitleOnlineRequest.new.authorization(hash)
|
86
91
|
assert_equal('Insufficient Funds', response.authorizationResponse.message)
|
@@ -90,6 +95,7 @@ module LitleOnline
|
|
90
95
|
def test_illegal_order_source
|
91
96
|
hash = {
|
92
97
|
'merchantId' => '101',
|
98
|
+
'id' => 'test',
|
93
99
|
'version'=>'8.8',
|
94
100
|
'reportGroup'=>'Planets',
|
95
101
|
'orderId'=>'12344',
|
@@ -100,19 +106,14 @@ module LitleOnline
|
|
100
106
|
'number' =>'4100000000000001',
|
101
107
|
'expDate' =>'1210'
|
102
108
|
}}
|
103
|
-
|
104
|
-
|
105
|
-
exception = assert_raise(RuntimeError){
|
106
|
-
LitleOnlineRequest.new.authorization(hash)
|
107
|
-
}
|
108
|
-
#Test
|
109
|
-
assert(exception.message =~ /Error validating xml data against the schema/)
|
110
|
-
|
109
|
+
response= LitleOnlineRequest.new.authorization(hash)
|
110
|
+
assert(response.message =~ /Error validating xml data against the schema/)
|
111
111
|
end
|
112
112
|
|
113
113
|
def test_fields_out_of_order
|
114
114
|
hash = {
|
115
115
|
'merchantId' => '101',
|
116
|
+
'id' => 'test',
|
116
117
|
'version'=>'8.8',
|
117
118
|
'reportGroup'=>'Planets',
|
118
119
|
'orderId'=>'12344',
|
@@ -131,6 +132,7 @@ module LitleOnline
|
|
131
132
|
def test_invalid_field
|
132
133
|
hash = {
|
133
134
|
'merchantId' => '101',
|
135
|
+
'id' => 'test',
|
134
136
|
'version'=>'8.8',
|
135
137
|
'reportGroup'=>'Planets',
|
136
138
|
'orderId'=>'12344',
|
@@ -149,6 +151,7 @@ module LitleOnline
|
|
149
151
|
def test_no_order_id
|
150
152
|
hash = {
|
151
153
|
'merchantId' => '101',
|
154
|
+
'id' => 'test',
|
152
155
|
'version'=>'8.8',
|
153
156
|
'reportGroup'=>'Planets',
|
154
157
|
'amount'=>'106',
|
@@ -158,17 +161,14 @@ module LitleOnline
|
|
158
161
|
'number' =>'4100000000000001',
|
159
162
|
'expDate' =>'1210'
|
160
163
|
}}
|
161
|
-
|
162
|
-
|
163
|
-
LitleOnlineRequest.new.authorization(hash)
|
164
|
-
}
|
165
|
-
#Test
|
166
|
-
assert(exception.message =~ /Error validating xml data against the schema/)
|
164
|
+
response= LitleOnlineRequest.new.authorization(hash)
|
165
|
+
assert(response.message =~ /Error validating xml data against the schema/)
|
167
166
|
end
|
168
167
|
|
169
168
|
def test_no_amount
|
170
169
|
hash = {
|
171
170
|
'merchantId' => '101',
|
171
|
+
'id' => 'test',
|
172
172
|
'version'=>'8.8',
|
173
173
|
'reportGroup'=>'Planets',
|
174
174
|
'orderId'=>'12344',
|
@@ -178,17 +178,14 @@ module LitleOnline
|
|
178
178
|
'number' =>'4100000000000001',
|
179
179
|
'expDate' =>'1210'
|
180
180
|
}}
|
181
|
-
|
182
|
-
|
183
|
-
LitleOnlineRequest.new.authorization(hash)
|
184
|
-
}
|
185
|
-
#Test
|
186
|
-
assert(exception.message =~ /Error validating xml data against the schema/)
|
181
|
+
response= LitleOnlineRequest.new.authorization(hash)
|
182
|
+
assert(response.message =~ /Error validating xml data against the schema/)
|
187
183
|
end
|
188
184
|
|
189
185
|
def test_no_order_source
|
190
186
|
hash = {
|
191
187
|
'merchantId' => '101',
|
188
|
+
'id' => 'test',
|
192
189
|
'version'=>'8.8',
|
193
190
|
'reportGroup'=>'Planets',
|
194
191
|
# 'litleTxnId'=>'123456',
|
@@ -199,12 +196,8 @@ module LitleOnline
|
|
199
196
|
'number' =>'4100000000000001',
|
200
197
|
'expDate' =>'1210'
|
201
198
|
}}
|
202
|
-
|
203
|
-
|
204
|
-
LitleOnlineRequest.new.authorization(hash)
|
205
|
-
}
|
206
|
-
#Test
|
207
|
-
assert(exception.message =~ /Error validating xml data against the schema/)
|
199
|
+
response= LitleOnlineRequest.new.authorization(hash)
|
200
|
+
assert(response.message =~ /Error validating xml data against the schema/)
|
208
201
|
end
|
209
202
|
|
210
203
|
def test_authorization_missing_attributes
|
@@ -219,16 +212,12 @@ module LitleOnline
|
|
219
212
|
'expDate' =>'1210'
|
220
213
|
}}
|
221
214
|
|
222
|
-
|
223
|
-
|
224
|
-
LitleOnlineRequest.new.authorization(hash)
|
225
|
-
}
|
226
|
-
#Test
|
227
|
-
assert(exception.message =~ /Error validating xml data against the schema/)
|
215
|
+
response= LitleOnlineRequest.new.authorization(hash)
|
216
|
+
|
228
217
|
end
|
229
218
|
|
230
219
|
def test_orderId_required
|
231
|
-
|
220
|
+
start_hash = {
|
232
221
|
'merchantId'=>'101',
|
233
222
|
'reportGroup'=>'Planets',
|
234
223
|
'amount'=>'101',
|
@@ -238,20 +227,18 @@ module LitleOnline
|
|
238
227
|
'number' => '1111222233334444'
|
239
228
|
}
|
240
229
|
}
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
assert(exception.message =~ /Error validating xml data against the schema/)
|
247
|
-
|
248
|
-
response = LitleOnlineRequest.new.authorization(hash.merge({'orderId'=>'1234'}))
|
230
|
+
response= LitleOnlineRequest.new.authorization(start_hash)
|
231
|
+
assert(response.message =~ /Error validating xml data against the schema/)
|
232
|
+
#SDK XML 10
|
233
|
+
#response = LitleOnlineRequest.new.authorization(start_hash.merge({'orderId'=>'1234'}))
|
234
|
+
response = LitleOnlineRequest.new.authorization(start_hash.merge({'orderId'=>'1234','id'=>'test'}))
|
249
235
|
assert_equal('000', response.authorizationResponse.response)
|
250
236
|
end
|
251
237
|
|
252
238
|
def test_ssn_optional
|
253
239
|
start_hash = {
|
254
240
|
'orderId'=>'12344',
|
241
|
+
'id' => 'test',
|
255
242
|
'merchantId'=>'101',
|
256
243
|
'reportGroup'=>'Planets',
|
257
244
|
'amount'=>'101',
|
@@ -271,6 +258,7 @@ module LitleOnline
|
|
271
258
|
def test_simple_auth_with_paypage
|
272
259
|
hash = {
|
273
260
|
'orderId'=>'12344',
|
261
|
+
'id' => 'test',
|
274
262
|
'amount'=>'106',
|
275
263
|
'orderSource'=>'ecommerce',
|
276
264
|
'paypage'=>{
|
@@ -287,6 +275,7 @@ module LitleOnline
|
|
287
275
|
def test_simple_auth_with_advanced_fraud_checks
|
288
276
|
hash = {
|
289
277
|
'merchantId' => '101',
|
278
|
+
'id' => 'test',
|
290
279
|
'version'=>'8.8',
|
291
280
|
'reportGroup'=>'Planets',
|
292
281
|
'orderId'=>'12355',
|
@@ -306,6 +295,7 @@ module LitleOnline
|
|
306
295
|
def test_simple_auth_with_mpos
|
307
296
|
hash = {
|
308
297
|
'orderId'=>'12344',
|
298
|
+
'id' => 'test',
|
309
299
|
'amount'=>'106',
|
310
300
|
'orderSource'=>'ecommerce',
|
311
301
|
'mpos'=>
|
@@ -321,81 +311,28 @@ module LitleOnline
|
|
321
311
|
assert_equal('000', response.authorizationResponse.response)
|
322
312
|
end
|
323
313
|
|
324
|
-
|
314
|
+
#SDK XML 10
|
315
|
+
def test_simple_auth_with_wallet1
|
325
316
|
hash = {
|
326
317
|
'merchantId' => '101',
|
318
|
+
'id' => 'test',
|
327
319
|
'version'=>'8.8',
|
328
320
|
'reportGroup'=>'Planets',
|
329
|
-
'orderId'=>'12355',
|
330
321
|
'amount'=>'106',
|
322
|
+
'orderId'=>'123456',
|
331
323
|
'orderSource'=>'ecommerce',
|
332
|
-
'
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
def test_simple_auth_with_wallet
|
347
|
-
hash = {
|
348
|
-
'merchantId' => '101',
|
349
|
-
'version'=>'8.8',
|
350
|
-
'reportGroup'=>'Planets',
|
351
|
-
'id'=>'12345',
|
352
|
-
'orderId'=>'67890',
|
353
|
-
'amount'=>'10000',
|
354
|
-
'orderSource'=>'ecommerce',
|
355
|
-
'processingType' => 'initialInstallment',
|
356
|
-
'originalNetworkTransactionId' => '9876543210',
|
357
|
-
'originalTransactionAmount' => '536981',
|
358
|
-
'card'=>{
|
359
|
-
'type'=>'VI',
|
360
|
-
'number' =>'4100000000000000',
|
361
|
-
'expDate' =>'1215'
|
362
|
-
},
|
363
|
-
'wallet'=>{
|
364
|
-
'walletSourceType'=>'VisaCheckout',
|
365
|
-
'walletSourceTypeId' => 'VCIND'
|
366
|
-
}
|
367
|
-
}
|
368
|
-
response= LitleOnlineRequest.new.authorization(hash)
|
369
|
-
assert_equal('000', response.authorizationResponse.response)
|
370
|
-
assert_equal('63225578415568556365452427825', response.authorizationResponse.networkTransactionId)
|
371
|
-
end
|
372
|
-
|
373
|
-
def test_simple_auth_with_wallet_CardSuffixResponse
|
374
|
-
hash = {
|
375
|
-
'merchantId' => '101',
|
376
|
-
'version'=>'8.8',
|
377
|
-
'reportGroup'=>'Planets',
|
378
|
-
'id'=>'12345',
|
379
|
-
'orderId'=>'67890',
|
380
|
-
'amount'=>'10000',
|
381
|
-
'orderSource'=>'ecommerce',
|
382
|
-
'processingType' => 'initialInstallment',
|
383
|
-
'originalNetworkTransactionId' => '9876543210',
|
384
|
-
'originalTransactionAmount' => '536981',
|
385
|
-
'card'=>{
|
386
|
-
'type'=>'MC',
|
387
|
-
'number' =>'5400700000000000',
|
388
|
-
'expDate' =>'1215'
|
389
|
-
},
|
390
|
-
'wallet'=>{
|
391
|
-
'walletSourceType'=>'MasterPass',
|
392
|
-
'walletSourceTypeId' => 'MasterPass'
|
393
|
-
}
|
394
|
-
}
|
395
|
-
response= LitleOnlineRequest.new.authorization(hash)
|
396
|
-
assert_equal('000', response.authorizationResponse.response)
|
397
|
-
assert_equal('123456', response.authorizationResponse.cardSuffix)
|
398
|
-
end
|
399
|
-
|
324
|
+
'paypal'=>
|
325
|
+
{
|
326
|
+
'payerId'=>'1234',
|
327
|
+
'token'=>'1234',
|
328
|
+
'transactionId'=>'123456'
|
329
|
+
},
|
330
|
+
'wallet'=> {
|
331
|
+
'walletSourceType' => 'MasterPass',
|
332
|
+
'walletSourceTypeId' => '102'
|
333
|
+
}}
|
334
|
+
response= LitleOnlineRequest.new.authorization(hash)
|
335
|
+
assert_equal 'Valid Format', response.message
|
336
|
+
end
|
400
337
|
end
|
401
338
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
2
|
+
Copyright (c) 2012 Litle & Co.
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person
|
5
5
|
obtaining a copy of this software and associated documentation
|
@@ -31,6 +31,7 @@ module LitleOnline
|
|
31
31
|
hash = {
|
32
32
|
'merchantId' => '101',
|
33
33
|
'version'=>'8.8',
|
34
|
+
'id'=>'test',
|
34
35
|
'reportGroup'=>'Planets',
|
35
36
|
'litleTxnId'=>'12345678000',
|
36
37
|
'amount'=>'106',
|
@@ -44,6 +45,7 @@ module LitleOnline
|
|
44
45
|
hash = {
|
45
46
|
'merchantId' => '101',
|
46
47
|
'version'=>'8.8',
|
48
|
+
'id'=>'test',
|
47
49
|
'litleTxnId'=>'12345000',
|
48
50
|
'payPalNotes'=>'Notes',
|
49
51
|
'amount'=>'106',
|
@@ -57,14 +59,13 @@ module LitleOnline
|
|
57
59
|
hash = {
|
58
60
|
'merchantId' => '101',
|
59
61
|
'version'=>'8.8',
|
62
|
+
'id'=>'test',
|
60
63
|
'reportGroup'=>'12345678',
|
61
64
|
'amount'=>'106',
|
62
65
|
'payPalNotes'=>'Notes'
|
63
66
|
}
|
64
|
-
|
65
|
-
|
66
|
-
#Test
|
67
|
-
assert(exception.message =~ /Error validating xml data against the schema/)
|
67
|
+
response= LitleOnlineRequest.new.auth_reversal(hash)
|
68
|
+
assert(response.message =~ /Error validating xml data against the schema/)
|
68
69
|
end
|
69
70
|
|
70
71
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright (c)
|
2
|
+
Copyright (c) 2012 Litle & Co.
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person
|
5
5
|
obtaining a copy of this software and associated documentation
|
@@ -33,6 +33,7 @@ def test_simple_happy
|
|
33
33
|
hash = {
|
34
34
|
'merchantId' => '101',
|
35
35
|
'version'=>'8.8',
|
36
|
+
'id'=>'test',
|
36
37
|
'reportGroup'=>'Planets',
|
37
38
|
'orderId' =>'1001',
|
38
39
|
'orderSource' =>'ecommerce',
|
@@ -51,6 +52,7 @@ def test_simple_happy
|
|
51
52
|
hash = {
|
52
53
|
'merchantId' => '101',
|
53
54
|
'version'=>'8.8',
|
55
|
+
'id'=>'test',
|
54
56
|
'reportGroup'=>'Planets',
|
55
57
|
'orderSource' =>'ecommerce',
|
56
58
|
'orderId' =>'1001',
|
@@ -73,10 +75,8 @@ def test_simple_happy
|
|
73
75
|
'amount' =>'500',
|
74
76
|
}
|
75
77
|
|
76
|
-
|
77
|
-
|
78
|
-
#Test
|
79
|
-
assert(exception.message =~ /Error validating xml data against the schema/)
|
78
|
+
response= LitleOnlineRequest.new.balance_inquiry(hash)
|
79
|
+
assert(response.message =~ /Error validating xml data against the schema/)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|