LitleOnline 8.10.0 → 8.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
data/test/unit/test_auth.rb
CHANGED
@@ -27,12 +27,11 @@ require 'test/unit'
|
|
27
27
|
|
28
28
|
#test Authorization Transaction
|
29
29
|
class TestAuth < Test::Unit::TestCase
|
30
|
-
def
|
30
|
+
def test_no_order_id
|
31
31
|
hash = {
|
32
32
|
'merchantId' => '101',
|
33
33
|
'version'=>'8.8',
|
34
34
|
'reportGroup'=>'Planets',
|
35
|
-
'litleTxnId'=>'123456',
|
36
35
|
'amount'=>'106',
|
37
36
|
'orderSource'=>'ecommerce',
|
38
37
|
'card'=>{
|
@@ -44,12 +43,25 @@ class TestAuth < Test::Unit::TestCase
|
|
44
43
|
assert_match /Missing Required Field: orderId!!!!/, exception.message
|
45
44
|
end
|
46
45
|
|
47
|
-
def
|
46
|
+
def test_success_re_auth
|
48
47
|
hash = {
|
49
48
|
'merchantId' => '101',
|
50
49
|
'version'=>'8.8',
|
51
50
|
'reportGroup'=>'Planets',
|
52
|
-
'litleTxnId'=>'123456'
|
51
|
+
'litleTxnId'=>'123456'
|
52
|
+
}
|
53
|
+
|
54
|
+
XMLObject.expects(:new)
|
55
|
+
Communications.expects(:http_post).with(regexp_matches(/.*litleTxnId.*/m),kind_of(Hash))
|
56
|
+
LitleOnlineRequest.new.authorization(hash)
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_no_amount
|
60
|
+
hash = {
|
61
|
+
'merchantId' => '101',
|
62
|
+
'version'=>'8.8',
|
63
|
+
'reportGroup'=>'Planets',
|
64
|
+
# 'litleTxnId'=>'123456',
|
53
65
|
'orderId'=>'12344',
|
54
66
|
'orderSource'=>'ecommerce',
|
55
67
|
'card'=>{
|
@@ -61,12 +73,12 @@ class TestAuth < Test::Unit::TestCase
|
|
61
73
|
assert_match /Missing Required Field: amount!!!!/, exception.message
|
62
74
|
end
|
63
75
|
|
64
|
-
def
|
76
|
+
def test_no_order_source
|
65
77
|
hash = {
|
66
78
|
'merchantId' => '101',
|
67
79
|
'version'=>'8.8',
|
68
80
|
'reportGroup'=>'Planets',
|
69
|
-
'litleTxnId'=>'123456',
|
81
|
+
# 'litleTxnId'=>'123456',
|
70
82
|
'orderId'=>'12344',
|
71
83
|
'amount'=>'106',
|
72
84
|
'card'=>{
|
@@ -78,7 +90,7 @@ class TestAuth < Test::Unit::TestCase
|
|
78
90
|
assert_match /Missing Required Field: orderSource!!!!/, exception.message
|
79
91
|
end
|
80
92
|
|
81
|
-
def
|
93
|
+
def test_both_choices_card_and_paypal
|
82
94
|
hash = {
|
83
95
|
'merchantId' => '101',
|
84
96
|
'version'=>'8.8',
|
@@ -101,7 +113,7 @@ class TestAuth < Test::Unit::TestCase
|
|
101
113
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
102
114
|
end
|
103
115
|
|
104
|
-
def
|
116
|
+
def test_three_choices_card_and_paypage_and_paypal
|
105
117
|
hash = {
|
106
118
|
'merchantId' => '101',
|
107
119
|
'version'=>'8.8',
|
@@ -128,12 +140,12 @@ class TestAuth < Test::Unit::TestCase
|
|
128
140
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
129
141
|
end
|
130
142
|
|
131
|
-
def
|
143
|
+
def test_all_choices_card_and_paypage_and_paypal_and_token
|
132
144
|
hash = {
|
133
145
|
'merchantId' => '101',
|
134
146
|
'version'=>'8.8',
|
135
147
|
'reportGroup'=>'Planets',
|
136
|
-
'litleTxnId'=>'123456',
|
148
|
+
# 'litleTxnId'=>'123456',
|
137
149
|
'orderId'=>'12344',
|
138
150
|
'amount'=>'106',
|
139
151
|
'orderSource'=>'ecommerce',
|
@@ -26,7 +26,7 @@ require 'lib/LitleOnline'
|
|
26
26
|
require 'test/unit'
|
27
27
|
|
28
28
|
class TestAuthReversal < Test::Unit::TestCase
|
29
|
-
def
|
29
|
+
def test_no_litle_txn_id
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
@@ -34,7 +34,7 @@ class TestAuthReversal < Test::Unit::TestCase
|
|
34
34
|
'amount'=>'106',
|
35
35
|
'payPalNotes'=>'Notes'
|
36
36
|
}
|
37
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
37
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.auth_reversal(hash)}
|
38
38
|
assert_match /Missing Required Field: litleTxnId!!!!/, exception.message
|
39
39
|
end
|
40
40
|
|
data/test/unit/test_capture.rb
CHANGED
@@ -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_no_amount
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
@@ -42,11 +42,11 @@ class TestcaptureGivenAuth < Test::Unit::TestCase
|
|
42
42
|
'number' =>'4100000000000001',
|
43
43
|
'expDate' =>'1210'
|
44
44
|
}}
|
45
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
45
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.capture_given_auth(hash)}
|
46
46
|
assert_match /Missing Required Field: amount!!!!/, exception.message
|
47
47
|
end
|
48
48
|
|
49
|
-
def
|
49
|
+
def test_both_choices_card_and_token
|
50
50
|
hash = {
|
51
51
|
'merchantId' => '101',
|
52
52
|
'version'=>'8.8',
|
@@ -68,11 +68,11 @@ class TestcaptureGivenAuth < Test::Unit::TestCase
|
|
68
68
|
'number' =>'4100000000000001',
|
69
69
|
'expDate' =>'1210'
|
70
70
|
}}
|
71
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
71
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.capture_given_auth(hash)}
|
72
72
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
73
73
|
end
|
74
74
|
|
75
|
-
def
|
75
|
+
def test_all_three_choices
|
76
76
|
hash = {
|
77
77
|
'merchantId' => '101',
|
78
78
|
'version'=>'8.8',
|
@@ -101,7 +101,7 @@ class TestcaptureGivenAuth < Test::Unit::TestCase
|
|
101
101
|
'type'=>'VI'
|
102
102
|
}}
|
103
103
|
|
104
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
104
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.capture_given_auth(hash)}
|
105
105
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
106
106
|
end
|
107
107
|
end
|
data/test/unit/test_credit.rb
CHANGED
@@ -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_both_choices_card_and_paypal
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
@@ -49,7 +49,7 @@ class TestCredit < Test::Unit::TestCase
|
|
49
49
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
50
50
|
end
|
51
51
|
|
52
|
-
def
|
52
|
+
def test_three_choices_card_and_paypage_and_paypal
|
53
53
|
hash = {
|
54
54
|
'merchantId' => '101',
|
55
55
|
'version'=>'8.8',
|
@@ -76,7 +76,7 @@ class TestCredit < Test::Unit::TestCase
|
|
76
76
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
77
77
|
end
|
78
78
|
|
79
|
-
def
|
79
|
+
def test_all_choices_card_and_paypage_and_paypal_and_token
|
80
80
|
hash = {
|
81
81
|
'merchantId' => '101',
|
82
82
|
'version'=>'8.8',
|
@@ -111,7 +111,4 @@ class TestCredit < Test::Unit::TestCase
|
|
111
111
|
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
|
112
112
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
113
113
|
end
|
114
|
-
|
115
|
-
|
116
|
-
end
|
117
|
-
|
114
|
+
end
|
@@ -28,7 +28,7 @@ require 'test/unit'
|
|
28
28
|
class Test_echeckCredit < Test::Unit::TestCase
|
29
29
|
|
30
30
|
|
31
|
-
def
|
31
|
+
def test_echeck_credit_with_both
|
32
32
|
hash = {
|
33
33
|
'merchantId' => '101',
|
34
34
|
'version'=>'8.8',
|
@@ -37,7 +37,7 @@ class Test_echeckCredit < Test::Unit::TestCase
|
|
37
37
|
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
|
38
38
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'}
|
39
39
|
}
|
40
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
40
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_credit(hash)}
|
41
41
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
42
42
|
end
|
43
43
|
|
@@ -26,17 +26,17 @@ require 'lib/LitleOnline'
|
|
26
26
|
require 'test/unit'
|
27
27
|
|
28
28
|
class Test_echeckRedeposit < Test::Unit::TestCase
|
29
|
-
def
|
29
|
+
def test_no_txn_id
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
33
33
|
'reportGroup'=>'Planets',
|
34
34
|
}
|
35
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
35
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_redeposit(hash)}
|
36
36
|
assert_match /Missing Required Field: litleTxnId!!!!/, exception.message
|
37
37
|
end
|
38
38
|
|
39
|
-
def
|
39
|
+
def test_echeck_redeposit_withecheckmissingfield
|
40
40
|
hash = {
|
41
41
|
'merchantId' => '101',
|
42
42
|
'version'=>'8.8',
|
@@ -44,11 +44,11 @@ class Test_echeckRedeposit < Test::Unit::TestCase
|
|
44
44
|
'litleTxnId'=>'123456',
|
45
45
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','checkNum'=>'123455'}
|
46
46
|
}
|
47
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
47
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_redeposit(hash)}
|
48
48
|
assert_match /Missing Required Field: routingNum!!!!/, exception.message
|
49
49
|
end
|
50
50
|
|
51
|
-
def
|
51
|
+
def test_echeck_redeposit_with_echeck_token_missing_field
|
52
52
|
hash = {
|
53
53
|
'merchantId' => '101',
|
54
54
|
'version'=>'8.8',
|
@@ -56,11 +56,11 @@ class Test_echeckRedeposit < Test::Unit::TestCase
|
|
56
56
|
'litleTxnId'=>'123456',
|
57
57
|
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','checkNum'=>'123455'}
|
58
58
|
}
|
59
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
59
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_redeposit(hash)}
|
60
60
|
assert_match /Missing Required Field: routingNum!!!!/, exception.message
|
61
61
|
end
|
62
62
|
|
63
|
-
def
|
63
|
+
def test_echeck_redeposit_with_both
|
64
64
|
hash = {
|
65
65
|
'merchantId' => '101',
|
66
66
|
'version'=>'8.8',
|
@@ -69,7 +69,7 @@ class Test_echeckRedeposit < Test::Unit::TestCase
|
|
69
69
|
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
|
70
70
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'}
|
71
71
|
}
|
72
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
72
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_redeposit(hash)}
|
73
73
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
74
74
|
end
|
75
75
|
end
|
@@ -28,7 +28,7 @@ require 'test/unit'
|
|
28
28
|
class Test_echeckSale < Test::Unit::TestCase
|
29
29
|
|
30
30
|
|
31
|
-
def
|
31
|
+
def test_echeck_sale_with_both
|
32
32
|
hash = {
|
33
33
|
'merchantId' => '101',
|
34
34
|
'version'=>'8.8',
|
@@ -37,7 +37,7 @@ class Test_echeckSale < Test::Unit::TestCase
|
|
37
37
|
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
|
38
38
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'}
|
39
39
|
}
|
40
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
40
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_sale(hash)}
|
41
41
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
42
42
|
end
|
43
43
|
|
@@ -26,28 +26,28 @@ require 'lib/LitleOnline'
|
|
26
26
|
require 'test/unit'
|
27
27
|
|
28
28
|
class Test_echeckVerification < Test::Unit::TestCase
|
29
|
-
def
|
29
|
+
def test_no_amount
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
33
33
|
'reportGroup'=>'Planets',
|
34
34
|
'orderId'=>'12345'
|
35
35
|
}
|
36
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
36
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
|
37
37
|
assert_match /Missing Required Field: amount!!!!/, exception.message
|
38
38
|
end
|
39
39
|
|
40
|
-
def
|
40
|
+
def test_no_order_id
|
41
41
|
hash = {
|
42
42
|
'merchantId' => '101',
|
43
43
|
'version'=>'8.8',
|
44
44
|
'reportGroup'=>'Planets',
|
45
45
|
}
|
46
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
46
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
|
47
47
|
assert_match /Missing Required Field: orderId!!!!/, exception.message
|
48
48
|
end
|
49
49
|
|
50
|
-
def
|
50
|
+
def test_no_order_source
|
51
51
|
hash = {
|
52
52
|
'merchantId' => '101',
|
53
53
|
'version'=>'8.8',
|
@@ -55,11 +55,11 @@ class Test_echeckVerification < Test::Unit::TestCase
|
|
55
55
|
'amount'=>'123456',
|
56
56
|
'orderId'=>'12345'
|
57
57
|
}
|
58
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
58
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
|
59
59
|
assert_match /Missing Required Field: orderSource!!!/, exception.message
|
60
60
|
end
|
61
61
|
|
62
|
-
def
|
62
|
+
def test_echeck_verification_with_both
|
63
63
|
hash = {
|
64
64
|
'merchantId' => '101',
|
65
65
|
'version'=>'8.8',
|
@@ -68,7 +68,7 @@ class Test_echeckVerification < Test::Unit::TestCase
|
|
68
68
|
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
|
69
69
|
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'}
|
70
70
|
}
|
71
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
71
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
|
72
72
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
73
73
|
end
|
74
74
|
end
|
@@ -26,7 +26,7 @@ require 'lib/LitleOnline'
|
|
26
26
|
require 'test/unit'
|
27
27
|
|
28
28
|
class TestForceCapture < Test::Unit::TestCase
|
29
|
-
def
|
29
|
+
def test_no_order_id
|
30
30
|
hash = {
|
31
31
|
'merchantId' => '101',
|
32
32
|
'version'=>'8.8',
|
@@ -40,11 +40,11 @@ class TestForceCapture < Test::Unit::TestCase
|
|
40
40
|
'cardValidationNum'=>'555',
|
41
41
|
'type'=>'VI'
|
42
42
|
}}
|
43
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
43
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.force_capture(hash)}
|
44
44
|
assert_match /Missing Required Field: orderId!!!!/, exception.message
|
45
45
|
end
|
46
46
|
|
47
|
-
def
|
47
|
+
def test_no_order_source
|
48
48
|
hash = {
|
49
49
|
'merchantId' => '101',
|
50
50
|
'version'=>'8.8',
|
@@ -57,11 +57,11 @@ class TestForceCapture < Test::Unit::TestCase
|
|
57
57
|
'number' =>'4100000000000001',
|
58
58
|
'expDate' =>'1210'
|
59
59
|
}}
|
60
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
60
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.force_capture(hash)}
|
61
61
|
assert_match /Missing Required Field: orderSource!!!!/, exception.message
|
62
62
|
end
|
63
63
|
|
64
|
-
def
|
64
|
+
def test_both_choices_card_and_token
|
65
65
|
hash = {
|
66
66
|
'merchantId' => '101',
|
67
67
|
'version'=>'8.8',
|
@@ -83,11 +83,11 @@ class TestForceCapture < Test::Unit::TestCase
|
|
83
83
|
'cardValidationNum'=>'555',
|
84
84
|
'type'=>'VI'
|
85
85
|
}}
|
86
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
86
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.force_capture(hash)}
|
87
87
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
88
88
|
end
|
89
89
|
|
90
|
-
def
|
90
|
+
def test_all_choices
|
91
91
|
hash = {
|
92
92
|
'merchantId' => '101',
|
93
93
|
'version'=>'8.8',
|
@@ -114,7 +114,7 @@ class TestForceCapture < Test::Unit::TestCase
|
|
114
114
|
'cardValidationNum'=>'555',
|
115
115
|
'type'=>'VI'
|
116
116
|
}}
|
117
|
-
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.
|
117
|
+
exception = assert_raise(RuntimeError){LitleOnlineRequest.new.force_capture(hash)}
|
118
118
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
119
119
|
end
|
120
120
|
|
data/test/unit/test_sale.rb
CHANGED
@@ -27,7 +27,7 @@ require 'test/unit'
|
|
27
27
|
|
28
28
|
class TestSale < Test::Unit::TestCase
|
29
29
|
|
30
|
-
def
|
30
|
+
def test_no_order_id
|
31
31
|
hash = {
|
32
32
|
'merchantId' => '101',
|
33
33
|
'version'=>'8.8',
|
@@ -44,7 +44,7 @@ class TestSale < Test::Unit::TestCase
|
|
44
44
|
assert_match /Missing Required Field: orderId!!!!/, exception.message
|
45
45
|
end
|
46
46
|
|
47
|
-
def
|
47
|
+
def test_no_amount
|
48
48
|
hash = {
|
49
49
|
'merchantId' => '101',
|
50
50
|
'version'=>'8.8',
|
@@ -61,7 +61,7 @@ class TestSale < Test::Unit::TestCase
|
|
61
61
|
assert_match /Missing Required Field: amount!!!!/, exception.message
|
62
62
|
end
|
63
63
|
|
64
|
-
def
|
64
|
+
def test_no_order_source
|
65
65
|
hash = {
|
66
66
|
'merchantId' => '101',
|
67
67
|
'version'=>'8.8',
|
@@ -78,7 +78,7 @@ class TestSale < Test::Unit::TestCase
|
|
78
78
|
assert_match /Missing Required Field: orderSource!!!!/, exception.message
|
79
79
|
end
|
80
80
|
|
81
|
-
def
|
81
|
+
def test_both_choices_fraud_check_and_card_holder
|
82
82
|
hash = {
|
83
83
|
'merchantId' => '101',
|
84
84
|
'version'=>'8.8',
|
@@ -99,7 +99,7 @@ class TestSale < Test::Unit::TestCase
|
|
99
99
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
100
100
|
end
|
101
101
|
|
102
|
-
def
|
102
|
+
def test_both_choices_card_and_paypal
|
103
103
|
hash = {
|
104
104
|
'merchantId' => '101',
|
105
105
|
'version'=>'8.8',
|
@@ -125,7 +125,7 @@ class TestSale < Test::Unit::TestCase
|
|
125
125
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
126
126
|
end
|
127
127
|
|
128
|
-
def
|
128
|
+
def test_both_choices_card_and_token
|
129
129
|
hash = {
|
130
130
|
'merchantId' => '101',
|
131
131
|
'version'=>'8.8',
|
@@ -152,7 +152,7 @@ class TestSale < Test::Unit::TestCase
|
|
152
152
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
153
153
|
end
|
154
154
|
|
155
|
-
def
|
155
|
+
def test_both_choices_card_and_paypage
|
156
156
|
hash = {
|
157
157
|
'merchantId' => '101',
|
158
158
|
'version'=>'8.8',
|
@@ -179,7 +179,7 @@ class TestSale < Test::Unit::TestCase
|
|
179
179
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
180
180
|
end
|
181
181
|
|
182
|
-
def
|
182
|
+
def test_three_choices_card_and_paypage_and_paypal
|
183
183
|
hash = {
|
184
184
|
'merchantId' => '101',
|
185
185
|
'version'=>'8.8',
|
@@ -210,7 +210,7 @@ class TestSale < Test::Unit::TestCase
|
|
210
210
|
assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
|
211
211
|
end
|
212
212
|
|
213
|
-
def
|
213
|
+
def test_all_choices_card_and_paypage_and_paypal_and_token
|
214
214
|
hash = {
|
215
215
|
'merchantId' => '101',
|
216
216
|
'version'=>'8.8',
|