LitleOnline 9.12.0 → 10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +7 -16
  3. data/CONTRIBUTORS +0 -0
  4. data/DESCRIPTION +2 -2
  5. data/LICENSE +1 -1
  6. data/README.md +9 -9
  7. data/Rakefile +9 -8
  8. data/SETUP.md +3 -3
  9. data/bin/Setup.rb +4 -4
  10. data/bin/sample_batch_driver.rb +1 -1
  11. data/bin/sample_driver.rb +1 -1
  12. data/lib/Communications.rb +7 -7
  13. data/lib/Configuration.rb +1 -1
  14. data/lib/EnvironmentVariables.rb +0 -0
  15. data/lib/LitleBatchRequest.rb +22 -8
  16. data/lib/LitleListeners.rb +9 -9
  17. data/lib/LitleOnline.rb +2 -2
  18. data/lib/LitleOnlineRequest.rb +16 -10
  19. data/lib/LitleRequest.rb +10 -10
  20. data/lib/LitleTransaction.rb +66 -64
  21. data/lib/LitleXmlMapper.rb +4 -9
  22. data/lib/XMLFields.rb +129 -116
  23. data/lib/cacert.pem +0 -0
  24. data/samples/Auth/LitleAuthReversalTransaction.rb +2 -2
  25. data/samples/Auth/LitleAuthorizationTransaction.rb +1 -0
  26. data/samples/Auth/LitlePaymentFullLifeCycle.rb +12 -6
  27. data/samples/Batch/AccountUpdate.rb +1 -0
  28. data/samples/Batch/SampleBatchDriver.rb +2 -1
  29. data/samples/Capture/LitleCaptureGivenAuthTransaction.rb +2 -1
  30. data/samples/Capture/LitleCaptureTransaction.rb +2 -2
  31. data/samples/Capture/LitleForceCaptureTransaction.rb +2 -1
  32. data/samples/Capture/LitlePartialCapture.rb +3 -3
  33. data/samples/Credit/LitleCreditTransaction.rb +2 -2
  34. data/samples/Credit/LitleRefundTransaction.rb +2 -1
  35. data/samples/Other/LitleAvsTransaction.rb +2 -1
  36. data/samples/Other/LitleVoidTransaction.rb +2 -1
  37. data/samples/Paypage/FullPaypageLifeCycle.rb +7 -2
  38. data/samples/Run_all.rb +0 -0
  39. data/samples/Sale/LitleSaleTransaction.rb +2 -1
  40. data/samples/Sale/SampleSaleTransaction.rb +2 -1
  41. data/test/certification/certTest1_base.rb +53 -52
  42. data/test/certification/certTest2_authenhanced.rb +16 -15
  43. data/test/certification/certTest3_authreversal.rb +16 -15
  44. data/test/certification/certTest4_echeck.rb +11 -10
  45. data/test/certification/certTest5_token.rb +2 -1
  46. data/test/certification/certTest_batchAll.rb +40 -16
  47. data/test/certification/ts_all.rb +1 -1
  48. data/test/functional/test_activate.rb +8 -9
  49. data/test/functional/test_activateReversal.rb +4 -7
  50. data/test/functional/test_auth.rb +50 -113
  51. data/test/functional/test_authReversal.rb +6 -5
  52. data/test/functional/test_balanceInquiry.rb +5 -5
  53. data/test/functional/test_batch.rb +1 -1
  54. data/test/functional/test_batchStream.rb +3 -5
  55. data/test/functional/test_cancelSubscription.rb +3 -5
  56. data/test/functional/test_capture.rb +6 -34
  57. data/test/functional/test_captureGivenAuth.rb +13 -55
  58. data/test/functional/test_configuration.rb +1 -1
  59. data/test/functional/test_createPlan.rb +3 -5
  60. data/test/functional/test_credit.rb +10 -17
  61. data/test/functional/test_deactivate.rb +5 -5
  62. data/test/functional/test_deactivateReversal.rb +4 -5
  63. data/test/functional/test_depositReversal.rb +5 -5
  64. data/test/functional/test_echeckCredit.rb +17 -13
  65. data/test/functional/test_echeckRedeposit.rb +7 -5
  66. data/test/functional/test_echeckSale.rb +42 -21
  67. data/test/functional/test_echeckVerification.rb +19 -20
  68. data/test/functional/test_echeckVoid.rb +3 -2
  69. data/test/functional/test_forceCapture.rb +16 -30
  70. data/test/functional/test_litle_requests.rb +5 -9
  71. data/test/functional/test_load.rb +5 -5
  72. data/test/functional/test_loadReversal.rb +4 -5
  73. data/test/functional/test_override.rb +3 -0
  74. data/test/functional/test_queryTransaction.rb +146 -0
  75. data/test/functional/test_refundReversal.rb +4 -5
  76. data/test/functional/test_sale.rb +94 -170
  77. data/test/functional/test_token.rb +9 -18
  78. data/test/functional/test_unload.rb +5 -5
  79. data/test/functional/test_unloadReversal.rb +5 -6
  80. data/test/functional/test_updateCardValidationNumOnToken.rb +2 -1
  81. data/test/functional/test_updatePlan.rb +4 -5
  82. data/test/functional/test_updateSubscription.rb +5 -5
  83. data/test/functional/test_wallet.rb +74 -0
  84. data/test/functional/test_xmlfields.rb +25 -10
  85. data/test/functional/ts_all.rb +4 -2
  86. data/test/unit/test_LitleAUBatch.rb +1 -1
  87. data/test/unit/test_LitleBatchRequest.rb +4 -4
  88. data/test/unit/test_LitleOnlineRequest.rb +54 -37
  89. data/test/unit/test_LitleRequest.rb +3 -4
  90. data/test/unit/test_LitleTransaction.rb +35 -6
  91. data/test/unit/test_activate.rb +21 -1
  92. data/test/unit/test_activateReversal.rb +1 -1
  93. data/test/unit/test_auth.rb +16 -55
  94. data/test/unit/test_authReversal.rb +1 -1
  95. data/test/unit/test_balanceInquiry.rb +1 -1
  96. data/test/unit/test_cancelSubscription.rb +1 -1
  97. data/test/unit/test_capture.rb +1 -27
  98. data/test/unit/test_captureGivenAuth.rb +18 -44
  99. data/test/unit/test_createPlan.rb +1 -1
  100. data/test/unit/test_credit.rb +3 -16
  101. data/test/unit/test_deactivate.rb +1 -1
  102. data/test/unit/test_deactivateReversal.rb +1 -1
  103. data/test/unit/test_depositReversal.rb +1 -1
  104. data/test/unit/test_echeckCredit.rb +1 -1
  105. data/test/unit/test_echeckRedeposit.rb +1 -1
  106. data/test/unit/test_echeckSale.rb +2 -2
  107. data/test/unit/test_echeckVerification.rb +1 -1
  108. data/test/unit/test_echeckVoid.rb +1 -1
  109. data/test/unit/test_forceCapture.rb +2 -20
  110. data/test/unit/test_load.rb +1 -1
  111. data/test/unit/test_loadReversal.rb +1 -1
  112. data/test/unit/test_queryTransaction.rb +122 -0
  113. data/test/unit/test_refundReversal.rb +1 -1
  114. data/test/unit/test_sale.rb +8 -73
  115. data/test/unit/test_token.rb +8 -15
  116. data/test/unit/test_unload.rb +1 -1
  117. data/test/unit/test_unloadReversal.rb +1 -1
  118. data/test/unit/test_updateCardValidationNumOnToken.rb +1 -1
  119. data/test/unit/test_updatePlan.rb +1 -1
  120. data/test/unit/test_updateSubscription.rb +1 -1
  121. data/test/unit/test_wallet.rb +262 -0
  122. data/test/unit/test_xmlfields.rb +1 -1
  123. data/test/unit/ts_unit.rb +3 -3
  124. metadata +15 -16
  125. data/temp.xml +0 -21
  126. data/test/functional/test_fraudCheck.rb +0 -77
  127. data/test/functional/test_utf8.rb +0 -44
  128. data/test/unit/test_LitleXmlMapper.rb +0 -136
  129. data/test/unit/test_fraudCheck.rb +0 -45
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
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
@@ -27,9 +27,30 @@ require 'test/unit'
27
27
 
28
28
  module LitleOnline
29
29
  class TestSale < Test::Unit::TestCase
30
+ def test_simple_sale_with_card
31
+ hash = {
32
+ 'merchantId' => '101',
33
+ 'id' => 'test',
34
+ 'version'=>'8.8',
35
+ 'reportGroup'=>'Planets',
36
+ 'litleTxnId'=>'123456',
37
+ 'orderId'=>'12344',
38
+ 'amount'=>'106',
39
+ 'orderSource'=>'ecommerce',
40
+ 'card'=>{
41
+ 'type'=>'VI',
42
+ 'number' =>'4100000000000002',
43
+ 'expDate' =>'1210'
44
+ }}
45
+
46
+ response= LitleOnlineRequest.new.sale(hash)
47
+ assert_equal('000', response.saleResponse.response)
48
+ end
49
+
30
50
  def test_simple_sale_with_paypal
31
51
  hash = {
32
52
  'merchantId' => '101',
53
+ 'id' => 'test',
33
54
  'version'=>'8.8',
34
55
  'reportGroup'=>'Planets',
35
56
  'litleTxnId'=>'123456',
@@ -41,13 +62,15 @@ module LitleOnline
41
62
  'token'=>'1234',
42
63
  'transactionId'=>'123456'
43
64
  }}
65
+
44
66
  response= LitleOnlineRequest.new.sale(hash)
45
67
  assert_equal 'Valid Format', response.message
46
68
  end
47
69
 
48
- def test_simple_sale_with_applepay_and_secondaryAmount
70
+ def test_simple_sale_with_applepay_and_secondaryAmount1
49
71
  hash = {
50
72
  'merchantId' => '101',
73
+ 'id' => 'test',
51
74
  'version'=>'8.8',
52
75
  'reportGroup'=>'Planets',
53
76
  'litleTxnId'=>'123456',
@@ -64,7 +87,8 @@ module LitleOnline
64
87
  'transactionId'=>'1234'
65
88
  },
66
89
  'signature' =>'1',
67
- 'version'=>'1.0.0'
90
+ #'version'=>'1'
91
+ 'version'=>'10000'
68
92
  }}
69
93
  response= LitleOnlineRequest.new.sale(hash)
70
94
  assert_equal('Insufficient Funds', response.saleResponse.message)
@@ -74,6 +98,7 @@ module LitleOnline
74
98
  def test_illegal_order_source
75
99
  hash = {
76
100
  'merchantId' => '101',
101
+ 'id' => 'test',
77
102
  'version'=>'8.8',
78
103
  'reportGroup'=>'Planets',
79
104
  'litleTxnId'=>'123456',
@@ -85,15 +110,14 @@ module LitleOnline
85
110
  'number' =>'4100000000000002',
86
111
  'expDate' =>'1210'
87
112
  }}
88
- #Get exceptions
89
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
90
- #Test
91
- assert(exception.message =~ /Error validating xml data against the schema/)
113
+ response= LitleOnlineRequest.new.sale(hash)
114
+ assert(response.message =~ /Error validating xml data against the schema/)
92
115
  end
93
116
 
94
117
  def test_no_report_group
95
118
  hash = {
96
119
  'merchantId' => '101',
120
+ 'id' => 'test',
97
121
  'version'=>'8.8',
98
122
  'reportGroup'=>'Planets',
99
123
  'litleTxnId'=>'123456',
@@ -112,6 +136,7 @@ module LitleOnline
112
136
  def test_fields_out_of_order
113
137
  hash = {
114
138
  'merchantId' => '101',
139
+ 'id' => 'test',
115
140
  'version'=>'8.8',
116
141
  'orderSource'=>'ecommerce',
117
142
  'litleTxnId'=>'123456',
@@ -131,6 +156,7 @@ module LitleOnline
131
156
  def test_invalid_field
132
157
  hash = {
133
158
  'merchantId' => '101',
159
+ 'id' => 'test',
134
160
  'version'=>'8.8',
135
161
  'reportGroup'=>'Planets',
136
162
  'litleTxnId'=>'123456',
@@ -147,9 +173,10 @@ module LitleOnline
147
173
  assert_equal('000', response.saleResponse.response)
148
174
  end
149
175
 
150
- def test_simple_sale_with_card
176
+ def test_simple_sale_with_card1
151
177
  hash = {
152
178
  'merchantId'=>'101',
179
+ 'id' => 'test',
153
180
  'version'=>'8.8',
154
181
  'reportGroup'=>'Planets',
155
182
  'litleTxnId'=>'123456',
@@ -168,6 +195,7 @@ module LitleOnline
168
195
  def test_no_order_id
169
196
  hash = {
170
197
  'merchantId' => '101',
198
+ 'id' => 'test',
171
199
  'version'=>'8.8',
172
200
  'reportGroup'=>'Planets',
173
201
  'litleTxnId'=>'123456',
@@ -178,15 +206,14 @@ module LitleOnline
178
206
  'number' =>'4100000000000002',
179
207
  'expDate' =>'1210'
180
208
  }}
181
- #Get exceptions
182
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
183
- #Test
184
- assert(exception.message =~ /Error validating xml data against the schema/)
209
+ response= LitleOnlineRequest.new.sale(hash)
210
+ assert(response.message =~ /Error validating xml data against the schema/)
185
211
  end
186
212
 
187
213
  def test_no_amount
188
214
  hash = {
189
215
  'merchantId' => '101',
216
+ 'id' => 'test',
190
217
  'version'=>'8.8',
191
218
  'reportGroup'=>'Planets',
192
219
  'litleTxnId'=>'123456',
@@ -197,15 +224,14 @@ module LitleOnline
197
224
  'number' =>'4100000000000002',
198
225
  'expDate' =>'1210'
199
226
  }}
200
- #Get exceptions
201
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
202
- #Test
203
- assert(exception.message =~ /Error validating xml data against the schema/)
227
+ response= LitleOnlineRequest.new.sale(hash)
228
+ assert(response.message =~ /Error validating xml data against the schema/)
204
229
  end
205
230
 
206
231
  def test_no_order_source
207
232
  hash = {
208
233
  'merchantId' => '101',
234
+ 'id' => 'test',
209
235
  'version'=>'8.8',
210
236
  'reportGroup'=>'Planets',
211
237
  'litleTxnId'=>'123456',
@@ -216,15 +242,14 @@ module LitleOnline
216
242
  'number' =>'4100000000000002',
217
243
  'expDate' =>'1210'
218
244
  }}
219
- #Get exceptions
220
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
221
- #Test
222
- assert(exception.message =~ /Error validating xml data against the schema/)
245
+ response= LitleOnlineRequest.new.sale(hash)
246
+ assert(response.message =~ /Error validating xml data against the schema/)
223
247
  end
224
248
 
225
249
  def test_simple_sale_with_mpos
226
250
  hash = {
227
251
  'merchantId' => '101',
252
+ 'id' => 'test',
228
253
  'version'=>'8.8',
229
254
  'reportGroup'=>'Planets',
230
255
  'litleTxnId'=>'123456',
@@ -243,164 +268,63 @@ module LitleOnline
243
268
  response= LitleOnlineRequest.new.sale(hash)
244
269
  assert_equal('000', response.saleResponse.response)
245
270
  end
246
-
247
- def test_simple_sale_with_processingType
248
- hash = {
249
- 'merchantId' => '101',
250
- 'version'=>'8.8',
251
- 'reportGroup'=>'Planets',
252
- 'litleTxnId'=>'123456',
253
- 'orderId'=>'12344',
254
- 'amount'=>'106',
255
- 'orderSource'=>'ecommerce',
256
- 'card'=>
257
- {
258
- 'type'=>'MC',
259
- 'number' =>'5400000000000000',
260
- 'expDate' =>'1210'
261
- },
262
- 'processingType'=>'initialInstallment'
263
- }
264
- response= LitleOnlineRequest.new.sale(hash)
265
- assert_equal('000', response.saleResponse.response)
266
- end
267
-
268
- def test_simple_sale_with_originalNetworkTransactionId_originalTransactionAmount
269
- hash = {
270
- 'merchantId' => '101',
271
- 'version'=>'8.8',
272
- 'reportGroup'=>'Planets',
273
- 'litleTxnId'=>'123456',
274
- 'orderId'=>'12344',
275
- 'amount'=>'106',
276
- 'orderSource'=>'ecommerce',
277
- 'card'=>
278
- {
279
- 'type'=>'MC',
280
- 'number' =>'5400700000000000',
281
- 'expDate' =>'1210'
282
- },
283
- 'originalNetworkTransactionId'=>'98765432109876543210',
284
- 'originalTransactionAmount'=>'7001'
285
- }
286
- response= LitleOnlineRequest.new.sale(hash)
287
- assert_equal('000', response.saleResponse.response)
288
- end
289
271
 
290
- def test_simple_sale_with_networkTxnId_response_cardSuffix_response
291
- hash = {
292
- 'merchantId' => '101',
293
- 'version'=>'8.8',
294
- 'reportGroup'=>'Planets',
295
- 'litleTxnId'=>'123456',
296
- 'orderId'=>'12344',
297
- 'amount'=>'106',
298
- 'orderSource'=>'ecommerce',
299
- 'card'=>
300
- {
301
- 'type'=>'VI',
302
- 'number' =>'4100700000000000',
303
- 'expDate' =>'1210',
304
- 'pin'=>'1111'
305
- },
306
- 'originalNetworkTransactionId'=>'98765432109876543210',
307
- 'originalTransactionAmount'=>'7001'
308
- }
309
- response= LitleOnlineRequest.new.sale(hash)
310
- assert_equal('000', response.saleResponse.response)
311
- assert_equal('123456', response.saleResponse.cardSuffix)
312
- assert_equal('63225578415568556365452427825', response.saleResponse.networkTransactionId)
313
- end
314
-
315
- def test_simple_sale_with_Wallet_Visa
316
- hash = {
317
- 'merchantId' => '101',
318
- 'version'=>'8.8',
319
- 'reportGroup'=>'Planets',
320
- 'litleTxnId'=>'123456',
321
- 'orderId'=>'12344',
322
- 'amount'=>'106',
323
- 'orderSource'=>'ecommerce',
324
- 'card'=>
325
- {
326
- 'type'=>'VI',
327
- 'number' =>'4100700000000000',
328
- 'expDate' =>'1210',
329
- },
330
- 'wallet'=>{
331
- 'walletSourceType'=>'VisaCheckout',
332
- 'walletSourceTypeId'=>'VCIND'
333
- }
334
- }
335
- response= LitleOnlineRequest.new.sale(hash)
336
- assert_equal('000', response.saleResponse.response)
337
- assert_equal('123456', response.saleResponse.cardSuffix)
338
- assert_equal('63225578415568556365452427825', response.saleResponse.networkTransactionId)
339
- end
340
-
341
- def test_simple_sale_with_Wallet_Mastercard
342
- hash = {
343
- 'merchantId' => '101',
344
- 'version'=>'8.8',
345
- 'reportGroup'=>'Planets',
346
- 'litleTxnId'=>'123456',
347
- 'orderId'=>'12344',
348
- 'amount'=>'106',
349
- 'orderSource'=>'ecommerce',
350
- 'card'=>
351
- {
352
- 'type'=>'MC',
353
- 'number' =>'5400000000000000',
354
- 'expDate' =>'1210',
355
- },
356
- 'wallet'=>{
357
- 'walletSourceType'=>'MasterPass',
358
- 'walletSourceTypeId'=>'MasterPass'
359
- }
360
- }
361
- response= LitleOnlineRequest.new.sale(hash)
362
- assert_equal('000', response.saleResponse.response)
363
- end
364
-
365
- def test_simple_sale_with_sepaDirectDebit
366
- hash = {
367
- 'merchantId' => '101',
368
- 'version'=>'8.8',
369
- 'reportGroup'=>'Planets',
370
- 'litleTxnId'=>'123456',
371
- 'orderId'=>'12344',
372
- 'amount'=>'106',
373
- 'orderSource'=>'ecommerce',
374
- 'sepaDirectDebit'=>
375
- {
376
- 'iban'=>'SepaDirectDebit Iban',
377
- 'mandateProvider' =>'Merchant',
378
- 'sequenceType' =>'OneTime',
379
- },
380
- }
272
+ def test_simple_sale_with_applepay_and_secondaryAmount
273
+ hash =
274
+ {
275
+ 'merchantId' => '101',
276
+ 'id' => 'test',
277
+ 'version'=>'8.8',
278
+ 'reportGroup'=>'Planets',
279
+ 'litleTxnId'=>'123456',
280
+ 'orderId'=>'12344',
281
+ 'amount'=>'110',
282
+ 'secondaryAmount'=>'50',
283
+ 'orderSource'=>'ecommerce',
284
+ 'applepay'=>
285
+ {
286
+ 'data'=>'1234',
287
+ 'header'=>
288
+ {
289
+ 'applicationData'=>'454657413164',
290
+ 'ephemeralPublicKey'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
291
+ 'publicKeyHash'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
292
+ 'transactionId'=>'1234'
293
+ },
294
+
295
+ 'signature' =>'1',
296
+ 'version'=>'100000'
297
+ }}
381
298
  response= LitleOnlineRequest.new.sale(hash)
382
- assert_equal('000', response.saleResponse.response)
383
- assert_equal('http://redirect.url.vantiv.com', response.saleResponse.sepaDirectDebitResponse.redirectUrl)
299
+ assert_equal('Insufficient Funds', response.saleResponse.message)
300
+ assert_equal('110', response.saleResponse.applepayResponse.transactionAmount)
384
301
  end
385
-
386
- def test_simple_sale_with_ideal
387
- hash = {
302
+
303
+ #SDK Ruby XML 10
304
+ def test_simple_sale_with_wallet1
305
+ hash =
306
+ {
388
307
  'merchantId' => '101',
308
+ 'id' => 'test',
389
309
  'version'=>'8.8',
390
310
  'reportGroup'=>'Planets',
391
311
  'litleTxnId'=>'123456',
392
312
  'orderId'=>'12344',
393
313
  'amount'=>'106',
394
314
  'orderSource'=>'ecommerce',
395
- 'ideal'=>
396
- {
397
- 'preferredLanguage'=>'AD',
398
- },
399
- }
400
- response= LitleOnlineRequest.new.sale(hash)
401
- assert_equal('000', response.saleResponse.response)
402
- assert_equal('http://redirect.url.vantiv.com', response.saleResponse.idealResponse.redirectUrl)
403
- end
404
-
405
- end
315
+ 'paypal'=>
316
+ {
317
+ 'payerId'=>'1234',
318
+ 'token'=>'1234',
319
+ 'transactionId'=>'123456'
320
+ },
321
+ 'wallet'=>
322
+ {
323
+ 'walletSourceType' => 'MasterPass',
324
+ 'walletSourceTypeId' => '102'
325
+ }}
326
+ response= LitleOnlineRequest.new.sale(hash)
327
+ assert_equal 'Valid Format', response.message
328
+ end
329
+ end
406
330
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
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
  'orderId'=>'12344',
36
37
  'accountNumber'=>'1233456789103801'
@@ -43,6 +44,7 @@ module LitleOnline
43
44
  hash = {
44
45
  'merchantId' => '101',
45
46
  'version'=>'8.8',
47
+ 'id'=>'test',
46
48
  'reportGroup'=>'Planets',
47
49
  'orderId'=>'12344',
48
50
  'paypageRegistrationId'=>'QU1pTFZnV2NGQWZrZzRKeTNVR0lzejB1K2Q5VDdWMTVqb2J5WFJ2Snh4U0U4eTBxaFg2cEVWaDBWSlhtMVZTTw=='
@@ -56,6 +58,7 @@ module LitleOnline
56
58
  hash = {
57
59
  'merchantId' => '101',
58
60
  'version'=>'8.8',
61
+ 'id'=>'test',
59
62
  'reportGroup'=>'Planets',
60
63
  'orderId'=>'12344',
61
64
  'applepay'=>{
@@ -67,7 +70,7 @@ module LitleOnline
67
70
  'transactionId'=>'1234'
68
71
  },
69
72
  'signature' =>'1',
70
- 'version'=>'1.0.0'
73
+ 'version'=>'10000'
71
74
  }
72
75
  }
73
76
  response= LitleOnlineRequest.new.register_token_request(hash)
@@ -79,6 +82,7 @@ module LitleOnline
79
82
  hash = {
80
83
  'reportGroup'=>'Planets',
81
84
  'merchantId' => '101',
85
+ 'id'=>'test',
82
86
  'version'=>'8.8',
83
87
  'orderId'=>'12344',
84
88
  'echeckForToken'=>{'accNum'=>'12344565','routingNum'=>'123476545'}
@@ -91,6 +95,7 @@ module LitleOnline
91
95
  hash = {
92
96
  'merchantId' => '101',
93
97
  'version'=>'8.8',
98
+ 'id'=>'test',
94
99
  'orderId'=>'12344',
95
100
  'accountNumber'=>'1233456789103801',
96
101
  'reportGroup'=>'Planets',
@@ -103,6 +108,7 @@ module LitleOnline
103
108
  hash = {
104
109
  'merchantId' => '101',
105
110
  'version'=>'8.8',
111
+ 'id'=>'test',
106
112
  'NOSUCHFIELD'=>'none',
107
113
  'orderId'=>'12344',
108
114
  'accountNumber'=>'1233456789103801',
@@ -111,21 +117,6 @@ module LitleOnline
111
117
  response= LitleOnlineRequest.new.register_token_request(hash)
112
118
  assert_equal('Valid Format', response.message)
113
119
  end
114
-
115
- def test_simple_token_with_androidpay
116
- hash = {
117
- 'merchantId' => '101',
118
- 'version'=>'8.8',
119
- 'reportGroup'=>'Planets',
120
- 'orderId'=>'androidpay',
121
- 'accountNumber'=>'1233456789103801'
122
- }
123
- response= LitleOnlineRequest.new.register_token_request(hash)
124
- assert_equal('Account number was successfully registered', response.registerTokenResponse.message)
125
- assert_equal('01', response.registerTokenResponse.androidpayResponse.expMonth)
126
- assert_equal('2050', response.registerTokenResponse.androidpayResponse.expYear)
127
- assert_equal('aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1kUXc0dzlXZ1hjUQ0K', response.registerTokenResponse.androidpayResponse.cryptogram)
128
- end
129
-
130
120
  end
121
+
131
122
  end