LitleOnline 8.10.0 → 8.10.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/Communications.rb +3 -4
- data/lib/Configuration.rb +1 -1
- data/lib/LitleOnlineRequest.rb +170 -139
- data/lib/XMLFields.rb +29 -29
- data/test/certification/certTest1_base.rb +602 -606
- data/test/certification/certTest2_authenhanced.rb +6 -6
- data/test/certification/certTest3_authreversal.rb +29 -30
- data/test/certification/certTest4_echeck.rb +13 -16
- data/test/certification/certTest5_token.rb +11 -31
- data/test/functional/test_auth.rb +6 -6
- data/test/functional/test_authReversal.rb +6 -6
- data/test/functional/test_capture.rb +3 -3
- data/test/functional/test_captureGivenAuth.rb +12 -12
- data/test/functional/test_credit.rb +7 -7
- data/test/functional/test_echeckCredit.rb +11 -11
- data/test/functional/test_echeckRedeposit.rb +8 -8
- data/test/functional/test_echeckSale.rb +34 -32
- data/test/functional/test_echeckVerification.rb +8 -8
- data/test/functional/test_forceCapture.rb +8 -8
- data/test/functional/test_sale.rb +9 -11
- data/test/functional/test_token.rb +12 -12
- data/test/functional/test_xmlfields.rb +18 -18
- data/test/unit/test_LitleOnlineRequest.rb +26 -17
- data/test/unit/test_auth.rb +22 -10
- data/test/unit/test_authReversal.rb +2 -2
- data/test/unit/test_capture.rb +1 -1
- data/test/unit/test_captureGivenAuth.rb +6 -6
- data/test/unit/test_credit.rb +4 -7
- data/test/unit/test_echeckCredit.rb +2 -2
- data/test/unit/test_echeckRedeposit.rb +8 -8
- data/test/unit/test_echeckSale.rb +2 -2
- data/test/unit/test_echeckVerification.rb +8 -8
- data/test/unit/test_forceCapture.rb +8 -8
- data/test/unit/test_sale.rb +9 -9
- data/test/unit/test_token.rb +4 -4
- data/test/unit/test_xmlfields.rb +7 -9
- metadata +12 -12
@@ -26,7 +26,7 @@ require 'lib/LitleOnline'
|
|
26
26
|
require 'test/unit'
|
27
27
|
|
28
28
|
class Test_capture < Test::Unit::TestCase
|
29
|
-
def
|
29
|
+
def test_simple_capture
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
@@ -38,7 +38,7 @@ class Test_capture < Test::Unit::TestCase
|
|
38
38
|
assert_equal('Valid Format', response.message)
|
39
39
|
end
|
40
40
|
|
41
|
-
def
|
41
|
+
def test_simple_capture_with_partial
|
42
42
|
hash = {
|
43
43
|
'merchantId' => '101',
|
44
44
|
'version'=>'8.8',
|
@@ -51,7 +51,7 @@ class Test_capture < Test::Unit::TestCase
|
|
51
51
|
assert_equal('Valid Format', response.message)
|
52
52
|
end
|
53
53
|
|
54
|
-
def
|
54
|
+
def test_complex_capture
|
55
55
|
hash = {
|
56
56
|
'merchantId' => '101',
|
57
57
|
'version'=>'8.8',
|
@@ -26,7 +26,7 @@ require 'lib/LitleOnline'
|
|
26
26
|
require 'test/unit'
|
27
27
|
|
28
28
|
class TestcaptureGivenAuth < Test::Unit::TestCase
|
29
|
-
def
|
29
|
+
def test_simple_capture_given_auth_with_card
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
@@ -43,11 +43,11 @@ class TestcaptureGivenAuth < Test::Unit::TestCase
|
|
43
43
|
'number' =>'4100000000000001',
|
44
44
|
'expDate' =>'1210'
|
45
45
|
}}
|
46
|
-
response= LitleOnlineRequest.new.
|
46
|
+
response= LitleOnlineRequest.new.capture_given_auth(hash)
|
47
47
|
assert_equal('Valid Format', response.message)
|
48
48
|
end
|
49
49
|
|
50
|
-
def
|
50
|
+
def test_simple_capture_given_auth_with_token
|
51
51
|
hash = {
|
52
52
|
'merchantId' => '101',
|
53
53
|
'version'=>'8.8',
|
@@ -65,11 +65,11 @@ class TestcaptureGivenAuth < Test::Unit::TestCase
|
|
65
65
|
'cardValidationNum'=>'555',
|
66
66
|
'type'=>'VI'
|
67
67
|
}}
|
68
|
-
response= LitleOnlineRequest.new.
|
68
|
+
response= LitleOnlineRequest.new.capture_given_auth(hash)
|
69
69
|
assert_equal('Valid Format', response.message)
|
70
70
|
end
|
71
71
|
|
72
|
-
def
|
72
|
+
def test_fields_out_of_order
|
73
73
|
hash = {
|
74
74
|
'merchantId' => '101',
|
75
75
|
'version'=>'8.8',
|
@@ -87,11 +87,11 @@ class TestcaptureGivenAuth < Test::Unit::TestCase
|
|
87
87
|
'reportGroup'=>'Planets',
|
88
88
|
'orderId'=>'12344'
|
89
89
|
}
|
90
|
-
response= LitleOnlineRequest.new.
|
90
|
+
response= LitleOnlineRequest.new.capture_given_auth(hash)
|
91
91
|
assert_equal('Valid Format', response.message)
|
92
92
|
end
|
93
93
|
|
94
|
-
def
|
94
|
+
def test_invalid_field
|
95
95
|
hash = {
|
96
96
|
'merchantId' => '101',
|
97
97
|
'version'=>'8.8',
|
@@ -109,11 +109,11 @@ class TestcaptureGivenAuth < Test::Unit::TestCase
|
|
109
109
|
'number' =>'4100000000000001',
|
110
110
|
'expDate' =>'1210'
|
111
111
|
}}
|
112
|
-
response= LitleOnlineRequest.new.
|
112
|
+
response= LitleOnlineRequest.new.capture_given_auth(hash)
|
113
113
|
assert_equal('Valid Format', response.message)
|
114
114
|
end
|
115
115
|
|
116
|
-
def
|
116
|
+
def test_complex_capture_given_auth
|
117
117
|
hash = {
|
118
118
|
'merchantId' => '101',
|
119
119
|
'version'=>'8.8',
|
@@ -132,11 +132,11 @@ class TestcaptureGivenAuth < Test::Unit::TestCase
|
|
132
132
|
'number' =>'4100000000000001',
|
133
133
|
'expDate' =>'1210'
|
134
134
|
}}
|
135
|
-
response= LitleOnlineRequest.new.
|
135
|
+
response= LitleOnlineRequest.new.capture_given_auth(hash)
|
136
136
|
assert_equal('Valid Format', response.message)
|
137
137
|
end
|
138
138
|
|
139
|
-
def
|
139
|
+
def test_auth_info
|
140
140
|
hash = {
|
141
141
|
'merchantId' => '101',
|
142
142
|
'version'=>'8.8',
|
@@ -154,7 +154,7 @@ class TestcaptureGivenAuth < Test::Unit::TestCase
|
|
154
154
|
'number' =>'4100000000000001',
|
155
155
|
'expDate' =>'1210'
|
156
156
|
}}
|
157
|
-
response= LitleOnlineRequest.new.
|
157
|
+
response= LitleOnlineRequest.new.capture_given_auth(hash)
|
158
158
|
assert_equal('Valid Format', response.message)
|
159
159
|
end
|
160
160
|
end
|
@@ -26,7 +26,7 @@ require 'lib/LitleOnline'
|
|
26
26
|
require 'test/unit'
|
27
27
|
|
28
28
|
class TestCredit < Test::Unit::TestCase
|
29
|
-
def
|
29
|
+
def test_simple_credit_with_card
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
@@ -43,7 +43,7 @@ class TestCredit < Test::Unit::TestCase
|
|
43
43
|
assert_equal('Valid Format', response.message)
|
44
44
|
end
|
45
45
|
|
46
|
-
def
|
46
|
+
def test_simple_credit_with_paypal
|
47
47
|
hash = {
|
48
48
|
'merchantId' => '101',
|
49
49
|
'version'=>'8.8',
|
@@ -59,7 +59,7 @@ class TestCredit < Test::Unit::TestCase
|
|
59
59
|
assert(response.message =~ /Error validating xml data against the schema/)
|
60
60
|
end
|
61
61
|
|
62
|
-
def
|
62
|
+
def test_illegal_order_id
|
63
63
|
hash = {
|
64
64
|
'merchantId' => '101',
|
65
65
|
'version'=>'8.8',
|
@@ -77,7 +77,7 @@ class TestCredit < Test::Unit::TestCase
|
|
77
77
|
assert(response.message =~ /Error validating xml data against the schema/)
|
78
78
|
end
|
79
79
|
|
80
|
-
def
|
80
|
+
def test_fields_out_of_order
|
81
81
|
hash = {
|
82
82
|
'merchantId' => '101',
|
83
83
|
'version'=>'8.8',
|
@@ -95,7 +95,7 @@ class TestCredit < Test::Unit::TestCase
|
|
95
95
|
assert_equal('Valid Format', response.message)
|
96
96
|
end
|
97
97
|
|
98
|
-
def
|
98
|
+
def test_invalid_field
|
99
99
|
hash = {
|
100
100
|
'merchantId' => '101',
|
101
101
|
'version'=>'8.8',
|
@@ -113,7 +113,7 @@ class TestCredit < Test::Unit::TestCase
|
|
113
113
|
assert_equal('Valid Format', response.message)
|
114
114
|
end
|
115
115
|
|
116
|
-
def
|
116
|
+
def test_pay_pal_notes
|
117
117
|
hash = {
|
118
118
|
'merchantId' => '101',
|
119
119
|
'version'=>'8.8',
|
@@ -131,7 +131,7 @@ class TestCredit < Test::Unit::TestCase
|
|
131
131
|
assert_equal('Valid Format', response.message)
|
132
132
|
end
|
133
133
|
|
134
|
-
def
|
134
|
+
def test_processing_instructions_and_amex_data
|
135
135
|
hash = {
|
136
136
|
'merchantId' => '101',
|
137
137
|
'version'=>'8.8',
|
@@ -34,21 +34,21 @@ class Test_echeckCredit < Test::Unit::TestCase
|
|
34
34
|
'litleTxnId'=>'123456789101112',
|
35
35
|
'amount'=>'12'
|
36
36
|
}
|
37
|
-
response= LitleOnlineRequest.new.
|
37
|
+
response= LitleOnlineRequest.new.echeck_credit(hash)
|
38
38
|
assert_equal('Valid Format', response.message)
|
39
39
|
end
|
40
40
|
|
41
|
-
def
|
41
|
+
def test_no_amount
|
42
42
|
hash = {
|
43
43
|
'merchantId' => '101',
|
44
44
|
'version'=>'8.8',
|
45
45
|
'reportGroup'=>'Planets',
|
46
46
|
}
|
47
|
-
response = LitleOnlineRequest.new.
|
47
|
+
response = LitleOnlineRequest.new.echeck_credit(hash)
|
48
48
|
assert_match /The content of element 'echeckCredit' is not complete/, response.message
|
49
49
|
end
|
50
50
|
|
51
|
-
def
|
51
|
+
def test_echeck_credit_with_echeck
|
52
52
|
hash = {
|
53
53
|
'merchantId' => '101',
|
54
54
|
'version'=>'8.8',
|
@@ -60,11 +60,11 @@ class Test_echeckCredit < Test::Unit::TestCase
|
|
60
60
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
|
61
61
|
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
|
62
62
|
}
|
63
|
-
response= LitleOnlineRequest.new.
|
63
|
+
response= LitleOnlineRequest.new.echeck_credit(hash)
|
64
64
|
assert_equal('Valid Format', response.message)
|
65
65
|
end
|
66
66
|
|
67
|
-
def
|
67
|
+
def test_echeck_credit_with_echeck_token
|
68
68
|
hash = {
|
69
69
|
'merchantId' => '101',
|
70
70
|
'version'=>'8.8',
|
@@ -76,11 +76,11 @@ class Test_echeckCredit < Test::Unit::TestCase
|
|
76
76
|
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
|
77
77
|
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
|
78
78
|
}
|
79
|
-
response= LitleOnlineRequest.new.
|
79
|
+
response= LitleOnlineRequest.new.echeck_credit(hash)
|
80
80
|
assert_equal('Valid Format', response.message)
|
81
81
|
end
|
82
82
|
|
83
|
-
def
|
83
|
+
def test_extra_field_and_incorrect_order
|
84
84
|
hash = {
|
85
85
|
'merchantId' => '101',
|
86
86
|
'version'=>'8.8',
|
@@ -93,11 +93,11 @@ class Test_echeckCredit < Test::Unit::TestCase
|
|
93
93
|
'orderSource'=>'ecommerce',
|
94
94
|
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
|
95
95
|
}
|
96
|
-
response= LitleOnlineRequest.new.
|
96
|
+
response= LitleOnlineRequest.new.echeck_credit(hash)
|
97
97
|
assert_equal('Valid Format', response.message)
|
98
98
|
end
|
99
99
|
|
100
|
-
def
|
100
|
+
def test_extra_field_and_missing_billing
|
101
101
|
hash = {
|
102
102
|
'merchantId' => '101',
|
103
103
|
'version'=>'8.8',
|
@@ -109,7 +109,7 @@ class Test_echeckCredit < Test::Unit::TestCase
|
|
109
109
|
'orderId'=>'12345',
|
110
110
|
'orderSource'=>'ecommerce',
|
111
111
|
}
|
112
|
-
response= LitleOnlineRequest.new.
|
112
|
+
response= LitleOnlineRequest.new.echeck_credit(hash)
|
113
113
|
assert(response.message =~ /Error validating xml data against the schema/)
|
114
114
|
end
|
115
115
|
end
|
@@ -26,18 +26,18 @@ require 'lib/LitleOnline'
|
|
26
26
|
require 'test/unit'
|
27
27
|
|
28
28
|
class Test_echeckRedeposit < Test::Unit::TestCase
|
29
|
-
def
|
29
|
+
def test_simple_echeck_redeposit
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
33
33
|
'reportGroup'=>'Planets',
|
34
34
|
'litleTxnId'=>'123456'
|
35
35
|
}
|
36
|
-
response= LitleOnlineRequest.new.
|
36
|
+
response= LitleOnlineRequest.new.echeck_redeposit(hash)
|
37
37
|
assert_equal('Valid Format', response.message)
|
38
38
|
end
|
39
39
|
|
40
|
-
def
|
40
|
+
def test_echeck_redeposit_with_echeck
|
41
41
|
hash = {
|
42
42
|
'merchantId' => '101',
|
43
43
|
'version'=>'8.8',
|
@@ -45,11 +45,11 @@ class Test_echeckRedeposit < Test::Unit::TestCase
|
|
45
45
|
'litleTxnId'=>'123456',
|
46
46
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'}
|
47
47
|
}
|
48
|
-
response= LitleOnlineRequest.new.
|
48
|
+
response= LitleOnlineRequest.new.echeck_redeposit(hash)
|
49
49
|
assert_equal('Valid Format', response.message)
|
50
50
|
end
|
51
51
|
|
52
|
-
def
|
52
|
+
def test_echeck_redeposit_with_echeck_token
|
53
53
|
hash = {
|
54
54
|
'merchantId' => '101',
|
55
55
|
'version'=>'8.8',
|
@@ -57,11 +57,11 @@ class Test_echeckRedeposit < Test::Unit::TestCase
|
|
57
57
|
'litleTxnId'=>'123456',
|
58
58
|
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'}
|
59
59
|
}
|
60
|
-
response= LitleOnlineRequest.new.
|
60
|
+
response= LitleOnlineRequest.new.echeck_redeposit(hash)
|
61
61
|
assert_equal('Valid Format', response.message)
|
62
62
|
end
|
63
63
|
|
64
|
-
def
|
64
|
+
def test_extra_field_and_incorrect_order
|
65
65
|
hash = {
|
66
66
|
'merchantId' => '101',
|
67
67
|
'version'=>'8.8',
|
@@ -70,7 +70,7 @@ class Test_echeckRedeposit < Test::Unit::TestCase
|
|
70
70
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
|
71
71
|
'litleTxnId'=>'123456'
|
72
72
|
}
|
73
|
-
response= LitleOnlineRequest.new.
|
73
|
+
response= LitleOnlineRequest.new.echeck_redeposit(hash)
|
74
74
|
assert_equal('Valid Format', response.message)
|
75
75
|
end
|
76
76
|
|
@@ -26,7 +26,7 @@ require 'lib/LitleOnline'
|
|
26
26
|
require 'test/unit'
|
27
27
|
|
28
28
|
class Test_echeckSale < Test::Unit::TestCase
|
29
|
-
def
|
29
|
+
def test_echeck_sale_with_echeck
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
@@ -38,21 +38,21 @@ class Test_echeckSale < Test::Unit::TestCase
|
|
38
38
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
|
39
39
|
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
|
40
40
|
}
|
41
|
-
response= LitleOnlineRequest.new.
|
41
|
+
response= LitleOnlineRequest.new.echeck_sale(hash)
|
42
42
|
assert_equal('Valid Format', response.message)
|
43
43
|
end
|
44
44
|
|
45
|
-
def
|
45
|
+
def test_no_amount
|
46
46
|
hash = {
|
47
47
|
'merchantId' => '101',
|
48
48
|
'version'=>'8.8',
|
49
49
|
'reportGroup'=>'Planets'
|
50
50
|
}
|
51
|
-
response = LitleOnlineRequest.new.
|
51
|
+
response = LitleOnlineRequest.new.echeck_sale(hash)
|
52
52
|
assert_match /The content of element 'echeckSale' is not complete/, response.message
|
53
53
|
end
|
54
54
|
|
55
|
-
def
|
55
|
+
def test_echeck_sale_with_echeck
|
56
56
|
hash = {
|
57
57
|
'merchantId' => '101',
|
58
58
|
'version'=>'8.8',
|
@@ -64,11 +64,11 @@ class Test_echeckSale < Test::Unit::TestCase
|
|
64
64
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
|
65
65
|
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
|
66
66
|
}
|
67
|
-
response= LitleOnlineRequest.new.
|
67
|
+
response= LitleOnlineRequest.new.echeck_sale(hash)
|
68
68
|
assert_equal('Valid Format', response.message)
|
69
69
|
end
|
70
70
|
|
71
|
-
def
|
71
|
+
def test_echeck_sale_with_ship_to
|
72
72
|
hash = {
|
73
73
|
'merchantId' => '101',
|
74
74
|
'version'=>'8.8',
|
@@ -81,11 +81,11 @@ class Test_echeckSale < Test::Unit::TestCase
|
|
81
81
|
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
|
82
82
|
'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
|
83
83
|
}
|
84
|
-
response= LitleOnlineRequest.new.
|
84
|
+
response= LitleOnlineRequest.new.echeck_sale(hash)
|
85
85
|
assert_equal('Valid Format', response.message)
|
86
86
|
end
|
87
87
|
|
88
|
-
def
|
88
|
+
def test_echeck_sale_with_echeck_token
|
89
89
|
hash = {
|
90
90
|
'merchantId' => '101',
|
91
91
|
'version'=>'8.8',
|
@@ -98,11 +98,11 @@ class Test_echeckSale < Test::Unit::TestCase
|
|
98
98
|
'customBilling'=>{'phone'=>'123456789','descriptor'=>'good'},
|
99
99
|
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
|
100
100
|
}
|
101
|
-
response= LitleOnlineRequest.new.
|
101
|
+
response= LitleOnlineRequest.new.echeck_sale(hash)
|
102
102
|
assert_equal('Valid Format', response.message)
|
103
103
|
end
|
104
104
|
|
105
|
-
def
|
105
|
+
def test_extra_field_and_incorrect_order
|
106
106
|
hash = {
|
107
107
|
'merchantId' => '101',
|
108
108
|
'version'=>'8.8',
|
@@ -115,11 +115,11 @@ class Test_echeckSale < Test::Unit::TestCase
|
|
115
115
|
'orderSource'=>'ecommerce',
|
116
116
|
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
|
117
117
|
}
|
118
|
-
response= LitleOnlineRequest.new.
|
118
|
+
response= LitleOnlineRequest.new.echeck_sale(hash)
|
119
119
|
assert_equal('Valid Format', response.message)
|
120
120
|
end
|
121
121
|
|
122
|
-
def
|
122
|
+
def test_extra_field_and_missing_billing
|
123
123
|
hash = {
|
124
124
|
'merchantId' => '101',
|
125
125
|
'version'=>'8.8',
|
@@ -131,27 +131,29 @@ class Test_echeckSale < Test::Unit::TestCase
|
|
131
131
|
'orderId'=>'12345',
|
132
132
|
'orderSource'=>'ecommerce',
|
133
133
|
}
|
134
|
-
response= LitleOnlineRequest.new.
|
134
|
+
response= LitleOnlineRequest.new.echeck_sale(hash)
|
135
135
|
assert(response.message =~ /Error validating xml data against the schema/)
|
136
136
|
end
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
137
|
+
|
138
|
+
def test_simple_echeck_sale
|
139
|
+
hash = {
|
140
|
+
'reportGroup'=>'Planets',
|
141
|
+
'litleTxnId'=>'123456789101112',
|
142
|
+
'amount'=>'12'
|
143
|
+
}
|
144
|
+
response= LitleOnlineRequest.new.echeck_sale(hash)
|
145
|
+
assert_equal('Valid Format', response.message)
|
146
|
+
end
|
147
|
+
|
148
|
+
def test_simple_echeck_sale_with_custom_billing
|
149
|
+
hash = {
|
150
|
+
'reportGroup'=>'Planets',
|
151
|
+
'litleTxnId'=>'123456',
|
152
|
+
'amount'=>'10',
|
153
|
+
}
|
154
|
+
response= LitleOnlineRequest.new.echeck_sale(hash)
|
155
|
+
assert_equal('Valid Format', response.message)
|
156
|
+
end
|
155
157
|
|
156
158
|
end
|
157
159
|
|
@@ -27,7 +27,7 @@ require 'test/unit'
|
|
27
27
|
|
28
28
|
class Test_echeckVerification < Test::Unit::TestCase
|
29
29
|
|
30
|
-
def
|
30
|
+
def test_simple_echeck_verification
|
31
31
|
hash = {
|
32
32
|
'merchantId' => '101',
|
33
33
|
'version'=>'8.8',
|
@@ -38,11 +38,11 @@ class Test_echeckVerification < Test::Unit::TestCase
|
|
38
38
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
|
39
39
|
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
|
40
40
|
}
|
41
|
-
response= LitleOnlineRequest.new.
|
41
|
+
response= LitleOnlineRequest.new.echeck_verification(hash)
|
42
42
|
assert_equal('Valid Format', response.message)
|
43
43
|
end
|
44
44
|
|
45
|
-
def
|
45
|
+
def test_echeck_verification_with_echeck_token
|
46
46
|
hash = {
|
47
47
|
'merchantId' => '101',
|
48
48
|
'version'=>'8.8',
|
@@ -53,11 +53,11 @@ class Test_echeckVerification < Test::Unit::TestCase
|
|
53
53
|
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
|
54
54
|
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
|
55
55
|
}
|
56
|
-
response= LitleOnlineRequest.new.
|
56
|
+
response= LitleOnlineRequest.new.echeck_verification(hash)
|
57
57
|
assert_equal('Valid Format', response.message)
|
58
58
|
end
|
59
59
|
|
60
|
-
def
|
60
|
+
def test_extra_field_and_incorrect_order
|
61
61
|
hash = {
|
62
62
|
'merchantId' => '101',
|
63
63
|
'version'=>'8.8',
|
@@ -69,11 +69,11 @@ class Test_echeckVerification < Test::Unit::TestCase
|
|
69
69
|
'orderSource'=>'ecommerce',
|
70
70
|
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
|
71
71
|
}
|
72
|
-
response= LitleOnlineRequest.new.
|
72
|
+
response= LitleOnlineRequest.new.echeck_verification(hash)
|
73
73
|
assert_equal('Valid Format', response.message)
|
74
74
|
end
|
75
75
|
|
76
|
-
def
|
76
|
+
def test_extra_field_and_missing_billing
|
77
77
|
hash = {
|
78
78
|
'merchantId' => '101',
|
79
79
|
'version'=>'8.8',
|
@@ -84,7 +84,7 @@ class Test_echeckVerification < Test::Unit::TestCase
|
|
84
84
|
'orderId'=>'12345',
|
85
85
|
'orderSource'=>'ecommerce',
|
86
86
|
}
|
87
|
-
response= LitleOnlineRequest.new.
|
87
|
+
response= LitleOnlineRequest.new.echeck_verification(hash)
|
88
88
|
assert(response.message =~ /Error validating xml data against the schema/)
|
89
89
|
end
|
90
90
|
|