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,20 +25,21 @@ 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
|
-
|
28
|
+
module LitleOnline
|
29
|
+
class Test_echeckSale < Test::Unit::TestCase
|
30
|
+
|
31
|
+
def test_echeck_sale_with_both
|
32
|
+
hash = {
|
33
|
+
'merchantId' => '101',
|
34
|
+
'version'=>'8.8',
|
35
|
+
'reportGroup'=>'Planets',
|
36
|
+
'litleTxnId'=>'123456',
|
37
|
+
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
|
38
|
+
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'}
|
39
|
+
}
|
40
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_sale(hash)}
|
41
|
+
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
42
|
+
end
|
43
|
+
|
41
44
|
end
|
42
|
-
|
43
45
|
end
|
44
|
-
|
@@ -25,18 +25,19 @@ 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
|
-
|
28
|
+
module LitleOnline
|
29
|
+
class Test_echeckVerification < Test::Unit::TestCase
|
30
|
+
def test_echeck_verification_with_both
|
31
|
+
hash = {
|
32
|
+
'merchantId' => '101',
|
33
|
+
'version'=>'8.8',
|
34
|
+
'reportGroup'=>'Planets',
|
35
|
+
'litleTxnId'=>'123456',
|
36
|
+
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
|
37
|
+
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'}
|
38
|
+
}
|
39
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
|
40
|
+
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
41
|
+
end
|
40
42
|
end
|
41
43
|
end
|
42
|
-
|
@@ -25,63 +25,66 @@ 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
|
-
|
28
|
+
module LitleOnline
|
29
|
+
|
30
|
+
class TestForceCapture < Test::Unit::TestCase
|
31
|
+
def test_both_choices_card_and_token
|
32
|
+
hash = {
|
33
|
+
'merchantId' => '101',
|
34
|
+
'version'=>'8.8',
|
35
|
+
'reportGroup'=>'Planets',
|
36
|
+
'litleTxnId'=>'123456',
|
37
|
+
'orderId'=>'12344',
|
38
|
+
'amount'=>'106',
|
39
|
+
'orderSource'=>'ecommerce',
|
40
|
+
'fraudCheck'=>{'authenticationTransactionId'=>'123'},
|
41
|
+
'cardholderAuthentication'=>{'authenticationTransactionId'=>'123'},
|
42
|
+
'card'=>{
|
43
|
+
'type'=>'VI',
|
44
|
+
'number' =>'4100000000000001',
|
45
|
+
'expDate' =>'1210'
|
46
|
+
},
|
47
|
+
'token'=> {
|
48
|
+
'litleToken'=>'1234',
|
49
|
+
'expDate'=>'1210',
|
50
|
+
'cardValidationNum'=>'555',
|
51
|
+
'type'=>'VI'
|
52
|
+
}}
|
53
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.force_capture(hash)}
|
54
|
+
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_all_choices
|
58
|
+
hash = {
|
59
|
+
'merchantId' => '101',
|
60
|
+
'version'=>'8.8',
|
61
|
+
'reportGroup'=>'Planets',
|
62
|
+
'litleTxnId'=>'123456',
|
63
|
+
'orderId'=>'12344',
|
64
|
+
'amount'=>'106',
|
65
|
+
'orderSource'=>'ecommerce',
|
66
|
+
'fraudCheck'=>{'authenticationTransactionId'=>'123'},
|
67
|
+
'cardholderAuthentication'=>{'authenticationTransactionId'=>'123'},
|
68
|
+
'card'=>{
|
69
|
+
'type'=>'VI',
|
70
|
+
'number' =>'4100000000000001',
|
71
|
+
'expDate' =>'1210'
|
72
|
+
},
|
73
|
+
'paypage'=> {
|
74
|
+
'paypageRegistrationId'=>'1234',
|
75
|
+
'expDate'=>'1210',
|
76
|
+
'cardValidationNum'=>'555',
|
77
|
+
'type'=>'VI'},
|
78
|
+
'token'=> {
|
79
|
+
'litleToken'=>'1234',
|
80
|
+
'expDate'=>'1210',
|
81
|
+
'cardValidationNum'=>'555',
|
82
|
+
'type'=>'VI'
|
83
|
+
}}
|
84
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.force_capture(hash)}
|
85
|
+
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
86
|
+
end
|
87
|
+
|
53
88
|
end
|
54
89
|
|
55
|
-
|
56
|
-
hash = {
|
57
|
-
'merchantId' => '101',
|
58
|
-
'version'=>'8.8',
|
59
|
-
'reportGroup'=>'Planets',
|
60
|
-
'litleTxnId'=>'123456',
|
61
|
-
'orderId'=>'12344',
|
62
|
-
'amount'=>'106',
|
63
|
-
'orderSource'=>'ecommerce',
|
64
|
-
'fraudCheck'=>{'authenticationTransactionId'=>'123'},
|
65
|
-
'cardholderAuthentication'=>{'authenticationTransactionId'=>'123'},
|
66
|
-
'card'=>{
|
67
|
-
'type'=>'VI',
|
68
|
-
'number' =>'4100000000000001',
|
69
|
-
'expDate' =>'1210'
|
70
|
-
},
|
71
|
-
'paypage'=> {
|
72
|
-
'paypageRegistrationId'=>'1234',
|
73
|
-
'expDate'=>'1210',
|
74
|
-
'cardValidationNum'=>'555',
|
75
|
-
'type'=>'VI'},
|
76
|
-
'token'=> {
|
77
|
-
'litleToken'=>'1234',
|
78
|
-
'expDate'=>'1210',
|
79
|
-
'cardValidationNum'=>'555',
|
80
|
-
'type'=>'VI'
|
81
|
-
}}
|
82
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.force_capture(hash)}
|
83
|
-
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
84
|
-
end
|
85
|
-
|
86
|
-
end
|
87
|
-
|
90
|
+
end
|
data/test/unit/test_sale.rb
CHANGED
@@ -26,211 +26,212 @@ require 'lib/LitleOnline'
|
|
26
26
|
require 'test/unit'
|
27
27
|
require 'mocha'
|
28
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
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
'
|
29
|
+
module LitleOnline
|
30
|
+
class TestSale < Test::Unit::TestCase
|
31
|
+
|
32
|
+
def test_both_choices_fraud_check_and_card_holder
|
33
|
+
hash = {
|
34
|
+
'merchantId' => '101',
|
35
|
+
'version'=>'8.8',
|
36
|
+
'reportGroup'=>'Planets',
|
37
|
+
'litleTxnId'=>'123456',
|
38
|
+
'orderId'=>'12344',
|
39
|
+
'amount'=>'106',
|
40
|
+
'orderSource'=>'ecommerce',
|
41
|
+
'fraudCheck'=>{'authenticationTransactionId'=>'123'},
|
42
|
+
'cardholderAuthentication'=>{'authenticationTransactionId'=>'123'},
|
43
|
+
'card'=>{
|
44
|
+
'type'=>'VI',
|
45
|
+
'number' =>'4100000000000002',
|
46
|
+
'expDate' =>'1210'
|
47
|
+
}}
|
48
|
+
|
49
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
|
50
|
+
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_both_choices_card_and_paypal
|
54
|
+
hash = {
|
55
|
+
'merchantId' => '101',
|
56
|
+
'version'=>'8.8',
|
57
|
+
'reportGroup'=>'Planets',
|
58
|
+
'litleTxnId'=>'123456',
|
59
|
+
'orderId'=>'12344',
|
60
|
+
'amount'=>'106',
|
61
|
+
'orderSource'=>'ecommerce',
|
62
|
+
'fraudCheck'=>{'authenticationTransactionId'=>'123'},
|
63
|
+
'cardholderAuthentication'=>{'authenticationTransactionId'=>'123'},
|
64
|
+
'card'=>{
|
65
|
+
'type'=>'VI',
|
66
|
+
'number' =>'4100000000000002',
|
67
|
+
'expDate' =>'1210'
|
68
|
+
},
|
69
|
+
'paypal'=>{
|
70
|
+
'payerId'=>'1234',
|
71
|
+
'token'=>'1234',
|
72
|
+
'transactionId'=>'123456'
|
73
|
+
}}
|
74
|
+
|
75
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
|
76
|
+
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_both_choices_card_and_token
|
80
|
+
hash = {
|
81
|
+
'merchantId' => '101',
|
82
|
+
'version'=>'8.8',
|
83
|
+
'reportGroup'=>'Planets',
|
84
|
+
'litleTxnId'=>'123456',
|
85
|
+
'orderId'=>'12344',
|
86
|
+
'amount'=>'106',
|
87
|
+
'orderSource'=>'ecommerce',
|
88
|
+
'fraudCheck'=>{'authenticationTransactionId'=>'123'},
|
89
|
+
'cardholderAuthentication'=>{'authenticationTransactionId'=>'123'},
|
90
|
+
'card'=>{
|
91
|
+
'type'=>'VI',
|
92
|
+
'number' =>'4100000000000002',
|
93
|
+
'expDate' =>'1210'
|
94
|
+
},
|
95
|
+
'token'=> {
|
96
|
+
'litleToken'=>'1234',
|
97
|
+
'expDate'=>'1210',
|
98
|
+
'cardValidationNum'=>'555',
|
99
|
+
'type'=>'VI'
|
100
|
+
}}
|
101
|
+
|
102
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
|
103
|
+
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
104
|
+
end
|
105
|
+
|
106
|
+
def test_both_choices_card_and_paypage
|
107
|
+
hash = {
|
108
|
+
'merchantId' => '101',
|
109
|
+
'version'=>'8.8',
|
110
|
+
'reportGroup'=>'Planets',
|
111
|
+
'litleTxnId'=>'123456',
|
112
|
+
'orderId'=>'12344',
|
113
|
+
'amount'=>'106',
|
114
|
+
'orderSource'=>'ecommerce',
|
115
|
+
'fraudCheck'=>{'authenticationTransactionId'=>'123'},
|
116
|
+
'cardholderAuthentication'=>{'authenticationTransactionId'=>'123'},
|
117
|
+
'card'=>{
|
118
|
+
'type'=>'VI',
|
119
|
+
'number' =>'4100000000000002',
|
120
|
+
'expDate' =>'1210'
|
121
|
+
},
|
122
|
+
'paypage'=> {
|
123
|
+
'paypageRegistrationId'=>'1234',
|
124
|
+
'expDate'=>'1210',
|
125
|
+
'cardValidationNum'=>'555',
|
126
|
+
'type'=>'VI'
|
127
|
+
}}
|
128
|
+
|
129
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
|
130
|
+
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
131
|
+
end
|
132
|
+
|
133
|
+
def test_three_choices_card_and_paypage_and_paypal
|
134
|
+
hash = {
|
135
|
+
'merchantId' => '101',
|
136
|
+
'version'=>'8.8',
|
137
|
+
'reportGroup'=>'Planets',
|
138
|
+
'litleTxnId'=>'123456',
|
139
|
+
'orderId'=>'12344',
|
140
|
+
'amount'=>'106',
|
141
|
+
'orderSource'=>'ecommerce',
|
142
|
+
'fraudCheck'=>{'authenticationTransactionId'=>'123'},
|
143
|
+
'cardholderAuthentication'=>{'authenticationTransactionId'=>'123'},
|
144
|
+
'card'=>{
|
145
|
+
'type'=>'VI',
|
146
|
+
'number' =>'4100000000000002',
|
147
|
+
'expDate' =>'1210'
|
148
|
+
},
|
149
|
+
'paypage'=> {
|
150
|
+
'paypageRegistrationId'=>'1234',
|
151
|
+
'expDate'=>'1210',
|
152
|
+
'cardValidationNum'=>'555',
|
153
|
+
'type'=>'VI'},
|
154
|
+
'paypal'=>{
|
155
|
+
'payerId'=>'1234',
|
156
|
+
'token'=>'1234',
|
157
|
+
'transactionId'=>'123456'
|
158
|
+
}}
|
159
|
+
|
160
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
|
161
|
+
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
162
|
+
end
|
163
|
+
|
164
|
+
def test_all_choices_card_and_paypage_and_paypal_and_token
|
165
|
+
hash = {
|
166
|
+
'merchantId' => '101',
|
167
|
+
'version'=>'8.8',
|
168
|
+
'reportGroup'=>'Planets',
|
169
|
+
'litleTxnId'=>'123456',
|
170
|
+
'orderId'=>'12344',
|
171
|
+
'amount'=>'106',
|
172
|
+
'orderSource'=>'ecommerce',
|
173
|
+
'fraudCheck'=>{'authenticationTransactionId'=>'123'},
|
174
|
+
'cardholderAuthentication'=>{'authenticationTransactionId'=>'123'},
|
175
|
+
'card'=>{
|
176
|
+
'type'=>'VI',
|
177
|
+
'number' =>'4100000000000002',
|
178
|
+
'expDate' =>'1210'
|
179
|
+
},
|
180
|
+
'paypage'=> {
|
181
|
+
'paypageRegistrationId'=>'1234',
|
182
|
+
'expDate'=>'1210',
|
183
|
+
'cardValidationNum'=>'555',
|
184
|
+
'type'=>'VI'},
|
185
|
+
'paypal'=>{
|
186
|
+
'payerId'=>'1234',
|
187
|
+
'token'=>'1234',
|
188
|
+
'transactionId'=>'123456'},
|
189
|
+
'token'=> {
|
190
|
+
'litleToken'=>'1234',
|
191
|
+
'expDate'=>'1210',
|
192
|
+
'cardValidationNum'=>'555',
|
193
|
+
'type'=>'VI'
|
194
|
+
}}
|
195
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
|
196
|
+
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
197
|
+
end
|
198
|
+
|
199
|
+
def test_merchant_data_sale
|
200
|
+
hash = {
|
201
|
+
'merchantId' => '101',
|
202
|
+
'version'=>'8.12',
|
203
|
+
'orderId'=>'1',
|
204
|
+
'amount'=>'0',
|
205
|
+
'orderSource'=>'ecommerce',
|
206
|
+
'reportGroup'=>'Planets',
|
207
|
+
'merchantData'=> {
|
208
|
+
'affiliate'=>'bar'
|
209
|
+
}
|
208
210
|
}
|
209
|
-
|
211
|
+
|
212
|
+
XMLObject.expects(:new)
|
213
|
+
Communications.expects(:http_post).with(regexp_matches(/.*<merchantData>.*?<affiliate>bar<\/affiliate>.*?<\/merchantData>.*/m),kind_of(Hash))
|
214
|
+
LitleOnlineRequest.new.sale(hash)
|
215
|
+
end
|
210
216
|
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
'number' =>'4100000000000000',
|
231
|
-
}}
|
232
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
|
233
|
-
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
217
|
+
def test_invalid_embedded_field_values
|
218
|
+
#becasue there are sub fields under fraud check that are not specified
|
219
|
+
hash = {
|
220
|
+
'merchantId' => '101',
|
221
|
+
'version'=>'8.8',
|
222
|
+
'reportGroup'=>'Planets',
|
223
|
+
'litleTxnId'=>'123456',
|
224
|
+
'orderId'=>'12344',
|
225
|
+
'amount'=>'106',
|
226
|
+
'orderSource'=>'ecommerce',
|
227
|
+
'fraudCheck'=>'one',
|
228
|
+
'cardholderAuthentication'=>'two',
|
229
|
+
'card'=>{
|
230
|
+
'type'=>'VI',
|
231
|
+
'number' =>'4100000000000000',
|
232
|
+
}}
|
233
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
|
234
|
+
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
235
|
+
end
|
234
236
|
end
|
235
|
-
end
|
236
|
-
|
237
|
+
end
|