LitleOnline 8.12.3 → 8.12.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/CHANGELOG +4 -0
  2. data/Rakefile +1 -1
  3. data/lib/Communications.rb +34 -32
  4. data/lib/Configuration.rb +13 -11
  5. data/lib/LitleOnline.rb +0 -1
  6. data/lib/LitleOnlineRequest.rb +546 -543
  7. data/lib/LitleXmlMapper.rb +17 -15
  8. data/lib/XMLFields.rb +903 -901
  9. data/test/certification/certTest1_base.rb +935 -933
  10. data/test/certification/certTest2_authenhanced.rb +548 -546
  11. data/test/certification/certTest3_authreversal.rb +179 -177
  12. data/test/certification/certTest4_echeck.rb +245 -243
  13. data/test/certification/certTest5_token.rb +198 -196
  14. data/test/functional/test_auth.rb +205 -204
  15. data/test/functional/test_authReversal.rb +41 -39
  16. data/test/functional/test_capture.rb +54 -52
  17. data/test/functional/test_captureGivenAuth.rb +153 -152
  18. data/test/functional/test_credit.rb +126 -126
  19. data/test/functional/test_echeckCredit.rb +88 -87
  20. data/test/functional/test_echeckRedeposit.rb +85 -84
  21. data/test/functional/test_echeckSale.rb +132 -131
  22. data/test/functional/test_echeckVerification.rb +97 -95
  23. data/test/functional/test_forceCapture.rb +113 -111
  24. data/test/functional/test_sale.rb +200 -198
  25. data/test/functional/test_token.rb +75 -73
  26. data/test/functional/test_xmlfields.rb +558 -558
  27. data/test/unit/test_LitleOnlineRequest.rb +210 -207
  28. data/test/unit/test_auth.rb +119 -116
  29. data/test/unit/test_authReversal.rb +16 -16
  30. data/test/unit/test_capture.rb +10 -8
  31. data/test/unit/test_captureGivenAuth.rb +62 -59
  32. data/test/unit/test_credit.rb +103 -100
  33. data/test/unit/test_echeckCredit.rb +15 -14
  34. data/test/unit/test_echeckRedeposit.rb +14 -13
  35. data/test/unit/test_echeckSale.rb +16 -15
  36. data/test/unit/test_echeckVerification.rb +14 -13
  37. data/test/unit/test_forceCapture.rb +61 -58
  38. data/test/unit/test_sale.rb +206 -205
  39. data/test/unit/test_token.rb +43 -41
  40. data/test/unit/test_xmlfields.rb +101 -99
  41. metadata +58 -77
  42. data/lib/Obj2xml.rb +0 -37
@@ -25,116 +25,118 @@ OTHER DEALINGS IN THE SOFTWARE.
25
25
  require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
27
 
28
- class TestForceCapture < Test::Unit::TestCase
29
- def test_simple_force_capture_with_card
30
- hash = {
31
- 'merchantId' => '101',
32
- 'version'=>'8.8',
33
- 'reportGroup'=>'Planets',
34
- 'litleTxnId'=>'123456',
35
- 'orderId'=>'12344',
36
- 'amount'=>'106',
37
- 'orderSource'=>'ecommerce',
38
- 'card'=>{
39
- 'type'=>'VI',
40
- 'number' =>'4100000000000001',
41
- 'expDate' =>'1210'
42
- }}
43
- response= LitleOnlineRequest.new.force_capture(hash)
44
- assert_equal('000', response.forceCaptureResponse.response)
28
+ module LitleOnline
29
+ class TestForceCapture < Test::Unit::TestCase
30
+ def test_simple_force_capture_with_card
31
+ hash = {
32
+ 'merchantId' => '101',
33
+ 'version'=>'8.8',
34
+ 'reportGroup'=>'Planets',
35
+ 'litleTxnId'=>'123456',
36
+ 'orderId'=>'12344',
37
+ 'amount'=>'106',
38
+ 'orderSource'=>'ecommerce',
39
+ 'card'=>{
40
+ 'type'=>'VI',
41
+ 'number' =>'4100000000000001',
42
+ 'expDate' =>'1210'
43
+ }}
44
+ response= LitleOnlineRequest.new.force_capture(hash)
45
+ assert_equal('000', response.forceCaptureResponse.response)
46
+ end
47
+
48
+ def test_simple_force_capture_with_token
49
+ hash = {
50
+ 'merchantId' => '101',
51
+ 'version'=>'8.8',
52
+ 'reportGroup'=>'Planets',
53
+ 'litleTxnId'=>'123456',
54
+ 'orderId'=>'12344',
55
+ 'amount'=>'106',
56
+ 'orderSource'=>'ecommerce',
57
+ 'token'=> {
58
+ 'litleToken'=>'123456789101112',
59
+ 'expDate'=>'1210',
60
+ 'cardValidationNum'=>'555',
61
+ 'type'=>'VI'
62
+ }}
63
+ response= LitleOnlineRequest.new.force_capture(hash)
64
+ assert_equal('Valid Format', response.message)
65
+ end
66
+
67
+ def test_fields_out_of_order
68
+ hash = {
69
+ 'merchantId' => '101',
70
+ 'version'=>'8.8',
71
+ 'orderSource'=>'ecommerce',
72
+ 'litleTxnId'=>'123456',
73
+ 'amount'=>'106',
74
+ 'card'=>{
75
+ 'type'=>'VI',
76
+ 'number' =>'4100000000000001',
77
+ 'expDate' =>'1210'
78
+ },
79
+ 'reportGroup'=>'Planets',
80
+ 'orderId'=>'12344'
81
+ }
82
+ response= LitleOnlineRequest.new.force_capture(hash)
83
+ assert_equal('Valid Format', response.message)
84
+ end
85
+
86
+ def test_invalid_field
87
+ hash = {
88
+ 'merchantId' => '101',
89
+ 'version'=>'8.8',
90
+ 'reportGroup'=>'Planets',
91
+ 'litleTxnId'=>'123456',
92
+ 'orderId'=>'12344',
93
+ 'amount'=>'106',
94
+ 'orderSource'=>'ecommerce',
95
+ 'card'=>{
96
+ 'NOexistantField' => 'ShouldNotCauseError',
97
+ 'type'=>'VI',
98
+ 'number' =>'4100000000000001',
99
+ 'expDate' =>'1210'
100
+ }}
101
+ response= LitleOnlineRequest.new.force_capture(hash)
102
+ assert_equal('Valid Format', response.message)
103
+ end
104
+
105
+ def test_no_order_id
106
+ hash = {
107
+ 'merchantId' => '101',
108
+ 'version'=>'8.8',
109
+ 'reportGroup'=>'Planets',
110
+ 'litleTxnId'=>'123456',
111
+ 'amount'=>'106',
112
+ 'orderSource'=>'ecommerce',
113
+ 'token'=> {
114
+ 'litleToken'=>'123456789101112',
115
+ 'expDate'=>'1210',
116
+ 'cardValidationNum'=>'555',
117
+ 'type'=>'VI'
118
+ }}
119
+ response= LitleOnlineRequest.new.force_capture(hash)
120
+ assert(response.message =~ /Error validating xml data against the schema/)
121
+ end
122
+
123
+ def test_no_order_source
124
+ hash = {
125
+ 'merchantId' => '101',
126
+ 'version'=>'8.8',
127
+ 'reportGroup'=>'Planets',
128
+ 'litleTxnId'=>'123456',
129
+ 'orderId'=>'12344',
130
+ 'amount'=>'106',
131
+ 'card'=>{
132
+ 'type'=>'VI',
133
+ 'number' =>'4100000000000001',
134
+ 'expDate' =>'1210'
135
+ }}
136
+ response= LitleOnlineRequest.new.force_capture(hash)
137
+ assert(response.message =~ /Error validating xml data against the schema/)
138
+ end
139
+
45
140
  end
46
141
 
47
- def test_simple_force_capture_with_token
48
- hash = {
49
- 'merchantId' => '101',
50
- 'version'=>'8.8',
51
- 'reportGroup'=>'Planets',
52
- 'litleTxnId'=>'123456',
53
- 'orderId'=>'12344',
54
- 'amount'=>'106',
55
- 'orderSource'=>'ecommerce',
56
- 'token'=> {
57
- 'litleToken'=>'123456789101112',
58
- 'expDate'=>'1210',
59
- 'cardValidationNum'=>'555',
60
- 'type'=>'VI'
61
- }}
62
- response= LitleOnlineRequest.new.force_capture(hash)
63
- assert_equal('Valid Format', response.message)
64
- end
65
-
66
- def test_fields_out_of_order
67
- hash = {
68
- 'merchantId' => '101',
69
- 'version'=>'8.8',
70
- 'orderSource'=>'ecommerce',
71
- 'litleTxnId'=>'123456',
72
- 'amount'=>'106',
73
- 'card'=>{
74
- 'type'=>'VI',
75
- 'number' =>'4100000000000001',
76
- 'expDate' =>'1210'
77
- },
78
- 'reportGroup'=>'Planets',
79
- 'orderId'=>'12344'
80
- }
81
- response= LitleOnlineRequest.new.force_capture(hash)
82
- assert_equal('Valid Format', response.message)
83
- end
84
-
85
- def test_invalid_field
86
- hash = {
87
- 'merchantId' => '101',
88
- 'version'=>'8.8',
89
- 'reportGroup'=>'Planets',
90
- 'litleTxnId'=>'123456',
91
- 'orderId'=>'12344',
92
- 'amount'=>'106',
93
- 'orderSource'=>'ecommerce',
94
- 'card'=>{
95
- 'NOexistantField' => 'ShouldNotCauseError',
96
- 'type'=>'VI',
97
- 'number' =>'4100000000000001',
98
- 'expDate' =>'1210'
99
- }}
100
- response= LitleOnlineRequest.new.force_capture(hash)
101
- assert_equal('Valid Format', response.message)
102
- end
103
-
104
- def test_no_order_id
105
- hash = {
106
- 'merchantId' => '101',
107
- 'version'=>'8.8',
108
- 'reportGroup'=>'Planets',
109
- 'litleTxnId'=>'123456',
110
- 'amount'=>'106',
111
- 'orderSource'=>'ecommerce',
112
- 'token'=> {
113
- 'litleToken'=>'123456789101112',
114
- 'expDate'=>'1210',
115
- 'cardValidationNum'=>'555',
116
- 'type'=>'VI'
117
- }}
118
- response= LitleOnlineRequest.new.force_capture(hash)
119
- assert(response.message =~ /Error validating xml data against the schema/)
120
- end
121
-
122
- def test_no_order_source
123
- hash = {
124
- 'merchantId' => '101',
125
- 'version'=>'8.8',
126
- 'reportGroup'=>'Planets',
127
- 'litleTxnId'=>'123456',
128
- 'orderId'=>'12344',
129
- 'amount'=>'106',
130
- 'card'=>{
131
- 'type'=>'VI',
132
- 'number' =>'4100000000000001',
133
- 'expDate' =>'1210'
134
- }}
135
- response= LitleOnlineRequest.new.force_capture(hash)
136
- assert(response.message =~ /Error validating xml data against the schema/)
137
- end
138
-
139
- end
140
-
142
+ end
@@ -25,204 +25,206 @@ OTHER DEALINGS IN THE SOFTWARE.
25
25
  require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
27
 
28
- class TestSale < Test::Unit::TestCase
29
- def test_simple_sale_with_card
30
- hash = {
31
- 'merchantId' => '101',
32
- 'version'=>'8.8',
33
- 'reportGroup'=>'Planets',
34
- 'litleTxnId'=>'123456',
35
- 'orderId'=>'12344',
36
- 'amount'=>'106',
37
- 'orderSource'=>'ecommerce',
38
- 'card'=>{
39
- 'type'=>'VI',
40
- 'number' =>'4100000000000002',
41
- 'expDate' =>'1210'
42
- }}
43
- response= LitleOnlineRequest.new.sale(hash)
44
- assert_equal('000', response.saleResponse.response)
45
- end
46
-
47
- def test_simple_sale_with_paypal
48
- hash = {
49
- 'merchantId' => '101',
50
- 'version'=>'8.8',
51
- 'reportGroup'=>'Planets',
52
- 'litleTxnId'=>'123456',
53
- 'orderId'=>'12344',
54
- 'amount'=>'106',
55
- 'orderSource'=>'ecommerce',
56
- 'paypal'=>{
57
- 'payerId'=>'1234',
58
- 'token'=>'1234',
59
- 'transactionId'=>'123456'
60
- }}
61
- response= LitleOnlineRequest.new.sale(hash)
62
- assert_equal 'Valid Format', response.message
63
- end
64
-
65
- def test_illegal_order_source
66
- hash = {
67
- 'merchantId' => '101',
68
- 'version'=>'8.8',
69
- 'reportGroup'=>'Planets',
70
- 'litleTxnId'=>'123456',
71
- 'orderId'=>'12344',
72
- 'amount'=>'106',
73
- 'orderSource'=>'ecomerce',
74
- 'card'=>{
75
- 'type'=>'VI',
76
- 'number' =>'4100000000000002',
77
- 'expDate' =>'1210'
78
- }}
79
- response= LitleOnlineRequest.new.sale(hash)
80
- assert(response.message =~ /Error validating xml data against the schema/)
81
- end
82
-
83
- def test_illegal_card_type
84
- hash = {
85
- 'merchantId' => '101',
86
- 'version'=>'8.8',
87
- 'reportGroup'=>'Planets',
88
- 'litleTxnId'=>'123456',
89
- 'orderId'=>'12344',
90
- 'amount'=>'106',
91
- 'orderSource'=>'ecommerce',
92
- 'card'=>{
93
- 'type'=>'NO',
94
- 'number' =>'4100000000000002',
95
- 'expDate' =>'1210'
96
- }}
97
- response= LitleOnlineRequest.new.sale(hash)
98
- assert(response.message =~ /Error validating xml data against the schema/)
99
- end
100
-
101
- def test_no_report_group
102
- hash = {
103
- 'merchantId' => '101',
104
- 'version'=>'8.8',
105
- 'reportGroup'=>'Planets',
106
- 'litleTxnId'=>'123456',
107
- 'orderId'=>'12344',
108
- 'amount'=>'106',
109
- 'orderSource'=>'ecommerce',
110
- 'card'=>{
111
- 'type'=>'VI',
112
- 'number' =>'4100000000000000',
113
- 'expDate' =>'1210'
114
- }}
115
- response= LitleOnlineRequest.new.sale(hash)
116
- assert_equal('000', response.saleResponse.response)
117
- end
118
-
119
- def test_fields_out_of_order
120
- hash = {
121
- 'merchantId' => '101',
122
- 'version'=>'8.8',
123
- 'orderSource'=>'ecommerce',
124
- 'litleTxnId'=>'123456',
125
- 'amount'=>'106',
126
- 'card'=>{
127
- 'type'=>'VI',
128
- 'number' =>'4100000000000000',
129
- 'expDate' =>'1210'
130
- },
131
- 'reportGroup'=>'Planets',
132
- 'orderId'=>'12344'
133
- }
134
- response= LitleOnlineRequest.new.sale(hash)
135
- assert_equal('000', response.saleResponse.response)
136
- end
137
-
138
- def test_invalid_field
139
- hash = {
140
- 'merchantId' => '101',
141
- 'version'=>'8.8',
142
- 'reportGroup'=>'Planets',
143
- 'litleTxnId'=>'123456',
144
- 'orderId'=>'12344',
145
- 'amount'=>'106',
146
- 'orderSource'=>'ecommerce',
147
- 'card'=>{
148
- 'NOexistantField' => 'ShouldNotCauseError',
149
- 'type'=>'VI',
150
- 'number' =>'4100000000000000',
151
- 'expDate' =>'1210'
152
- }}
153
- response= LitleOnlineRequest.new.sale(hash)
154
- assert_equal('000', response.saleResponse.response)
155
- end
156
-
157
- def test_simple_sale_with_card
158
- hash = {
159
- 'merchantId'=>'101',
160
- 'version'=>'8.8',
161
- 'reportGroup'=>'Planets',
162
- 'litleTxnId'=>'123456',
163
- 'orderId'=>'12344',
164
- 'amount'=>'106',
165
- 'orderSource'=>'ecommerce',
166
- 'card'=>{
167
- 'type'=>'VI',
168
- 'number' =>'4100000000000000',
169
- 'expDate' =>'1210'
170
- }}
171
- response= LitleOnlineRequest.new.sale(hash)
172
- assert_equal('000', response.saleResponse.response)
173
- end
174
-
28
+ module LitleOnline
29
+ class TestSale < Test::Unit::TestCase
30
+ def test_simple_sale_with_card
31
+ hash = {
32
+ 'merchantId' => '101',
33
+ 'version'=>'8.8',
34
+ 'reportGroup'=>'Planets',
35
+ 'litleTxnId'=>'123456',
36
+ 'orderId'=>'12344',
37
+ 'amount'=>'106',
38
+ 'orderSource'=>'ecommerce',
39
+ 'card'=>{
40
+ 'type'=>'VI',
41
+ 'number' =>'4100000000000002',
42
+ 'expDate' =>'1210'
43
+ }}
44
+ response= LitleOnlineRequest.new.sale(hash)
45
+ assert_equal('000', response.saleResponse.response)
46
+ end
47
+
48
+ def test_simple_sale_with_paypal
49
+ hash = {
50
+ 'merchantId' => '101',
51
+ 'version'=>'8.8',
52
+ 'reportGroup'=>'Planets',
53
+ 'litleTxnId'=>'123456',
54
+ 'orderId'=>'12344',
55
+ 'amount'=>'106',
56
+ 'orderSource'=>'ecommerce',
57
+ 'paypal'=>{
58
+ 'payerId'=>'1234',
59
+ 'token'=>'1234',
60
+ 'transactionId'=>'123456'
61
+ }}
62
+ response= LitleOnlineRequest.new.sale(hash)
63
+ assert_equal 'Valid Format', response.message
64
+ end
65
+
66
+ def test_illegal_order_source
67
+ hash = {
68
+ 'merchantId' => '101',
69
+ 'version'=>'8.8',
70
+ 'reportGroup'=>'Planets',
71
+ 'litleTxnId'=>'123456',
72
+ 'orderId'=>'12344',
73
+ 'amount'=>'106',
74
+ 'orderSource'=>'ecomerce',
75
+ 'card'=>{
76
+ 'type'=>'VI',
77
+ 'number' =>'4100000000000002',
78
+ 'expDate' =>'1210'
79
+ }}
80
+ response= LitleOnlineRequest.new.sale(hash)
81
+ assert(response.message =~ /Error validating xml data against the schema/)
82
+ end
83
+
84
+ def test_illegal_card_type
85
+ hash = {
86
+ 'merchantId' => '101',
87
+ 'version'=>'8.8',
88
+ 'reportGroup'=>'Planets',
89
+ 'litleTxnId'=>'123456',
90
+ 'orderId'=>'12344',
91
+ 'amount'=>'106',
92
+ 'orderSource'=>'ecommerce',
93
+ 'card'=>{
94
+ 'type'=>'NO',
95
+ 'number' =>'4100000000000002',
96
+ 'expDate' =>'1210'
97
+ }}
98
+ response= LitleOnlineRequest.new.sale(hash)
99
+ assert(response.message =~ /Error validating xml data against the schema/)
100
+ end
101
+
102
+ def test_no_report_group
103
+ hash = {
104
+ 'merchantId' => '101',
105
+ 'version'=>'8.8',
106
+ 'reportGroup'=>'Planets',
107
+ 'litleTxnId'=>'123456',
108
+ 'orderId'=>'12344',
109
+ 'amount'=>'106',
110
+ 'orderSource'=>'ecommerce',
111
+ 'card'=>{
112
+ 'type'=>'VI',
113
+ 'number' =>'4100000000000000',
114
+ 'expDate' =>'1210'
115
+ }}
116
+ response= LitleOnlineRequest.new.sale(hash)
117
+ assert_equal('000', response.saleResponse.response)
118
+ end
119
+
120
+ def test_fields_out_of_order
121
+ hash = {
122
+ 'merchantId' => '101',
123
+ 'version'=>'8.8',
124
+ 'orderSource'=>'ecommerce',
125
+ 'litleTxnId'=>'123456',
126
+ 'amount'=>'106',
127
+ 'card'=>{
128
+ 'type'=>'VI',
129
+ 'number' =>'4100000000000000',
130
+ 'expDate' =>'1210'
131
+ },
132
+ 'reportGroup'=>'Planets',
133
+ 'orderId'=>'12344'
134
+ }
135
+ response= LitleOnlineRequest.new.sale(hash)
136
+ assert_equal('000', response.saleResponse.response)
137
+ end
138
+
139
+ def test_invalid_field
140
+ hash = {
141
+ 'merchantId' => '101',
142
+ 'version'=>'8.8',
143
+ 'reportGroup'=>'Planets',
144
+ 'litleTxnId'=>'123456',
145
+ 'orderId'=>'12344',
146
+ 'amount'=>'106',
147
+ 'orderSource'=>'ecommerce',
148
+ 'card'=>{
149
+ 'NOexistantField' => 'ShouldNotCauseError',
150
+ 'type'=>'VI',
151
+ 'number' =>'4100000000000000',
152
+ 'expDate' =>'1210'
153
+ }}
154
+ response= LitleOnlineRequest.new.sale(hash)
155
+ assert_equal('000', response.saleResponse.response)
156
+ end
157
+
158
+ def test_simple_sale_with_card
159
+ hash = {
160
+ 'merchantId'=>'101',
161
+ 'version'=>'8.8',
162
+ 'reportGroup'=>'Planets',
163
+ 'litleTxnId'=>'123456',
164
+ 'orderId'=>'12344',
165
+ 'amount'=>'106',
166
+ 'orderSource'=>'ecommerce',
167
+ 'card'=>{
168
+ 'type'=>'VI',
169
+ 'number' =>'4100000000000000',
170
+ 'expDate' =>'1210'
171
+ }}
172
+ response= LitleOnlineRequest.new.sale(hash)
173
+ assert_equal('000', response.saleResponse.response)
174
+ end
175
+
176
+
177
+ def test_no_order_id
178
+ hash = {
179
+ 'merchantId' => '101',
180
+ 'version'=>'8.8',
181
+ 'reportGroup'=>'Planets',
182
+ 'litleTxnId'=>'123456',
183
+ 'amount'=>'106',
184
+ 'orderSource'=>'ecommerce',
185
+ 'card'=>{
186
+ 'type'=>'VI',
187
+ 'number' =>'4100000000000002',
188
+ 'expDate' =>'1210'
189
+ }}
190
+ response= LitleOnlineRequest.new.sale(hash)
191
+ assert(response.message =~ /Error validating xml data against the schema/)
192
+ end
193
+
194
+ def test_no_amount
195
+ hash = {
196
+ 'merchantId' => '101',
197
+ 'version'=>'8.8',
198
+ 'reportGroup'=>'Planets',
199
+ 'litleTxnId'=>'123456',
200
+ 'orderId'=>'12344',
201
+ 'orderSource'=>'ecommerce',
202
+ 'card'=>{
203
+ 'type'=>'VI',
204
+ 'number' =>'4100000000000002',
205
+ 'expDate' =>'1210'
206
+ }}
207
+ response= LitleOnlineRequest.new.sale(hash)
208
+ assert(response.message =~ /Error validating xml data against the schema/)
209
+ end
210
+
211
+ def test_no_order_source
212
+ hash = {
213
+ 'merchantId' => '101',
214
+ 'version'=>'8.8',
215
+ 'reportGroup'=>'Planets',
216
+ 'litleTxnId'=>'123456',
217
+ 'orderId'=>'12344',
218
+ 'amount'=>'106',
219
+ 'card'=>{
220
+ 'type'=>'VI',
221
+ 'number' =>'4100000000000002',
222
+ 'expDate' =>'1210'
223
+ }}
224
+ response= LitleOnlineRequest.new.sale(hash)
225
+ assert(response.message =~ /Error validating xml data against the schema/)
226
+ end
175
227
 
176
- def test_no_order_id
177
- hash = {
178
- 'merchantId' => '101',
179
- 'version'=>'8.8',
180
- 'reportGroup'=>'Planets',
181
- 'litleTxnId'=>'123456',
182
- 'amount'=>'106',
183
- 'orderSource'=>'ecommerce',
184
- 'card'=>{
185
- 'type'=>'VI',
186
- 'number' =>'4100000000000002',
187
- 'expDate' =>'1210'
188
- }}
189
- response= LitleOnlineRequest.new.sale(hash)
190
- assert(response.message =~ /Error validating xml data against the schema/)
191
- end
192
-
193
- def test_no_amount
194
- hash = {
195
- 'merchantId' => '101',
196
- 'version'=>'8.8',
197
- 'reportGroup'=>'Planets',
198
- 'litleTxnId'=>'123456',
199
- 'orderId'=>'12344',
200
- 'orderSource'=>'ecommerce',
201
- 'card'=>{
202
- 'type'=>'VI',
203
- 'number' =>'4100000000000002',
204
- 'expDate' =>'1210'
205
- }}
206
- response= LitleOnlineRequest.new.sale(hash)
207
- assert(response.message =~ /Error validating xml data against the schema/)
208
- end
209
-
210
- def test_no_order_source
211
- hash = {
212
- 'merchantId' => '101',
213
- 'version'=>'8.8',
214
- 'reportGroup'=>'Planets',
215
- 'litleTxnId'=>'123456',
216
- 'orderId'=>'12344',
217
- 'amount'=>'106',
218
- 'card'=>{
219
- 'type'=>'VI',
220
- 'number' =>'4100000000000002',
221
- 'expDate' =>'1210'
222
- }}
223
- response= LitleOnlineRequest.new.sale(hash)
224
- assert(response.message =~ /Error validating xml data against the schema/)
225
228
  end
226
229
 
227
- end
228
-
230
+ end