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
@@ -33,6 +33,7 @@ def test_simple
33
33
  hash = {
34
34
  'merchantId' => '101',
35
35
  'version'=>'8.8',
36
+ 'id'=>'test',
36
37
  'reportGroup'=>'Planets',
37
38
  'litleTxnId' =>'5000'
38
39
  }
@@ -46,13 +47,12 @@ def test_simple
46
47
  hash = {
47
48
  'merchantId' => '101',
48
49
  'version'=>'8.8',
50
+ 'id'=>'test',
49
51
  'reportGroup'=>'Planets',
50
52
  }
51
53
 
52
- #Get exceptions
53
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.deposit_reversal(hash)}
54
- #Test
55
- assert(exception.message =~ /Error validating xml data against the schema/)
54
+ response= LitleOnlineRequest.new.deposit_reversal(hash)
55
+ assert(response.message =~ /Error validating xml data against the schema/)
56
56
  end
57
57
  end
58
58
  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
  'litleTxnId'=>'123456789101112',
36
37
  'amount'=>'12'
@@ -43,25 +44,25 @@ module LitleOnline
43
44
  hash = {
44
45
  'merchantId' => '101',
45
46
  'version'=>'8.8',
47
+ 'id'=>'test',
46
48
  'reportGroup'=>'Planets',
47
49
  }
48
- #Get exceptions
49
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_credit(hash)}
50
- #Test
51
- assert(exception.message =~ /The content of element 'echeckCredit' is not complete/)
50
+ response = LitleOnlineRequest.new.echeck_credit(hash)
51
+ assert_match /The content of element 'echeckCredit' is not complete/, response.message
52
52
  end
53
53
 
54
54
  def test_echeck_credit_with_echeck
55
55
  hash = {
56
56
  'merchantId' => '101',
57
57
  'version'=>'8.8',
58
+ 'id'=>'test',
58
59
  'reportGroup'=>'Planets',
59
60
  'amount'=>'123456',
60
61
  'verify'=>'true',
61
62
  'orderId'=>'12345',
62
63
  'orderSource'=>'ecommerce',
63
64
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
64
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
65
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
65
66
  }
66
67
  response= LitleOnlineRequest.new.echeck_credit(hash)
67
68
  assert_equal('Valid Format', response.message)
@@ -71,13 +72,14 @@ module LitleOnline
71
72
  hash = {
72
73
  'merchantId' => '101',
73
74
  'version'=>'8.8',
75
+ 'id'=>'test',
74
76
  'reportGroup'=>'Planets',
75
77
  'amount'=>'123456',
76
78
  'verify'=>'true',
77
79
  'orderId'=>'12345',
78
80
  'orderSource'=>'ecommerce',
79
81
  'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
80
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
82
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
81
83
  }
82
84
  response= LitleOnlineRequest.new.echeck_credit(hash)
83
85
  assert_equal('Valid Format', response.message)
@@ -87,6 +89,7 @@ module LitleOnline
87
89
  hash = {
88
90
  'merchantId' => '101',
89
91
  'version'=>'8.8',
92
+ 'id'=>'test',
90
93
  'reportGroup'=>'Planets',
91
94
  'amount'=>'123',
92
95
  'invalidfield'=>'nonexistant',
@@ -94,7 +97,7 @@ module LitleOnline
94
97
  'verify'=>'true',
95
98
  'orderId'=>'12345',
96
99
  'orderSource'=>'ecommerce',
97
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
100
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
98
101
  }
99
102
  response= LitleOnlineRequest.new.echeck_credit(hash)
100
103
  assert_equal('Valid Format', response.message)
@@ -104,6 +107,7 @@ module LitleOnline
104
107
  hash = {
105
108
  'merchantId' => '101',
106
109
  'version'=>'8.8',
110
+ 'id'=>'test',
107
111
  'reportGroup'=>'Planets',
108
112
  'amount'=>'123',
109
113
  'invalidfield'=>'nonexistant',
@@ -112,16 +116,15 @@ module LitleOnline
112
116
  'orderId'=>'12345',
113
117
  'orderSource'=>'ecommerce',
114
118
  }
115
- #Get exceptions
116
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_credit(hash)}
117
- #Test
118
- assert(exception.message =~ /Error validating xml data against the schema/)
119
+ response= LitleOnlineRequest.new.echeck_credit(hash)
120
+ assert(response.message =~ /Error validating xml data against the schema/)
119
121
  end
120
122
 
121
123
  def test_echeck_credit_with_secondaryAmount
122
124
  hash = {
123
125
  'merchantId' => '101',
124
126
  'version'=>'8.8',
127
+ 'id'=>'test',
125
128
  'reportGroup'=>'Planets',
126
129
  'amount'=>'123456',
127
130
  'secondaryAmount'=>'50',
@@ -129,7 +132,7 @@ module LitleOnline
129
132
  'orderId'=>'12345',
130
133
  'orderSource'=>'ecommerce',
131
134
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
132
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
135
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
133
136
  }
134
137
  response= LitleOnlineRequest.new.echeck_credit(hash)
135
138
  assert_equal('Valid Format', response.message)
@@ -139,6 +142,7 @@ module LitleOnline
139
142
  hash = {
140
143
  'merchantId' => '101',
141
144
  'version'=>'8.8',
145
+ 'id'=>'test',
142
146
  'reportGroup'=>'Planets',
143
147
  'litleTxnId'=>'123456789101112',
144
148
  'amount'=>'12',
@@ -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
  'litleTxnId'=>'123456'
36
37
  }
@@ -42,6 +43,7 @@ module LitleOnline
42
43
  hash = {
43
44
  'merchantId' => '101',
44
45
  'version'=>'8.8',
46
+ 'id'=>'test',
45
47
  'reportGroup'=>'Planets',
46
48
  'litleTxnId'=>'123456',
47
49
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'}
@@ -54,6 +56,7 @@ module LitleOnline
54
56
  hash = {
55
57
  'merchantId' => '101',
56
58
  'version'=>'8.8',
59
+ 'id'=>'test',
57
60
  'reportGroup'=>'Planets',
58
61
  'litleTxnId'=>'123456',
59
62
  'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'}
@@ -66,6 +69,7 @@ module LitleOnline
66
69
  hash = {
67
70
  'merchantId' => '101',
68
71
  'version'=>'8.8',
72
+ 'id'=>'test',
69
73
  'reportGroup'=>'Planets',
70
74
  'invalidfield'=>'nonexistant',
71
75
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
@@ -81,10 +85,8 @@ module LitleOnline
81
85
  'version'=>'8.8',
82
86
  'reportGroup'=>'Planets',
83
87
  }
84
- #Get exceptions
85
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_redeposit(hash)}
86
- #Test
87
- assert(exception.message =~ /Error validating xml data against the schema/)
88
+ response= LitleOnlineRequest.new.echeck_redeposit(hash)
89
+ assert(response.message =~ /Error validating xml data against the schema/)
88
90
  end
89
91
  end
90
92
  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
@@ -27,30 +27,46 @@ require 'test/unit'
27
27
 
28
28
  module LitleOnline
29
29
  class Test_echeckSale < Test::Unit::TestCase
30
+ def test_echeck_sale_with_echeck
31
+ hash = {
32
+ 'merchantId' => '101',
33
+ 'version'=>'8.8',
34
+ 'id'=>'test',
35
+ 'reportGroup'=>'Planets',
36
+ 'amount'=>'123456',
37
+ 'verify'=>'true',
38
+ 'orderId'=>'12345',
39
+ 'orderSource'=>'ecommerce',
40
+ 'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
41
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
42
+ }
43
+ response= LitleOnlineRequest.new.echeck_sale(hash)
44
+ assert_equal('Valid Format', response.message)
45
+ end
30
46
 
31
47
  def test_no_amount
32
48
  hash = {
33
49
  'merchantId' => '101',
34
50
  'version'=>'8.8',
51
+ 'id'=>'test',
35
52
  'reportGroup'=>'Planets'
36
53
  }
37
- #Get exceptions
38
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_sale(hash)}
39
- #Test
40
- assert(exception.message =~ /The content of element 'echeckSale' is not complete/)
54
+ response = LitleOnlineRequest.new.echeck_sale(hash)
55
+ assert_match /The content of element 'echeckSale' is not complete/, response.message
41
56
  end
42
57
 
43
- def test_echeck_sale_with_echeck
58
+ def test_echeck_sale_with_echeck1
44
59
  hash = {
45
60
  'merchantId' => '101',
46
61
  'version'=>'8.8',
62
+ 'id'=>'test',
47
63
  'reportGroup'=>'Planets',
48
64
  'amount'=>'123456',
49
65
  'verify'=>'true',
50
66
  'orderId'=>'12345',
51
67
  'orderSource'=>'ecommerce',
52
68
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
53
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
69
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
54
70
  }
55
71
  response= LitleOnlineRequest.new.echeck_sale(hash)
56
72
  assert_equal('Valid Format', response.message)
@@ -60,14 +76,15 @@ module LitleOnline
60
76
  hash = {
61
77
  'merchantId' => '101',
62
78
  'version'=>'8.8',
79
+ 'id'=>'test',
63
80
  'reportGroup'=>'Planets',
64
81
  'amount'=>'123456',
65
82
  'verify'=>'true',
66
83
  'orderId'=>'12345',
67
84
  'orderSource'=>'ecommerce',
68
85
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
69
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'},
70
- 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
86
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
87
+ 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
71
88
  }
72
89
  response= LitleOnlineRequest.new.echeck_sale(hash)
73
90
  assert_equal('Valid Format', response.message)
@@ -77,6 +94,7 @@ module LitleOnline
77
94
  hash = {
78
95
  'merchantId' => '101',
79
96
  'version'=>'8.8',
97
+ 'id'=>'test',
80
98
  'reportGroup'=>'Planets',
81
99
  'amount'=>'123456',
82
100
  'verify'=>'true',
@@ -84,7 +102,7 @@ module LitleOnline
84
102
  'orderSource'=>'ecommerce',
85
103
  'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
86
104
  'customBilling'=>{'phone'=>'123456789','descriptor'=>'good'},
87
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
105
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
88
106
  }
89
107
  response= LitleOnlineRequest.new.echeck_sale(hash)
90
108
  assert_equal('Valid Format', response.message)
@@ -94,6 +112,7 @@ module LitleOnline
94
112
  hash = {
95
113
  'merchantId' => '101',
96
114
  'version'=>'8.8',
115
+ 'id'=>'test',
97
116
  'reportGroup'=>'Planets',
98
117
  'amount'=>'123',
99
118
  'invalidfield'=>'nonexistant',
@@ -101,7 +120,7 @@ module LitleOnline
101
120
  'verify'=>'true',
102
121
  'orderId'=>'12345',
103
122
  'orderSource'=>'ecommerce',
104
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
123
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
105
124
  }
106
125
  response= LitleOnlineRequest.new.echeck_sale(hash)
107
126
  assert_equal('Valid Format', response.message)
@@ -111,6 +130,7 @@ module LitleOnline
111
130
  hash = {
112
131
  'merchantId' => '101',
113
132
  'version'=>'8.8',
133
+ 'id'=>'test',
114
134
  'reportGroup'=>'Planets',
115
135
  'amount'=>'123',
116
136
  'invalidfield'=>'nonexistant',
@@ -119,15 +139,14 @@ module LitleOnline
119
139
  'orderId'=>'12345',
120
140
  'orderSource'=>'ecommerce',
121
141
  }
122
- #Get exceptions
123
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_sale(hash)}
124
- #Test
125
- assert(exception.message =~ /Error validating xml data against the schema/)
142
+ response= LitleOnlineRequest.new.echeck_sale(hash)
143
+ assert(response.message =~ /Error validating xml data against the schema/)
126
144
  end
127
145
 
128
146
  def test_simple_echeck_sale
129
147
  hash = {
130
148
  'reportGroup'=>'Planets',
149
+ 'id'=>'test',
131
150
  'litleTxnId'=>'123456789101112',
132
151
  'amount'=>'12'
133
152
  }
@@ -138,6 +157,7 @@ module LitleOnline
138
157
  def test_simple_echeck_sale_with_custom_billing
139
158
  hash = {
140
159
  'reportGroup'=>'Planets',
160
+ 'id'=>'test',
141
161
  'litleTxnId'=>'123456',
142
162
  'amount'=>'10',
143
163
  }
@@ -149,6 +169,7 @@ module LitleOnline
149
169
  hash = {
150
170
  'merchantId' => '101',
151
171
  'version'=>'8.8',
172
+ 'id'=>'test',
152
173
  'reportGroup'=>'Planets',
153
174
  'amount'=>'123456',
154
175
  'secondaryAmount'=>'50',
@@ -156,7 +177,7 @@ module LitleOnline
156
177
  'orderId'=>'12345',
157
178
  'orderSource'=>'ecommerce',
158
179
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455','ccdPaymentInformation'=>'12345678901234567890123456789012345678901234567890123456789012345678901234567890'},
159
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
180
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
160
181
  }
161
182
  response= LitleOnlineRequest.new.echeck_sale(hash)
162
183
  assert_equal('Valid Format', response.message)
@@ -166,6 +187,7 @@ module LitleOnline
166
187
  hash = {
167
188
  'merchantId' => '101',
168
189
  'version'=>'8.8',
190
+ 'id'=>'test',
169
191
  'reportGroup'=>'Planets',
170
192
  'amount'=>'123456',
171
193
  'secondaryAmount'=>'50',
@@ -173,7 +195,7 @@ module LitleOnline
173
195
  'orderId'=>'12345',
174
196
  'orderSource'=>'ecommerce',
175
197
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455','ccdPaymentInformation'=>'123456789012345678901234567890123456789012345678901234567890123456789012345678901'},
176
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
198
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
177
199
  }
178
200
  assert_raises RuntimeError do
179
201
  response= LitleOnlineRequest.new.echeck_sale(hash)
@@ -184,14 +206,13 @@ module LitleOnline
184
206
  def test_echeck_sale_with_txnId_secondaryAmount
185
207
  hash = {
186
208
  'reportGroup'=>'Planets',
209
+ 'id'=>'test',
187
210
  'litleTxnId'=>'123456789101112',
188
211
  'amount'=>'12',
189
212
  'secondaryAmount'=>'50'
190
213
  }
191
- #Get exceptions
192
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_sale(hash)}
193
- #Test
194
- assert(exception.message =~ /Error validating xml data against the schema/)
214
+ response= LitleOnlineRequest.new.echeck_sale(hash)
215
+ assert(response.message=~/Error validating xml data against the schema.*/)
195
216
  end
196
217
 
197
218
  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
@@ -32,12 +32,13 @@ module LitleOnline
32
32
  hash = {
33
33
  'merchantId' => '101',
34
34
  'version'=>'8.8',
35
+ 'id'=>'test',
35
36
  'reportGroup'=>'Planets',
36
37
  'amount'=>'123456',
37
38
  'orderId'=>'12345',
38
39
  'orderSource'=>'ecommerce',
39
40
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
40
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
41
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
41
42
  }
42
43
  response= LitleOnlineRequest.new.echeck_verification(hash)
43
44
  assert_equal('Valid Format', response.message)
@@ -47,12 +48,13 @@ module LitleOnline
47
48
  hash = {
48
49
  'merchantId' => '101',
49
50
  'version'=>'8.8',
51
+ 'id'=>'test',
50
52
  'reportGroup'=>'Planets',
51
53
  'amount'=>'123456',
52
54
  'orderId'=>'12345',
53
55
  'orderSource'=>'ecommerce',
54
56
  'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
55
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
57
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
56
58
  }
57
59
  response= LitleOnlineRequest.new.echeck_verification(hash)
58
60
  assert_equal('Valid Format', response.message)
@@ -62,13 +64,14 @@ module LitleOnline
62
64
  hash = {
63
65
  'merchantId' => '101',
64
66
  'version'=>'8.8',
67
+ 'id'=>'test',
65
68
  'reportGroup'=>'Planets',
66
69
  'amount'=>'123',
67
70
  'invalidfield'=>'nonexistant',
68
71
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
69
72
  'orderId'=>'12345',
70
73
  'orderSource'=>'ecommerce',
71
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'}
74
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
72
75
  }
73
76
  response= LitleOnlineRequest.new.echeck_verification(hash)
74
77
  assert_equal('Valid Format', response.message)
@@ -78,6 +81,7 @@ module LitleOnline
78
81
  hash = {
79
82
  'merchantId' => '101',
80
83
  'version'=>'8.8',
84
+ 'id'=>'test',
81
85
  'reportGroup'=>'Planets',
82
86
  'amount'=>'123',
83
87
  'invalidfield'=>'nonexistant',
@@ -85,49 +89,44 @@ module LitleOnline
85
89
  'orderId'=>'12345',
86
90
  'orderSource'=>'ecommerce',
87
91
  }
88
- #Get exceptions
89
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
90
- #Test
91
- assert(exception.message =~ /Error validating xml data against the schema/)
92
+ response= LitleOnlineRequest.new.echeck_verification(hash)
93
+ assert(response.message =~ /Error validating xml data against the schema/)
92
94
  end
93
95
 
94
96
  def test_no_amount
95
97
  hash = {
96
98
  'merchantId' => '101',
97
99
  'version'=>'8.8',
100
+ 'id'=>'test',
98
101
  'reportGroup'=>'Planets',
99
102
  'orderId'=>'12345'
100
103
  }
101
- #Get exceptions
102
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
103
- #Test
104
- assert(exception.message =~ /Error validating xml data against the schema/)
104
+ response= LitleOnlineRequest.new.echeck_verification(hash)
105
+ assert(response.message =~ /Error validating xml data against the schema/)
105
106
  end
106
107
 
107
108
  def test_no_order_id
108
109
  hash = {
109
110
  'merchantId' => '101',
110
111
  'version'=>'8.8',
112
+ 'id'=>'test',
111
113
  'reportGroup'=>'Planets',
112
114
  }
113
- #Get exceptions
114
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
115
- #Test
116
- assert(exception.message =~ /Error validating xml data against the schema/)
115
+ response= LitleOnlineRequest.new.echeck_verification(hash)
116
+ assert(response.message =~ /Error validating xml data against the schema/)
117
117
  end
118
118
 
119
119
  def test_no_order_source
120
120
  hash = {
121
121
  'merchantId' => '101',
122
122
  'version'=>'8.8',
123
+ 'id'=>'test',
123
124
  'reportGroup'=>'Planets',
124
125
  'amount'=>'123456',
125
126
  'orderId'=>'12345'
126
127
  }
127
- #Get exceptions
128
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
129
- #Test
130
- assert(exception.message =~ /Error validating xml data against the schema/)
128
+ response= LitleOnlineRequest.new.echeck_verification(hash)
129
+ assert(response.message =~ /Error validating xml data against the schema/)
131
130
  end
132
131
 
133
132
  end