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
@@ -1,571 +1,573 @@
|
|
1
1
|
require 'lib/LitleOnline'
|
2
2
|
require 'test/unit'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
'
|
8
|
-
|
9
|
-
|
10
|
-
#test 14-31 enhanced data need merchant with smart authorization features.
|
11
|
-
def test_14
|
12
|
-
customer_hash = {
|
13
|
-
'orderId' => '14',
|
14
|
-
'amount' => '3000',
|
15
|
-
'orderSource'=>'ecommerce',
|
16
|
-
'card'=>{
|
17
|
-
'number' =>'4457010200000247',
|
18
|
-
'expDate' => '0812',
|
19
|
-
'type' => 'VI'
|
20
|
-
}
|
4
|
+
module LitleOnline
|
5
|
+
class Litle_certTest2 < Test::Unit::TestCase
|
6
|
+
#test enhanced data on auth response
|
7
|
+
@@merchant_hash = {'reportGroup'=>'Planets',
|
8
|
+
'merchantId'=>'101'
|
21
9
|
}
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
'orderId' => '15',
|
35
|
-
'amount' => '3000',
|
36
|
-
'orderSource'=>'ecommerce',
|
37
|
-
'card'=>{
|
38
|
-
'number' =>'5500000254444445',
|
39
|
-
'expDate' => '0312',
|
40
|
-
'type' => 'MC'
|
10
|
+
|
11
|
+
#test 14-31 enhanced data need merchant with smart authorization features.
|
12
|
+
def test_14
|
13
|
+
customer_hash = {
|
14
|
+
'orderId' => '14',
|
15
|
+
'amount' => '3000',
|
16
|
+
'orderSource'=>'ecommerce',
|
17
|
+
'card'=>{
|
18
|
+
'number' =>'4457010200000247',
|
19
|
+
'expDate' => '0812',
|
20
|
+
'type' => 'VI'
|
21
|
+
}
|
41
22
|
}
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
23
|
+
hash = customer_hash.merge(@@merchant_hash)
|
24
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
25
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
26
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
27
|
+
assert_equal('PREPAID', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource['type']) #Ruby 1.8.7 has type as an attribute of Object
|
28
|
+
assert_equal('2000', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.availableBalance)
|
29
|
+
assert_equal('NO', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.reloadable)
|
30
|
+
assert_equal('GIFT', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.prepaidCardType)
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_15
|
34
|
+
customer_hash = {
|
35
|
+
'orderId' => '15',
|
36
|
+
'amount' => '3000',
|
37
|
+
'orderSource'=>'ecommerce',
|
38
|
+
'card'=>{
|
39
|
+
'number' =>'5500000254444445',
|
40
|
+
'expDate' => '0312',
|
41
|
+
'type' => 'MC'
|
42
|
+
}
|
62
43
|
}
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
44
|
+
hash = customer_hash.merge(@@merchant_hash)
|
45
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
46
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
47
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
48
|
+
assert_equal('PREPAID', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource['type'])
|
49
|
+
assert_equal('2000', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.availableBalance)
|
50
|
+
assert_equal('YES', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.reloadable)
|
51
|
+
assert_equal('PAYROLL', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.prepaidCardType)
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_16
|
55
|
+
customer_hash = {
|
56
|
+
'orderId' => '16',
|
57
|
+
'amount' => '3000',
|
58
|
+
'orderSource'=>'ecommerce',
|
59
|
+
'card'=>{
|
60
|
+
'number' =>'5592106621450897',
|
61
|
+
'expDate' => '0312',
|
62
|
+
'type' => 'MC'
|
63
|
+
}
|
83
64
|
}
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
65
|
+
hash = customer_hash.merge(@@merchant_hash)
|
66
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
67
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
68
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
69
|
+
assert_equal('PREPAID', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource['type'])
|
70
|
+
assert_equal('0', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.availableBalance)
|
71
|
+
assert_equal('YES', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.reloadable)
|
72
|
+
assert_equal('PAYROLL', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.prepaidCardType)
|
73
|
+
end
|
74
|
+
|
75
|
+
def test_17
|
76
|
+
customer_hash = {
|
77
|
+
'orderId' => '17',
|
78
|
+
'amount' => '3000',
|
79
|
+
'orderSource'=>'ecommerce',
|
80
|
+
'card'=>{
|
81
|
+
'number' =>'5590409551104142',
|
82
|
+
'expDate' => '0312',
|
83
|
+
'type' => 'MC'
|
84
|
+
}
|
104
85
|
}
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
86
|
+
hash = customer_hash.merge(@@merchant_hash)
|
87
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
88
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
89
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
90
|
+
assert_equal('PREPAID', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource['type'])
|
91
|
+
assert_equal('6500', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.availableBalance)
|
92
|
+
assert_equal('YES', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.reloadable)
|
93
|
+
assert_equal('PAYROLL', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.prepaidCardType)
|
94
|
+
end
|
95
|
+
|
96
|
+
def test_18
|
97
|
+
customer_hash = {
|
98
|
+
'orderId' => '18',
|
99
|
+
'amount' => '3000',
|
100
|
+
'orderSource'=>'ecommerce',
|
101
|
+
'card'=>{
|
102
|
+
'number' =>'5587755665222179',
|
103
|
+
'expDate' => '0312',
|
104
|
+
'type' => 'MC'
|
105
|
+
}
|
125
106
|
}
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
107
|
+
hash = customer_hash.merge(@@merchant_hash)
|
108
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
109
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
110
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
111
|
+
assert_equal('PREPAID', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource['type'])
|
112
|
+
assert_equal('12200', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.availableBalance)
|
113
|
+
assert_equal('YES', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.reloadable)
|
114
|
+
assert_equal('PAYROLL', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.prepaidCardType)
|
115
|
+
end
|
116
|
+
|
117
|
+
def test_19
|
118
|
+
customer_hash = {
|
119
|
+
'orderId' => '19',
|
120
|
+
'amount' => '3000',
|
121
|
+
'orderSource'=>'ecommerce',
|
122
|
+
'card'=>{
|
123
|
+
'number' =>'5445840176552850',
|
124
|
+
'expDate' => '0312',
|
125
|
+
'type' => 'MC'
|
126
|
+
}
|
146
127
|
}
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
128
|
+
hash = customer_hash.merge(@@merchant_hash)
|
129
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
130
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
131
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
132
|
+
assert_equal('PREPAID', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource['type'])
|
133
|
+
assert_equal('20000', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.availableBalance)
|
134
|
+
assert_equal('YES', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.reloadable)
|
135
|
+
assert_equal('PAYROLL', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.prepaidCardType)
|
136
|
+
end
|
137
|
+
|
138
|
+
def test_20
|
139
|
+
customer_hash = {
|
140
|
+
'orderId' => '20',
|
141
|
+
'amount' => '3000',
|
142
|
+
'orderSource'=>'ecommerce',
|
143
|
+
'card'=>{
|
144
|
+
'number' =>'5390016478904678',
|
145
|
+
'expDate' => '0312',
|
146
|
+
'type' => 'MC'
|
147
|
+
}
|
167
148
|
}
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
149
|
+
hash = customer_hash.merge(@@merchant_hash)
|
150
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
151
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
152
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
153
|
+
assert_equal('PREPAID', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource['type'])
|
154
|
+
assert_equal('10050', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.availableBalance)
|
155
|
+
assert_equal('YES', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.reloadable)
|
156
|
+
assert_equal('PAYROLL', auth_response.authorizationResponse.enhancedAuthResponse.fundingSource.prepaidCardType)
|
157
|
+
end
|
158
|
+
|
159
|
+
def test_21
|
160
|
+
customer_hash = {
|
161
|
+
'orderId' => '21',
|
162
|
+
'amount' => '5000',
|
163
|
+
'orderSource'=>'ecommerce',
|
164
|
+
'card'=>{
|
165
|
+
'number' =>'4457010201000246',
|
166
|
+
'expDate' => '0912',
|
167
|
+
'type' => 'VI'
|
168
|
+
}
|
185
169
|
}
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
170
|
+
hash = customer_hash.merge(@@merchant_hash)
|
171
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
172
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
173
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
174
|
+
assert_equal('AFFLUENT', auth_response.authorizationResponse.enhancedAuthResponse.affluence)
|
175
|
+
end
|
176
|
+
|
177
|
+
def test_22
|
178
|
+
customer_hash = {
|
179
|
+
'orderId' => '22',
|
180
|
+
'amount' => '5000',
|
181
|
+
'orderSource'=>'ecommerce',
|
182
|
+
'card'=>{
|
183
|
+
'number' =>'4457010202000245',
|
184
|
+
'expDate' => '1111',
|
185
|
+
'type' => 'VI'
|
186
|
+
}
|
203
187
|
}
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
188
|
+
hash = customer_hash.merge(@@merchant_hash)
|
189
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
190
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
191
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
192
|
+
assert_equal('MASS AFFLUENT', auth_response.authorizationResponse.enhancedAuthResponse.affluence)
|
193
|
+
end
|
194
|
+
|
195
|
+
def test_23
|
196
|
+
customer_hash = {
|
197
|
+
'orderId' => '23',
|
198
|
+
'amount' => '5000',
|
199
|
+
'orderSource'=>'ecommerce',
|
200
|
+
'card'=>{
|
201
|
+
'number' =>'5112010201000109',
|
202
|
+
'expDate' => '0412',
|
203
|
+
'type' => 'MC'
|
204
|
+
}
|
221
205
|
}
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
}
|
240
|
-
hash = customer_hash.merge(@@merchant_hash)
|
241
|
-
auth_response = LitleOnlineRequest.new.authorization(hash)
|
242
|
-
assert_equal('000', auth_response.authorizationResponse.response)
|
243
|
-
assert_equal('Approved', auth_response.authorizationResponse.message)
|
244
|
-
assert_equal('BRA', auth_response.authorizationResponse.enhancedAuthResponse.issuerCountry)
|
245
|
-
end
|
246
|
-
|
247
|
-
# test 26-31 healthcare iias
|
248
|
-
def test_26
|
249
|
-
customer_hash = {
|
250
|
-
'orderId' => '26',
|
251
|
-
'amount' => '18698',
|
252
|
-
'orderSource'=>'ecommerce',
|
253
|
-
'card'=>{
|
254
|
-
'number' =>'5194560012341234',
|
255
|
-
'expDate' => '1212',
|
256
|
-
'type' => 'MC'},
|
257
|
-
'allowPartialAuth' => 'true',
|
258
|
-
'healthcareIIAS' => {
|
259
|
-
'healthcareAmounts' => {
|
260
|
-
'totalHealthcareAmount' =>'20000'
|
261
|
-
},
|
262
|
-
'IIASFlag' => 'Y'
|
206
|
+
hash = customer_hash.merge(@@merchant_hash)
|
207
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
208
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
209
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
210
|
+
assert_equal('AFFLUENT', auth_response.authorizationResponse.enhancedAuthResponse.affluence)
|
211
|
+
end
|
212
|
+
|
213
|
+
def test_24
|
214
|
+
customer_hash = {
|
215
|
+
'orderId' => '24',
|
216
|
+
'amount' => '5000',
|
217
|
+
'orderSource'=>'ecommerce',
|
218
|
+
'card'=>{
|
219
|
+
'number' =>'5112010202000108',
|
220
|
+
'expDate' => '0812',
|
221
|
+
'type' => 'MC'
|
222
|
+
}
|
263
223
|
}
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
'allowPartialAuth' => 'true',
|
281
|
-
'healthcareIIAS' => {
|
282
|
-
'healthcareAmounts' => {
|
283
|
-
'totalHealthcareAmount' =>'15000',
|
284
|
-
'RxAmount' => '16000'
|
285
|
-
},
|
286
|
-
'IIASFlag' => 'Y'
|
224
|
+
hash = customer_hash.merge(@@merchant_hash)
|
225
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
226
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
227
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
228
|
+
assert_equal('MASS AFFLUENT', auth_response.authorizationResponse.enhancedAuthResponse.affluence)
|
229
|
+
end
|
230
|
+
|
231
|
+
def test_25
|
232
|
+
customer_hash = {
|
233
|
+
'orderId' => '25',
|
234
|
+
'amount' => '5000',
|
235
|
+
'orderSource'=>'ecommerce',
|
236
|
+
'card'=>{
|
237
|
+
'number' =>'4100204446270000',
|
238
|
+
'expDate' => '1112',
|
239
|
+
'type' => 'VI'}
|
287
240
|
}
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
241
|
+
hash = customer_hash.merge(@@merchant_hash)
|
242
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
243
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
244
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
245
|
+
assert_equal('BRA', auth_response.authorizationResponse.enhancedAuthResponse.issuerCountry)
|
246
|
+
end
|
247
|
+
|
248
|
+
# test 26-31 healthcare iias
|
249
|
+
def test_26
|
250
|
+
customer_hash = {
|
251
|
+
'orderId' => '26',
|
252
|
+
'amount' => '18698',
|
253
|
+
'orderSource'=>'ecommerce',
|
254
|
+
'card'=>{
|
255
|
+
'number' =>'5194560012341234',
|
256
|
+
'expDate' => '1212',
|
257
|
+
'type' => 'MC'},
|
258
|
+
'allowPartialAuth' => 'true',
|
259
|
+
'healthcareIIAS' => {
|
260
|
+
'healthcareAmounts' => {
|
261
|
+
'totalHealthcareAmount' =>'20000'
|
262
|
+
},
|
263
|
+
'IIASFlag' => 'Y'
|
264
|
+
}
|
311
265
|
}
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
'dentalAmount' => '1049'
|
336
|
-
},
|
337
|
-
'IIASFlag' => 'Y'
|
266
|
+
hash = customer_hash.merge(@@merchant_hash)
|
267
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
268
|
+
assert_equal('341', auth_response.authorizationResponse.response)
|
269
|
+
assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
270
|
+
end
|
271
|
+
|
272
|
+
def test_27
|
273
|
+
customer_hash = {
|
274
|
+
'orderId' => '27',
|
275
|
+
'amount' => '18698',
|
276
|
+
'orderSource'=>'ecommerce',
|
277
|
+
'card'=>{
|
278
|
+
'number' =>'5194560012341234',
|
279
|
+
'expDate' => '1212',
|
280
|
+
'type' => 'MC'},
|
281
|
+
'allowPartialAuth' => 'true',
|
282
|
+
'healthcareIIAS' => {
|
283
|
+
'healthcareAmounts' => {
|
284
|
+
'totalHealthcareAmount' =>'15000',
|
285
|
+
'RxAmount' => '16000'
|
286
|
+
},
|
287
|
+
'IIASFlag' => 'Y'
|
288
|
+
}
|
338
289
|
}
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
'dentalAmount' => '1049'
|
363
|
-
},
|
364
|
-
'IIASFlag' => 'Y'
|
290
|
+
hash = customer_hash.merge(@@merchant_hash)
|
291
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
292
|
+
assert_equal('341', auth_response.authorizationResponse.response)
|
293
|
+
assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
294
|
+
end
|
295
|
+
|
296
|
+
def test_28
|
297
|
+
customer_hash = {
|
298
|
+
'orderId' => '28',
|
299
|
+
'amount' => '15000',
|
300
|
+
'orderSource'=>'ecommerce',
|
301
|
+
'card'=>{
|
302
|
+
'number' =>'5194560012341234',
|
303
|
+
'expDate' => '1212',
|
304
|
+
'type' => 'MC'},
|
305
|
+
'allowPartialAuth' => 'true',
|
306
|
+
'healthcareIIAS' => {
|
307
|
+
'healthcareAmounts' => {
|
308
|
+
'totalHealthcareAmount' =>'15000',
|
309
|
+
'RxAmount' => '3698'
|
310
|
+
},
|
311
|
+
'IIASFlag' => 'Y'
|
312
|
+
}
|
365
313
|
}
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
314
|
+
hash = customer_hash.merge(@@merchant_hash)
|
315
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
316
|
+
assert_equal('000', auth_response.authorizationResponse.response)
|
317
|
+
assert_equal('Approved', auth_response.authorizationResponse.message)
|
318
|
+
end
|
319
|
+
|
320
|
+
def test_29
|
321
|
+
customer_hash = {
|
322
|
+
'orderId' => '29',
|
323
|
+
'amount' => '18699',
|
324
|
+
'orderSource'=>'ecommerce',
|
325
|
+
'card'=>{
|
326
|
+
'number' =>'4024720001231239',
|
327
|
+
'expDate' => '1212',
|
328
|
+
'type' => 'VI'},
|
329
|
+
'allowPartialAuth' => 'true',
|
330
|
+
'healthcareIIAS' => {
|
331
|
+
'healthcareAmounts' => {
|
332
|
+
'totalHealthcareAmount' =>'31000',
|
333
|
+
'RxAmount' => '1000',
|
334
|
+
'visionAmount' => '19901',
|
335
|
+
'clinicOtherAmount' => '9050',
|
336
|
+
'dentalAmount' => '1049'
|
337
|
+
},
|
338
|
+
'IIASFlag' => 'Y'
|
339
|
+
}
|
390
340
|
}
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
assert_equal('18699', auth_response.authorizationResponse.approvedAmount)
|
397
|
-
end
|
398
|
-
|
399
|
-
def test_32
|
400
|
-
customer_hash = {
|
401
|
-
'orderId' => '32',
|
402
|
-
'amount' => '10010',
|
403
|
-
'orderSource'=>'ecommerce',
|
404
|
-
'billToAddress'=>{
|
405
|
-
'name' => 'John Smith',
|
406
|
-
'addressLine1' => '1 Main St.',
|
407
|
-
'city' => 'Burlington',
|
408
|
-
'state' => 'MA',
|
409
|
-
'zip' => '01803-3747',
|
410
|
-
'country' => 'US'},
|
411
|
-
'card'=>{
|
412
|
-
'number' =>'4457010000000009',
|
413
|
-
'expDate' => '0112',
|
414
|
-
'cardValidationNum' => '349',
|
415
|
-
'type' => 'VI'}
|
416
|
-
}
|
417
|
-
hash = customer_hash.merge(@@merchant_hash)
|
418
|
-
authorization_response = LitleOnlineRequest.new.authorization(hash)
|
419
|
-
assert_equal('000', authorization_response.authorizationResponse.response)
|
420
|
-
assert_equal('Approved', authorization_response.authorizationResponse.message)
|
421
|
-
assert_equal('01', authorization_response.authorizationResponse.fraudResult.avsResult)
|
422
|
-
assert_equal('M', authorization_response.authorizationResponse.fraudResult.cardValidationResult)
|
423
|
-
|
424
|
-
#test 32A
|
425
|
-
capture_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId, 'amount' => '5005'}
|
426
|
-
hash32a = capture_hash.merge(@@merchant_hash)
|
427
|
-
capture_response = LitleOnlineRequest.new.capture(hash32a)
|
428
|
-
assert_equal('000', capture_response.captureResponse.response)
|
429
|
-
assert_equal('Approved', capture_response.captureResponse.message)
|
430
|
-
|
431
|
-
#test 32B
|
432
|
-
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId}
|
433
|
-
hash1b = authReversal_hash.merge(@@merchant_hash)
|
434
|
-
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
435
|
-
assert_equal('111', authReversal_response.authReversalResponse.response)
|
436
|
-
assert_equal('Authorization amount has already been depleted', authReversal_response.authReversalResponse.message)
|
437
|
-
end
|
341
|
+
hash = customer_hash.merge(@@merchant_hash)
|
342
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
343
|
+
assert_equal('341', auth_response.authorizationResponse.response)
|
344
|
+
assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
345
|
+
end
|
438
346
|
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
assert_equal('M', authorization_response.authorizationResponse.fraudResult.cardValidationResult)
|
466
|
-
|
467
|
-
#test 33A
|
468
|
-
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId}
|
469
|
-
hash1b = authReversal_hash.merge(@@merchant_hash)
|
470
|
-
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
471
|
-
assert_equal('000', authReversal_response.authReversalResponse.response)
|
472
|
-
assert_equal('Approved', authReversal_response.authReversalResponse.message)
|
473
|
-
end
|
347
|
+
def test_30
|
348
|
+
customer_hash = {
|
349
|
+
'orderId' => '30',
|
350
|
+
'amount' => '20000',
|
351
|
+
'orderSource'=>'ecommerce',
|
352
|
+
'card'=>{
|
353
|
+
'number' =>'4024720001231239',
|
354
|
+
'expDate' => '1212',
|
355
|
+
'type' => 'VI'},
|
356
|
+
'allowPartialAuth' => 'true',
|
357
|
+
'healthcareIIAS' => {
|
358
|
+
'healthcareAmounts' => {
|
359
|
+
'totalHealthcareAmount' =>'20000',
|
360
|
+
'RxAmount' => '1000',
|
361
|
+
'visionAmount' => '19901',
|
362
|
+
'clinicOtherAmount' => '9050',
|
363
|
+
'dentalAmount' => '1049'
|
364
|
+
},
|
365
|
+
'IIASFlag' => 'Y'
|
366
|
+
}
|
367
|
+
}
|
368
|
+
hash = customer_hash.merge(@@merchant_hash)
|
369
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
370
|
+
assert_equal('341', auth_response.authorizationResponse.response)
|
371
|
+
assert_equal('Invalid healthcare amounts', auth_response.authorizationResponse.message)
|
372
|
+
end
|
474
373
|
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
#test 34A
|
502
|
-
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId}
|
503
|
-
hash1b = authReversal_hash.merge(@@merchant_hash)
|
504
|
-
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
505
|
-
assert_equal('000', authReversal_response.authReversalResponse.response)
|
506
|
-
assert_equal('Approved', authReversal_response.authReversalResponse.message)
|
507
|
-
end
|
374
|
+
def test_31
|
375
|
+
customer_hash = {
|
376
|
+
'orderId' => '31',
|
377
|
+
'amount' => '25000',
|
378
|
+
'orderSource'=>'ecommerce',
|
379
|
+
'card'=>{
|
380
|
+
'number' =>'4024720001231239',
|
381
|
+
'expDate' => '1212',
|
382
|
+
'type' => 'VI'},
|
383
|
+
'allowPartialAuth' => 'true',
|
384
|
+
'healthcareIIAS' => {
|
385
|
+
'healthcareAmounts' => {
|
386
|
+
'totalHealthcareAmount' =>'18699',
|
387
|
+
'RxAmount' => '1000',
|
388
|
+
'visionAmount' => '15099'
|
389
|
+
},
|
390
|
+
'IIASFlag' => 'Y'
|
391
|
+
}
|
392
|
+
}
|
393
|
+
hash = customer_hash.merge(@@merchant_hash)
|
394
|
+
auth_response = LitleOnlineRequest.new.authorization(hash)
|
395
|
+
assert_equal('010', auth_response.authorizationResponse.response)
|
396
|
+
assert_equal('Partially Approved', auth_response.authorizationResponse.message)
|
397
|
+
assert_equal('18699', auth_response.authorizationResponse.approvedAmount)
|
398
|
+
end
|
508
399
|
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
400
|
+
def test_32
|
401
|
+
customer_hash = {
|
402
|
+
'orderId' => '32',
|
403
|
+
'amount' => '10010',
|
404
|
+
'orderSource'=>'ecommerce',
|
405
|
+
'billToAddress'=>{
|
406
|
+
'name' => 'John Smith',
|
407
|
+
'addressLine1' => '1 Main St.',
|
408
|
+
'city' => 'Burlington',
|
409
|
+
'state' => 'MA',
|
410
|
+
'zip' => '01803-3747',
|
411
|
+
'country' => 'US'},
|
412
|
+
'card'=>{
|
413
|
+
'number' =>'4457010000000009',
|
414
|
+
'expDate' => '0112',
|
415
|
+
'cardValidationNum' => '349',
|
416
|
+
'type' => 'VI'}
|
417
|
+
}
|
418
|
+
hash = customer_hash.merge(@@merchant_hash)
|
419
|
+
authorization_response = LitleOnlineRequest.new.authorization(hash)
|
420
|
+
assert_equal('000', authorization_response.authorizationResponse.response)
|
421
|
+
assert_equal('Approved', authorization_response.authorizationResponse.message)
|
422
|
+
assert_equal('01', authorization_response.authorizationResponse.fraudResult.avsResult)
|
423
|
+
assert_equal('M', authorization_response.authorizationResponse.fraudResult.cardValidationResult)
|
424
|
+
|
425
|
+
#test 32A
|
426
|
+
capture_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId, 'amount' => '5005'}
|
427
|
+
hash32a = capture_hash.merge(@@merchant_hash)
|
428
|
+
capture_response = LitleOnlineRequest.new.capture(hash32a)
|
429
|
+
assert_equal('000', capture_response.captureResponse.response)
|
430
|
+
assert_equal('Approved', capture_response.captureResponse.message)
|
431
|
+
|
432
|
+
#test 32B
|
433
|
+
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId}
|
434
|
+
hash1b = authReversal_hash.merge(@@merchant_hash)
|
435
|
+
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
436
|
+
assert_equal('111', authReversal_response.authReversalResponse.response)
|
437
|
+
assert_equal('Authorization amount has already been depleted', authReversal_response.authReversalResponse.message)
|
438
|
+
end
|
439
|
+
|
440
|
+
def test_33
|
441
|
+
customer_hash = {
|
442
|
+
'orderId' => '33',
|
443
|
+
'amount' => '20020',
|
444
|
+
'orderSource'=>'ecommerce',
|
445
|
+
'billToAddress'=>{
|
446
|
+
'name' => 'Mike J. Hammer',
|
447
|
+
'addressLine1' => '2 Main St.',
|
448
|
+
'addressLine2' => 'Apt. 222',
|
449
|
+
'city' => 'Riverside',
|
450
|
+
'state' => 'RI',
|
451
|
+
'zip' => '02915',
|
452
|
+
'country' => 'US'},
|
453
|
+
'card'=>{
|
454
|
+
'number' =>'5112010000000003',
|
455
|
+
'expDate' => '0212',
|
456
|
+
'cardValidationNum' => '261',
|
457
|
+
'type' => 'MC'},
|
458
|
+
'cardholderAuthentication' => {'authenticationValue'=> 'BwABBJQ1AgAAAAAgJDUCAAAAAAA=' }
|
459
|
+
}
|
460
|
+
hash = customer_hash.merge(@@merchant_hash)
|
461
|
+
authorization_response = LitleOnlineRequest.new.authorization(hash)
|
462
|
+
assert_equal('000', authorization_response.authorizationResponse.response)
|
463
|
+
assert_equal('Approved', authorization_response.authorizationResponse.message)
|
464
|
+
assert_equal('22222', authorization_response.authorizationResponse.authCode)
|
465
|
+
assert_equal('10', authorization_response.authorizationResponse.fraudResult.avsResult)
|
466
|
+
assert_equal('M', authorization_response.authorizationResponse.fraudResult.cardValidationResult)
|
467
|
+
|
468
|
+
#test 33A
|
469
|
+
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId}
|
470
|
+
hash1b = authReversal_hash.merge(@@merchant_hash)
|
471
|
+
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
472
|
+
assert_equal('000', authReversal_response.authReversalResponse.response)
|
473
|
+
assert_equal('Approved', authReversal_response.authReversalResponse.message)
|
474
|
+
end
|
475
|
+
|
476
|
+
def test_34
|
477
|
+
customer_hash = {
|
478
|
+
'orderId' => '34',
|
479
|
+
'amount' => '30030',
|
480
|
+
'orderSource'=>'ecommerce',
|
481
|
+
'billToAddress'=>{
|
482
|
+
'name' => 'Eileen Jones',
|
483
|
+
'addressLine1' => '3 Main St.',
|
484
|
+
'city' => 'Bloomfield',
|
485
|
+
'state' => 'CT',
|
486
|
+
'zip' => '06002',
|
487
|
+
'country' => 'US'},
|
488
|
+
'card'=>{
|
489
|
+
'number' =>'6011010000000003',
|
490
|
+
'expDate' => '0312',
|
491
|
+
'cardValidationNum' => '758',
|
492
|
+
'type' => 'DI'},
|
493
|
+
}
|
494
|
+
hash = customer_hash.merge(@@merchant_hash)
|
495
|
+
authorization_response = LitleOnlineRequest.new.authorization(hash)
|
496
|
+
assert_equal('000', authorization_response.authorizationResponse.response)
|
497
|
+
assert_equal('Approved', authorization_response.authorizationResponse.message)
|
498
|
+
assert_equal('33333', authorization_response.authorizationResponse.authCode)
|
499
|
+
assert_equal('10', authorization_response.authorizationResponse.fraudResult.avsResult)
|
500
|
+
assert_equal('M', authorization_response.authorizationResponse.fraudResult.cardValidationResult)
|
501
|
+
|
502
|
+
#test 34A
|
503
|
+
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId}
|
504
|
+
hash1b = authReversal_hash.merge(@@merchant_hash)
|
505
|
+
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
506
|
+
assert_equal('000', authReversal_response.authReversalResponse.response)
|
507
|
+
assert_equal('Approved', authReversal_response.authReversalResponse.message)
|
508
|
+
end
|
509
|
+
|
510
|
+
def test_35
|
511
|
+
customer_hash = {
|
512
|
+
'orderId' => '35',
|
513
|
+
'amount' => '40040',
|
514
|
+
'orderSource'=>'ecommerce',
|
515
|
+
'billToAddress'=>{
|
516
|
+
'name' => 'Bob Black',
|
517
|
+
'addressLine1' => '4 Main St.',
|
518
|
+
'city' => 'Laurel',
|
519
|
+
'state' => 'MD',
|
520
|
+
'zip' => '20708',
|
521
|
+
'country' => 'US'},
|
522
|
+
'card'=>{
|
523
|
+
'number' =>'375001000000005',
|
524
|
+
'expDate' => '0412',
|
525
|
+
'type' => 'AX'}
|
526
|
+
}
|
527
|
+
hash = customer_hash.merge(@@merchant_hash)
|
528
|
+
authorization_response = LitleOnlineRequest.new.authorization(hash)
|
529
|
+
assert_equal('000', authorization_response.authorizationResponse.response)
|
530
|
+
assert_equal('Approved', authorization_response.authorizationResponse.message)
|
531
|
+
assert_equal('44444', authorization_response.authorizationResponse.authCode)
|
532
|
+
assert_equal('12', authorization_response.authorizationResponse.fraudResult.avsResult)
|
533
|
+
|
534
|
+
#test 35A
|
535
|
+
capture_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId, 'amount' => '20020'}
|
536
|
+
hash32a = capture_hash.merge(@@merchant_hash)
|
537
|
+
capture_response = LitleOnlineRequest.new.capture(hash32a)
|
538
|
+
assert_equal('000', capture_response.captureResponse.response)
|
539
|
+
assert_equal('Approved', capture_response.captureResponse.message)
|
540
|
+
|
541
|
+
#test 35B
|
542
|
+
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId, 'amount' => '20020'}
|
543
|
+
hash1b = authReversal_hash.merge(@@merchant_hash)
|
544
|
+
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
545
|
+
assert_equal('000', authReversal_response.authReversalResponse.response)
|
546
|
+
assert_equal('Approved', authReversal_response.authReversalResponse.message)
|
547
|
+
end
|
548
|
+
|
549
|
+
def test_36
|
550
|
+
customer_hash = {
|
551
|
+
'orderId' => '36',
|
552
|
+
'amount' => '20500',
|
553
|
+
'orderSource'=>'ecommerce',
|
554
|
+
'card'=>{
|
555
|
+
'number' =>'375000026600004',
|
556
|
+
'expDate' => '0512',
|
557
|
+
'type' => 'AX'},
|
558
|
+
}
|
559
|
+
hash = customer_hash.merge(@@merchant_hash)
|
560
|
+
authorization_response = LitleOnlineRequest.new.authorization(hash)
|
561
|
+
assert_equal('000', authorization_response.authorizationResponse.response)
|
562
|
+
assert_equal('Approved', authorization_response.authorizationResponse.message)
|
563
|
+
|
564
|
+
#test 36A
|
565
|
+
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId, 'amount' => '10000'}
|
566
|
+
hash1b = authReversal_hash.merge(@@merchant_hash)
|
567
|
+
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
568
|
+
assert_equal('336', authReversal_response.authReversalResponse.response)
|
569
|
+
assert_equal('Reversal Amount does not match Authorization amount', authReversal_response.authReversalResponse.message)
|
570
|
+
end
|
547
571
|
|
548
|
-
def test_36
|
549
|
-
customer_hash = {
|
550
|
-
'orderId' => '36',
|
551
|
-
'amount' => '20500',
|
552
|
-
'orderSource'=>'ecommerce',
|
553
|
-
'card'=>{
|
554
|
-
'number' =>'375000026600004',
|
555
|
-
'expDate' => '0512',
|
556
|
-
'type' => 'AX'},
|
557
|
-
}
|
558
|
-
hash = customer_hash.merge(@@merchant_hash)
|
559
|
-
authorization_response = LitleOnlineRequest.new.authorization(hash)
|
560
|
-
assert_equal('000', authorization_response.authorizationResponse.response)
|
561
|
-
assert_equal('Approved', authorization_response.authorizationResponse.message)
|
562
|
-
|
563
|
-
#test 36A
|
564
|
-
authReversal_hash = {'litleTxnId' => authorization_response.authorizationResponse.litleTxnId, 'amount' => '10000'}
|
565
|
-
hash1b = authReversal_hash.merge(@@merchant_hash)
|
566
|
-
authReversal_response = LitleOnlineRequest.new.auth_reversal(hash1b)
|
567
|
-
assert_equal('336', authReversal_response.authReversalResponse.response)
|
568
|
-
assert_equal('Reversal Amount does not match Authorization amount', authReversal_response.authReversalResponse.message)
|
569
572
|
end
|
570
|
-
|
571
|
-
end
|
573
|
+
end
|