LitleOnline 10.1.1 → 11.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +13 -6
  3. data/DESCRIPTION +2 -2
  4. data/LICENSE +1 -1
  5. data/README.md +8 -8
  6. data/Rakefile +6 -7
  7. data/SETUP.md +4 -4
  8. data/bin/Setup.rb +4 -4
  9. data/bin/sample_batch_driver.rb +1 -1
  10. data/bin/sample_driver.rb +1 -1
  11. data/lib/Communications.rb +5 -5
  12. data/lib/Configuration.rb +1 -1
  13. data/lib/LitleBatchRequest.rb +39 -1
  14. data/lib/LitleListeners.rb +2 -2
  15. data/lib/LitleOnline.rb +1 -1
  16. data/lib/LitleOnlineRequest.rb +22 -3
  17. data/lib/LitleRequest.rb +4 -4
  18. data/lib/LitleTransaction.rb +156 -47
  19. data/lib/LitleXmlMapper.rb +8 -1
  20. data/lib/XMLFields.rb +252 -51
  21. data/temp.xml +21 -0
  22. data/test/certification/certTest1_base.rb +52 -52
  23. data/test/certification/certTest2_authenhanced.rb +20 -20
  24. data/test/certification/certTest3_authreversal.rb +16 -16
  25. data/test/certification/certTest4_echeck.rb +18 -12
  26. data/test/certification/certTest5_token.rb +3 -3
  27. data/test/certification/certTest_batchAll.rb +9 -1
  28. data/test/certification/ts_all.rb +1 -1
  29. data/test/functional/test_activate.rb +34 -5
  30. data/test/functional/test_activateReversal.rb +23 -7
  31. data/test/functional/test_auth.rb +126 -17
  32. data/test/functional/test_authReversal.rb +5 -3
  33. data/test/functional/test_balanceInquiry.rb +30 -5
  34. data/test/functional/test_batch.rb +1 -1
  35. data/test/functional/test_batchStream.rb +1 -1
  36. data/test/functional/test_cancelSubscription.rb +5 -3
  37. data/test/functional/test_capture.rb +37 -2
  38. data/test/functional/test_captureGivenAuth.rb +54 -3
  39. data/test/functional/test_configuration.rb +1 -1
  40. data/test/functional/test_createPlan.rb +5 -3
  41. data/test/functional/test_credit.rb +17 -1
  42. data/test/functional/test_deactivate.rb +28 -5
  43. data/test/functional/test_deactivateReversal.rb +21 -7
  44. data/test/functional/test_depositReversal.rb +30 -18
  45. data/test/functional/test_echeckCredit.rb +29 -5
  46. data/test/functional/test_echeckRedeposit.rb +28 -3
  47. data/test/functional/test_echeckSale.rb +43 -7
  48. data/test/functional/test_echeckVerification.rb +34 -8
  49. data/test/functional/test_echeckVoid.rb +2 -2
  50. data/test/functional/test_forceCapture.rb +36 -8
  51. data/test/functional/test_fraudCheck.rb +12 -14
  52. data/test/functional/test_giftCardAuthReversal.rb +72 -0
  53. data/test/functional/test_giftCardCapture.rb +72 -0
  54. data/test/functional/test_giftCardCredit.rb +69 -0
  55. data/test/functional/test_litle_requests.rb +1 -1
  56. data/test/functional/test_load.rb +29 -5
  57. data/test/functional/test_loadReversal.rb +21 -7
  58. data/test/functional/test_override.rb +4 -3
  59. data/test/functional/test_queryTransaction.rb +24 -18
  60. data/test/functional/test_refundReversal.rb +21 -7
  61. data/test/functional/test_sale.rb +86 -9
  62. data/test/functional/test_token.rb +26 -11
  63. data/test/functional/test_unload.rb +29 -5
  64. data/test/functional/test_unloadReversal.rb +21 -7
  65. data/test/functional/test_updateCardValidationNumOnToken.rb +1 -1
  66. data/test/functional/test_updatePlan.rb +5 -3
  67. data/test/functional/test_updateSubscription.rb +5 -3
  68. data/test/functional/test_wallet.rb +1 -1
  69. data/test/functional/test_xmlfields.rb +9 -5
  70. data/test/functional/ts_all.rb +1 -1
  71. data/test/unit/test_LitleAUBatch.rb +1 -1
  72. data/test/unit/test_LitleBatchRequest.rb +1 -1
  73. data/test/unit/test_LitleOnlineRequest.rb +15 -57
  74. data/test/unit/test_LitleRequest.rb +1 -1
  75. data/test/unit/test_LitleTransaction.rb +3 -3
  76. data/test/unit/test_LitleXmlMapper.rb +139 -0
  77. data/test/unit/test_activate.rb +5 -5
  78. data/test/unit/test_activateReversal.rb +16 -4
  79. data/test/unit/test_auth.rb +50 -9
  80. data/test/unit/test_authReversal.rb +1 -1
  81. data/test/unit/test_balanceInquiry.rb +3 -3
  82. data/test/unit/test_cancelSubscription.rb +1 -1
  83. data/test/unit/test_capture.rb +27 -1
  84. data/test/unit/test_captureGivenAuth.rb +47 -1
  85. data/test/unit/test_createPlan.rb +1 -1
  86. data/test/unit/test_credit.rb +16 -3
  87. data/test/unit/test_deactivate.rb +20 -1
  88. data/test/unit/test_deactivateReversal.rb +16 -4
  89. data/test/unit/test_depositReversal.rb +18 -6
  90. data/test/unit/test_echeckCredit.rb +20 -1
  91. data/test/unit/test_echeckRedeposit.rb +16 -1
  92. data/test/unit/test_echeckSale.rb +20 -1
  93. data/test/unit/test_echeckVerification.rb +7 -4
  94. data/test/unit/test_echeckVoid.rb +1 -1
  95. data/test/unit/test_forceCapture.rb +19 -1
  96. data/test/unit/test_fraudCheck.rb +1 -1
  97. data/test/unit/test_giftCardAuthReversal.rb +58 -0
  98. data/test/unit/test_giftCardCapture.rb +57 -0
  99. data/test/unit/test_giftCardCredit.rb +57 -0
  100. data/test/unit/test_load.rb +3 -3
  101. data/test/unit/test_loadReversal.rb +16 -4
  102. data/test/unit/test_queryTransaction.rb +5 -22
  103. data/test/unit/test_refundReversal.rb +16 -4
  104. data/test/unit/test_sale.rb +90 -5
  105. data/test/unit/test_token.rb +35 -24
  106. data/test/unit/test_unload.rb +3 -3
  107. data/test/unit/test_unloadReversal.rb +16 -4
  108. data/test/unit/test_updateCardValidationNumOnToken.rb +1 -1
  109. data/test/unit/test_updatePlan.rb +1 -1
  110. data/test/unit/test_updateSubscription.rb +1 -1
  111. data/test/unit/test_wallet.rb +1 -1
  112. data/test/unit/test_xmlfields.rb +1 -1
  113. data/test/unit/ts_unit.rb +1 -1
  114. metadata +18 -10
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -38,13 +38,13 @@ module LitleOnline
38
38
  'orderSource'=>'ecommerce',
39
39
  'card'=>
40
40
  {
41
- 'type'=>'VI',
41
+ 'type'=>'GC',
42
42
  'number' =>'4100000000000001',
43
43
  'expDate' =>'1210'
44
44
  }
45
45
  }
46
46
 
47
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<load reportGroup="Planets"><orderId>11<\/orderId><amount>500<\/amount><orderSource>ecommerce<\/orderSource><card><type>VI<\/type><number>4100000000000001<\/number><expDate>1210<\/expDate><\/card><\/load>.*/m), is_a(Hash))
47
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<load reportGroup="Planets"><orderId>11<\/orderId><amount>500<\/amount><orderSource>ecommerce<\/orderSource><card><type>GC<\/type><number>4100000000000001<\/number><expDate>1210<\/expDate><\/card><\/load>.*/m), is_a(Hash))
48
48
  LitleOnlineRequest.new.load_request(hash)
49
49
  end
50
50
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -33,11 +33,23 @@ module LitleOnline
33
33
  'merchantId' => '101',
34
34
  'version'=>'8.8',
35
35
  'reportGroup'=>'Planets',
36
- 'litleTxnId' => '5000'
36
+ 'litleTxnId' => '5000',
37
+ 'card'=>{
38
+ 'type'=>'GC',
39
+ 'number' =>'400000000000001',
40
+ 'expDate' =>'0150',
41
+ 'pin' => '1234',
42
+ 'cardValidationNum' => '411'
43
+ },
44
+ 'originalRefCode' => '101',
45
+ 'originalAmount' => '34561',
46
+ 'originalTxnTime' => '2017-01-24T09:00:00',
47
+ 'originalSystemTraceId' => '33',
48
+ 'originalSequenceNumber' => '111111',
37
49
  }
38
50
 
39
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<loadReversal reportGroup="Planets"><litleTxnId>5000<\/litleTxnId><\/loadReversal>.*/m), is_a(Hash))
40
- LitleOnlineRequest.new.load_reversal(hash)
51
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>5000<\/litleTxnId><card><type>GC<\/type><number>400000000000001<\/number><expDate>0150<\/expDate><cardValidationNum>411<\/cardValidationNum><pin>1234<\/pin><\/card>.*/m), is_a(Hash))
52
+ LitleOnlineRequest.new.deposit_reversal(hash)
41
53
  end
42
54
  end
43
55
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -57,7 +57,7 @@ class TestQueryTransaction < Test::Unit::TestCase
57
57
  'origActionType' => 'A',
58
58
  'transactionId'=>'123456',
59
59
  'orderId'=>'65347567',
60
- 'origAccountNumber' => '4000000000000001'
60
+ #'origAccountNumber' => '4000000000000001'
61
61
  }
62
62
 
63
63
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*?<litleOnlineRequest.*?<queryTransaction.*?<origId>834262<\/origId><origActionType>A<\/origActionType>.*?<\/queryTransaction>.*?/m), is_a(Hash))
@@ -86,23 +86,6 @@ class TestQueryTransaction < Test::Unit::TestCase
86
86
  LitleOnlineRequest.new.query_Transaction(hash)
87
87
  end
88
88
 
89
-
90
- def test_queryTransaction_no_origId
91
- hash =
92
- {
93
- 'merchantId' => '101',
94
- 'id' => 'test',
95
- 'version'=>'10.0',
96
- 'reportGroup'=>'Some RG',
97
- 'customerId' => '038945',
98
- 'origActionType' => 'A',
99
- 'transactionId'=>'123456'
100
- }
101
-
102
- response= LitleOnlineRequest.new.query_Transaction(hash)
103
- assert(response.message =~ /Error validating xml data against the schema/)
104
- end
105
-
106
89
  def test_queryTransaction_no_origId1
107
90
  hash =
108
91
  {
@@ -111,12 +94,12 @@ class TestQueryTransaction < Test::Unit::TestCase
111
94
  'version'=>'10.0',
112
95
  'reportGroup'=>'Some RG',
113
96
  'customerId' => '038945',
114
- 'origActionType' => 'AAA',
97
+ 'origActionType' => 'A',
115
98
  'transactionId'=>'123456'
116
99
  }
117
100
 
118
- response= LitleOnlineRequest.new.query_Transaction(hash)
119
- assert(response.message =~ /Error validating xml data against the schema/)
101
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*?<litleOnlineRequest.*?<queryTransaction.*?<origActionType>A<\/origActionType>.*?<\/queryTransaction>.*?/m), is_a(Hash))
102
+ LitleOnlineRequest.new.query_Transaction(hash)
120
103
  end
121
104
  end
122
105
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -33,11 +33,23 @@ module LitleOnline
33
33
  'merchantId' => '101',
34
34
  'version'=>'8.8',
35
35
  'reportGroup'=>'Planets',
36
- 'litleTxnId' => '5000'
36
+ 'litleTxnId' => '5000',
37
+ 'card'=>{
38
+ 'type'=>'GC',
39
+ 'number' =>'400000000000001',
40
+ 'expDate' =>'0150',
41
+ 'pin' => '1234',
42
+ 'cardValidationNum' => '411'
43
+ },
44
+ 'originalRefCode' => '101',
45
+ 'originalAmount' => '34561',
46
+ 'originalTxnTime' => '2017-01-24T09:00:00',
47
+ 'originalSystemTraceId' => '33',
48
+ 'originalSequenceNumber' => '111111',
37
49
  }
38
50
 
39
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<refundReversal reportGroup="Planets"><litleTxnId>5000<\/litleTxnId><\/refundReversal>.*/m), is_a(Hash))
40
- LitleOnlineRequest.new.refund_reversal(hash)
51
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>5000<\/litleTxnId><card><type>GC<\/type><number>400000000000001<\/number><expDate>0150<\/expDate><cardValidationNum>411<\/cardValidationNum><pin>1234<\/pin><\/card>.*/m), is_a(Hash))
52
+ LitleOnlineRequest.new.deposit_reversal(hash)
41
53
  end
42
54
  end
43
55
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -256,8 +256,7 @@ module LitleOnline
256
256
  }
257
257
  }
258
258
 
259
- XMLObject.expects(:new)
260
- Communications.expects(:http_post).with(regexp_matches(/.*<merchantData>.*?<affiliate>bar<\/affiliate>.*?<\/merchantData>.*/m),kind_of(Hash))
259
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<merchantData>.*?<affiliate>bar<\/affiliate>.*?<\/merchantData>.*/m), is_a(Hash))
261
260
  LitleOnlineRequest.new.sale(hash)
262
261
  end
263
262
 
@@ -292,8 +291,7 @@ module LitleOnline
292
291
  'fraudFilterOverride'=> 'false'
293
292
  }
294
293
 
295
- XMLObject.expects(:new)
296
- Communications.expects(:http_post).with(regexp_matches(/.*<sale.*?<fraudFilterOverride>false<\/fraudFilterOverride>.*?<\/sale>.*/m),kind_of(Hash))
294
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<sale.*?<fraudFilterOverride>false<\/fraudFilterOverride>.*?<\/sale>.*/m), is_a(Hash))
297
295
  LitleOnlineRequest.new.sale(hash)
298
296
  end
299
297
 
@@ -461,6 +459,93 @@ module LitleOnline
461
459
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*<advancedFraudChecks><threatMetrixSessionId>1234<\/threatMetrixSessionId><\/advancedFraudChecks>.*/m), is_a(Hash))
462
460
  LitleOnlineRequest.new.sale(hash)
463
461
  end
462
+
463
+ def test_processingType
464
+ hash = {
465
+ 'merchantId' => '101',
466
+ 'version'=>'8.8',
467
+ 'reportGroup'=>'Planets',
468
+ 'litleTxnId'=>'123456',
469
+ 'orderId'=>'12344',
470
+ 'amount'=>'106',
471
+ 'orderSource'=>'ecommerce',
472
+ 'card'=>
473
+ {
474
+ 'type'=>'MC',
475
+ 'number' =>'5400000000000000',
476
+ 'expDate' =>'1210'
477
+ },
478
+ 'processingType'=>'initialInstallment'
479
+ }
480
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<processingType>initialInstallment<\/processingType>.*/m), is_a(Hash))
481
+ LitleOnlineRequest.new.sale(hash)
482
+ end
483
+
484
+ def test_originalNetworkTransactionId_originalTransactionAmount_pin
485
+ hash = {
486
+ 'merchantId' => '101',
487
+ 'version'=>'8.8',
488
+ 'reportGroup'=>'Planets',
489
+ 'litleTxnId'=>'123456',
490
+ 'orderId'=>'12344',
491
+ 'amount'=>'106',
492
+ 'orderSource'=>'ecommerce',
493
+ 'card'=>
494
+ {
495
+ 'type'=>'VI',
496
+ 'number' =>'4100700000000000',
497
+ 'expDate' =>'1210',
498
+ 'pin'=>'1111'
499
+ },
500
+ 'originalNetworkTransactionId'=>'98765432109876543210',
501
+ 'originalTransactionAmount'=>'7001'
502
+ }
503
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<originalNetworkTransactionId>98765432109876543210<\/originalNetworkTransactionId><originalTransactionAmount>7001<\/originalTransactionAmount>.*/m), is_a(Hash))
504
+ LitleOnlineRequest.new.sale(hash)
505
+ end
506
+
507
+ def test_wallet
508
+ hash = {
509
+ 'merchantId' => '101',
510
+ 'version'=>'8.8',
511
+ 'reportGroup'=>'Planets',
512
+ 'litleTxnId'=>'123456',
513
+ 'orderId'=>'12344',
514
+ 'amount'=>'106',
515
+ 'orderSource'=>'ecommerce',
516
+ 'card'=>
517
+ {
518
+ 'type'=>'VI',
519
+ 'number' =>'4100700000000000',
520
+ 'expDate' =>'1210',
521
+ },
522
+ 'wallet'=>{
523
+ 'walletSourceType'=>'VisaCheckout',
524
+ 'walletSourceTypeId'=>'VCIND'
525
+ }
526
+ }
527
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<wallet><walletSourceType>VisaCheckout<\/walletSourceType><walletSourceTypeId>VCIND<\/walletSourceTypeId><\/wallet>.*/m), is_a(Hash))
528
+ LitleOnlineRequest.new.sale(hash)
529
+ end
530
+
531
+
532
+ def test_sepaDirectDebit
533
+ hash = {
534
+ 'merchantId' => '101',
535
+ 'version'=>'8.8',
536
+ 'reportGroup'=>'Planets',
537
+ 'litleTxnId'=>'123456',
538
+ 'orderId'=>'12344',
539
+ 'amount'=>'106',
540
+ 'orderSource'=>'ecommerce',
541
+ 'sepaDirectDebit'=> {
542
+ 'mandateProvider'=>'Merchant',
543
+ 'sequenceType'=>'OneTime',
544
+ 'iban'=>'123456789123456789',
545
+ }}
546
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<sepaDirectDebit><mandateProvider>Merchant<\/mandateProvider><sequenceType>OneTime<\/sequenceType><iban>123456789123456789<\/iban><\/sepaDirectDebit>.*/m), is_a(Hash))
547
+ LitleOnlineRequest.new.sale(hash)
548
+ end
464
549
 
465
550
  end
466
551
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -35,17 +35,17 @@ module LitleOnline
35
35
  'reportGroup'=>'Planets',
36
36
  'orderId'=>'12344',
37
37
  'applepay'=>{
38
- 'data'=>'user',
39
- 'header'=>{
40
- 'applicationData'=>'454657413164',
41
- 'ephemeralPublicKey'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
42
- 'publicKeyHash'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
43
- 'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
44
- },
45
- 'signature' =>'sign',
46
- # 'version' =>'1'
47
- # SDL Ruby XML 10
48
- 'version' =>'10000'
38
+ 'data'=>'user',
39
+ 'header'=>{
40
+ 'applicationData'=>'454657413164',
41
+ 'ephemeralPublicKey'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
42
+ 'publicKeyHash'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
43
+ 'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
44
+ },
45
+ 'signature' =>'sign',
46
+ # 'version' =>'1'
47
+ # SDL Ruby XML 10
48
+ 'version' =>'10000'
49
49
  }
50
50
  }
51
51
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*?<litleOnlineRequest.*?<registerTokenRequest.*?<applepay>.*?<data>user<\/data>.*?<\/applepay>.*?<\/registerTokenRequest>.*?/m), is_a(Hash))
@@ -60,17 +60,17 @@ module LitleOnline
60
60
  'orderId'=>'12344',
61
61
  'accountNumber'=>'1233456789101112',
62
62
  'applepay'=>{
63
- 'data'=>'user',
64
- 'header'=>{
65
- 'applicationData'=>'454657413164',
66
- 'ephemeralPublicKey'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
67
- 'publicKeyHash'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
68
- 'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
69
- },
70
- 'signature' =>'sign',
71
- # 'version' =>'1'
72
- # SDL Ruby XML 10
73
- 'version' =>'10000'
63
+ 'data'=>'user',
64
+ 'header'=>{
65
+ 'applicationData'=>'454657413164',
66
+ 'ephemeralPublicKey'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
67
+ 'publicKeyHash'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
68
+ 'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
69
+ },
70
+ 'signature' =>'sign',
71
+ # 'version' =>'1'
72
+ # SDL Ruby XML 10
73
+ 'version' =>'10000'
74
74
  }
75
75
  }
76
76
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.register_token_request(hash)}
@@ -143,6 +143,17 @@ module LitleOnline
143
143
  LitleOnlineRequest.new.register_token_request(hash)
144
144
  end
145
145
 
146
+ def test_androidpay
147
+ hash = {
148
+ 'merchantId' => '101',
149
+ 'version'=>'8.8',
150
+ 'reportGroup'=>'Planets',
151
+ 'id'=>'test',
152
+ 'orderId'=>'androidpay',
153
+ 'accountNumber'=>'1233456789103801'
154
+ }
155
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<orderId>androidpay<\/orderId>.*<accountNumber>1233456789103801<\/accountNumber>.*/m), is_a(Hash))
156
+ LitleOnlineRequest.new.register_token_request(hash)
157
+ end
146
158
  end
147
-
148
159
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -38,13 +38,13 @@ module LitleOnline
38
38
  'orderSource'=>'ecommerce',
39
39
  'card'=>
40
40
  {
41
- 'type'=>'VI',
41
+ 'type'=>'GC',
42
42
  'number' =>'4100000000000001',
43
43
  'expDate' =>'1210'
44
44
  }
45
45
  }
46
46
 
47
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<unload reportGroup="Planets"><orderId>11<\/orderId><amount>500<\/amount><orderSource>ecommerce<\/orderSource><card><type>VI<\/type><number>4100000000000001<\/number><expDate>1210<\/expDate><\/card><\/unload>.*/m), is_a(Hash))
47
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<unload reportGroup="Planets"><orderId>11<\/orderId><amount>500<\/amount><orderSource>ecommerce<\/orderSource><card><type>GC<\/type><number>4100000000000001<\/number><expDate>1210<\/expDate><\/card><\/unload>.*/m), is_a(Hash))
48
48
  LitleOnlineRequest.new.unload_request(hash)
49
49
  end
50
50
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -33,11 +33,23 @@ module LitleOnline
33
33
  'merchantId' => '101',
34
34
  'version'=>'8.8',
35
35
  'reportGroup'=>'Planets',
36
- 'litleTxnId' => '5000'
36
+ 'litleTxnId' => '5000',
37
+ 'card'=>{
38
+ 'type'=>'GC',
39
+ 'number' =>'400000000000001',
40
+ 'expDate' =>'0150',
41
+ 'pin' => '1234',
42
+ 'cardValidationNum' => '411'
43
+ },
44
+ 'originalRefCode' => '101',
45
+ 'originalAmount' => '34561',
46
+ 'originalTxnTime' => '2017-01-24T09:00:00',
47
+ 'originalSystemTraceId' => '33',
48
+ 'originalSequenceNumber' => '111111',
37
49
  }
38
50
 
39
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<unloadReversal reportGroup="Planets"><litleTxnId>5000<\/litleTxnId><\/unloadReversal>.*/m), is_a(Hash))
40
- LitleOnlineRequest.new.unload_reversal(hash)
51
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>5000<\/litleTxnId><card><type>GC<\/type><number>400000000000001<\/number><expDate>0150<\/expDate><cardValidationNum>411<\/cardValidationNum><pin>1234<\/pin><\/card>.*/m), is_a(Hash))
52
+ LitleOnlineRequest.new.deposit_reversal(hash)
41
53
  end
42
54
  end
43
55
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2011 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation