LitleOnline 8.12.3 → 8.12.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/Rakefile +1 -1
- data/lib/Communications.rb +34 -32
- data/lib/Configuration.rb +13 -11
- data/lib/LitleOnline.rb +0 -1
- data/lib/LitleOnlineRequest.rb +546 -543
- data/lib/LitleXmlMapper.rb +17 -15
- data/lib/XMLFields.rb +903 -901
- data/test/certification/certTest1_base.rb +935 -933
- data/test/certification/certTest2_authenhanced.rb +548 -546
- data/test/certification/certTest3_authreversal.rb +179 -177
- data/test/certification/certTest4_echeck.rb +245 -243
- data/test/certification/certTest5_token.rb +198 -196
- data/test/functional/test_auth.rb +205 -204
- data/test/functional/test_authReversal.rb +41 -39
- data/test/functional/test_capture.rb +54 -52
- data/test/functional/test_captureGivenAuth.rb +153 -152
- data/test/functional/test_credit.rb +126 -126
- data/test/functional/test_echeckCredit.rb +88 -87
- data/test/functional/test_echeckRedeposit.rb +85 -84
- data/test/functional/test_echeckSale.rb +132 -131
- data/test/functional/test_echeckVerification.rb +97 -95
- data/test/functional/test_forceCapture.rb +113 -111
- data/test/functional/test_sale.rb +200 -198
- data/test/functional/test_token.rb +75 -73
- data/test/functional/test_xmlfields.rb +558 -558
- data/test/unit/test_LitleOnlineRequest.rb +210 -207
- data/test/unit/test_auth.rb +119 -116
- data/test/unit/test_authReversal.rb +16 -16
- data/test/unit/test_capture.rb +10 -8
- data/test/unit/test_captureGivenAuth.rb +62 -59
- data/test/unit/test_credit.rb +103 -100
- data/test/unit/test_echeckCredit.rb +15 -14
- data/test/unit/test_echeckRedeposit.rb +14 -13
- data/test/unit/test_echeckSale.rb +16 -15
- data/test/unit/test_echeckVerification.rb +14 -13
- data/test/unit/test_forceCapture.rb +61 -58
- data/test/unit/test_sale.rb +206 -205
- data/test/unit/test_token.rb +43 -41
- data/test/unit/test_xmlfields.rb +101 -99
- metadata +58 -77
- 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
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
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
|
-
|
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
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
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
|