LitleOnline 8.12.0 → 8.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/CHANGELOG +28 -0
  2. data/Rakefile +2 -3
  3. data/lib/Communications.rb +14 -12
  4. data/lib/LitleOnline.rb +11 -2
  5. data/lib/LitleOnlineRequest.rb +435 -284
  6. data/lib/LitleXmlMapper.rb +1 -2
  7. data/lib/XMLFields.rb +900 -307
  8. data/lib/cacert.pem +3331 -0
  9. data/test/certification/certTest2_authenhanced.rb +7 -7
  10. data/test/certification/certTest5_token.rb +8 -8
  11. data/test/functional/test_auth.rb +106 -3
  12. data/test/functional/test_authReversal.rb +5 -6
  13. data/test/functional/test_capture.rb +12 -1
  14. data/test/functional/test_captureGivenAuth.rb +25 -5
  15. data/test/functional/test_credit.rb +1 -1
  16. data/test/functional/test_echeckRedeposit.rb +34 -0
  17. data/test/functional/test_echeckVerification.rb +33 -0
  18. data/test/functional/test_forceCapture.rb +35 -0
  19. data/test/functional/test_sale.rb +45 -13
  20. data/test/functional/test_xmlfields.rb +197 -10
  21. data/test/functional/ts_all.rb +2 -0
  22. data/test/unit/test_LitleOnlineRequest.rb +2 -59
  23. data/test/unit/test_auth.rb +2 -51
  24. data/test/unit/test_authReversal.rb +10 -5
  25. data/test/unit/test_capture.rb +5 -7
  26. data/test/unit/test_captureGivenAuth.rb +0 -19
  27. data/test/unit/test_credit.rb +1 -0
  28. data/test/unit/test_echeckCredit.rb +0 -2
  29. data/test/unit/test_echeckRedeposit.rb +0 -34
  30. data/test/unit/test_echeckSale.rb +0 -1
  31. data/test/unit/test_echeckVerification.rb +0 -33
  32. data/test/unit/test_forceCapture.rb +0 -35
  33. data/test/unit/test_sale.rb +20 -51
  34. data/test/unit/test_xmlfields.rb +44 -84
  35. data/test/unit/ts_unit.rb +1 -1
  36. metadata +13 -26
  37. data/index.html +0 -176
  38. data/index.html.1 +0 -176
  39. data/lib/Checker.rb +0 -56
  40. data/test/unit/test_Checker.rb +0 -58
@@ -24,25 +24,10 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
+ require 'mocha'
27
28
 
28
29
  #test Authorization Transaction
29
30
  class TestAuth < Test::Unit::TestCase
30
- def test_no_order_id
31
- hash = {
32
- 'merchantId' => '101',
33
- 'version'=>'8.8',
34
- 'reportGroup'=>'Planets',
35
- 'amount'=>'106',
36
- 'orderSource'=>'ecommerce',
37
- 'card'=>{
38
- 'type'=>'VI',
39
- 'number' =>'4100000000000001',
40
- 'expDate' =>'1210'
41
- }}
42
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
43
- assert_match /Missing Required Field: orderId!!!!/, exception.message
44
- end
45
-
46
31
  def test_success_re_auth
47
32
  hash = {
48
33
  'merchantId' => '101',
@@ -51,44 +36,10 @@ class TestAuth < Test::Unit::TestCase
51
36
  'litleTxnId'=>'123456'
52
37
  }
53
38
 
54
- XMLObject.expects(:new)
55
- Communications.expects(:http_post).with(regexp_matches(/.*litleTxnId.*/m),kind_of(Hash))
39
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>123456<\/litleTxnId>.*/m), is_a(Hash))
56
40
  LitleOnlineRequest.new.authorization(hash)
57
41
  end
58
42
 
59
- def test_no_amount
60
- hash = {
61
- 'merchantId' => '101',
62
- 'version'=>'8.8',
63
- 'reportGroup'=>'Planets',
64
- # 'litleTxnId'=>'123456',
65
- 'orderId'=>'12344',
66
- 'orderSource'=>'ecommerce',
67
- 'card'=>{
68
- 'type'=>'VI',
69
- 'number' =>'4100000000000001',
70
- 'expDate' =>'1210'
71
- }}
72
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
73
- assert_match /Missing Required Field: amount!!!!/, exception.message
74
- end
75
-
76
- def test_no_order_source
77
- hash = {
78
- 'merchantId' => '101',
79
- 'version'=>'8.8',
80
- 'reportGroup'=>'Planets',
81
- # 'litleTxnId'=>'123456',
82
- 'orderId'=>'12344',
83
- 'amount'=>'106',
84
- 'card'=>{
85
- 'type'=>'VI',
86
- 'number' =>'4100000000000001',
87
- 'expDate' =>'1210'
88
- }}
89
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
90
- assert_match /Missing Required Field: orderSource!!!!/, exception.message
91
- end
92
43
 
93
44
  def test_both_choices_card_and_paypal
94
45
  hash = {
@@ -24,18 +24,23 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
+ require 'mocha'
27
28
 
28
29
  class TestAuthReversal < Test::Unit::TestCase
29
- def test_no_litle_txn_id
30
+ def test_invalid_field
30
31
  hash = {
31
32
  'merchantId' => '101',
32
33
  'version'=>'8.8',
33
- 'reportGroup'=>'12345678',
34
+ 'litleTxnId'=>'12345678000',
35
+ 'NonexistentField'=>'none',
36
+ 'payPalNotes'=>'Notes',
34
37
  'amount'=>'106',
35
- 'payPalNotes'=>'Notes'
38
+ 'reportGroup'=>'Planets',
36
39
  }
37
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.auth_reversal(hash)}
38
- assert_match /Missing Required Field: litleTxnId!!!!/, exception.message
40
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>12345678000<\/litleTxnId>.*/m), is_a(Hash))
41
+ LitleOnlineRequest.new.auth_reversal(hash)
42
+
39
43
  end
44
+
40
45
 
41
46
  end
@@ -26,15 +26,13 @@ require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
27
 
28
28
  class Test_capture < Test::Unit::TestCase
29
- def test_no_txn_id
29
+ def test_success_capture
30
30
  hash = {
31
- 'merchantId' => '101',
32
- 'version'=>'8.8',
33
- 'reportGroup'=>'Planets',
34
- 'amount'=>'106',
31
+ 'litleTxnId'=>'123456'
35
32
  }
36
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.capture(hash)}
37
- assert_match /Missing Required Field: litleTxnId!!!!/, exception.message
33
+
34
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>123456<\/litleTxnId>.*/m), is_a(Hash))
35
+ LitleOnlineRequest.new.capture(hash)
38
36
  end
39
37
  end
40
38
 
@@ -26,25 +26,6 @@ require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
27
 
28
28
  class TestcaptureGivenAuth < Test::Unit::TestCase
29
- def test_no_amount
30
- hash = {
31
- 'merchantId' => '101',
32
- 'version'=>'8.8',
33
- 'reportGroup'=>'Planets',
34
- 'orderId'=>'12344',
35
- 'authInformation' => {
36
- 'authDate'=>'2002-10-09','authCode'=>'543216',
37
- 'authAmount'=>'12345'
38
- },
39
- 'orderSource'=>'ecommerce',
40
- 'card'=>{
41
- 'type'=>'VI',
42
- 'number' =>'4100000000000001',
43
- 'expDate' =>'1210'
44
- }}
45
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.capture_given_auth(hash)}
46
- assert_match /Missing Required Field: amount!!!!/, exception.message
47
- end
48
29
 
49
30
  def test_both_choices_card_and_token
50
31
  hash = {
@@ -24,6 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
+ require 'mocha'
27
28
 
28
29
  class TestCredit < Test::Unit::TestCase
29
30
  def test_both_choices_card_and_paypal
@@ -26,8 +26,6 @@ require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
27
 
28
28
  class Test_echeckCredit < Test::Unit::TestCase
29
-
30
-
31
29
  def test_echeck_credit_with_both
32
30
  hash = {
33
31
  'merchantId' => '101',
@@ -26,40 +26,6 @@ require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
27
 
28
28
  class Test_echeckRedeposit < Test::Unit::TestCase
29
- def test_no_txn_id
30
- hash = {
31
- 'merchantId' => '101',
32
- 'version'=>'8.8',
33
- 'reportGroup'=>'Planets',
34
- }
35
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_redeposit(hash)}
36
- assert_match /Missing Required Field: litleTxnId!!!!/, exception.message
37
- end
38
-
39
- def test_echeck_redeposit_withecheckmissingfield
40
- hash = {
41
- 'merchantId' => '101',
42
- 'version'=>'8.8',
43
- 'reportGroup'=>'Planets',
44
- 'litleTxnId'=>'123456',
45
- 'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','checkNum'=>'123455'}
46
- }
47
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_redeposit(hash)}
48
- assert_match /Missing Required Field: routingNum!!!!/, exception.message
49
- end
50
-
51
- def test_echeck_redeposit_with_echeck_token_missing_field
52
- hash = {
53
- 'merchantId' => '101',
54
- 'version'=>'8.8',
55
- 'reportGroup'=>'Planets',
56
- 'litleTxnId'=>'123456',
57
- 'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','checkNum'=>'123455'}
58
- }
59
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_redeposit(hash)}
60
- assert_match /Missing Required Field: routingNum!!!!/, exception.message
61
- end
62
-
63
29
  def test_echeck_redeposit_with_both
64
30
  hash = {
65
31
  'merchantId' => '101',
@@ -27,7 +27,6 @@ require 'test/unit'
27
27
 
28
28
  class Test_echeckSale < Test::Unit::TestCase
29
29
 
30
-
31
30
  def test_echeck_sale_with_both
32
31
  hash = {
33
32
  'merchantId' => '101',
@@ -26,39 +26,6 @@ require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
27
 
28
28
  class Test_echeckVerification < Test::Unit::TestCase
29
- def test_no_amount
30
- hash = {
31
- 'merchantId' => '101',
32
- 'version'=>'8.8',
33
- 'reportGroup'=>'Planets',
34
- 'orderId'=>'12345'
35
- }
36
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
37
- assert_match /Missing Required Field: amount!!!!/, exception.message
38
- end
39
-
40
- def test_no_order_id
41
- hash = {
42
- 'merchantId' => '101',
43
- 'version'=>'8.8',
44
- 'reportGroup'=>'Planets',
45
- }
46
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
47
- assert_match /Missing Required Field: orderId!!!!/, exception.message
48
- end
49
-
50
- def test_no_order_source
51
- hash = {
52
- 'merchantId' => '101',
53
- 'version'=>'8.8',
54
- 'reportGroup'=>'Planets',
55
- 'amount'=>'123456',
56
- 'orderId'=>'12345'
57
- }
58
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
59
- assert_match /Missing Required Field: orderSource!!!/, exception.message
60
- end
61
-
62
29
  def test_echeck_verification_with_both
63
30
  hash = {
64
31
  'merchantId' => '101',
@@ -26,41 +26,6 @@ require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
27
 
28
28
  class TestForceCapture < Test::Unit::TestCase
29
- def test_no_order_id
30
- hash = {
31
- 'merchantId' => '101',
32
- 'version'=>'8.8',
33
- 'reportGroup'=>'Planets',
34
- 'litleTxnId'=>'123456',
35
- 'amount'=>'106',
36
- 'orderSource'=>'ecommerce',
37
- 'token'=> {
38
- 'litleToken'=>'123456789101112',
39
- 'expDate'=>'1210',
40
- 'cardValidationNum'=>'555',
41
- 'type'=>'VI'
42
- }}
43
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.force_capture(hash)}
44
- assert_match /Missing Required Field: orderId!!!!/, exception.message
45
- end
46
-
47
- def test_no_order_source
48
- hash = {
49
- 'merchantId' => '101',
50
- 'version'=>'8.8',
51
- 'reportGroup'=>'Planets',
52
- 'litleTxnId'=>'123456',
53
- 'orderId'=>'12344',
54
- 'amount'=>'106',
55
- 'card'=>{
56
- 'type'=>'VI',
57
- 'number' =>'4100000000000001',
58
- 'expDate' =>'1210'
59
- }}
60
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.force_capture(hash)}
61
- assert_match /Missing Required Field: orderSource!!!!/, exception.message
62
- end
63
-
64
29
  def test_both_choices_card_and_token
65
30
  hash = {
66
31
  'merchantId' => '101',
@@ -24,60 +24,10 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
+ require 'mocha'
27
28
 
28
29
  class TestSale < Test::Unit::TestCase
29
30
 
30
- def test_no_order_id
31
- hash = {
32
- 'merchantId' => '101',
33
- 'version'=>'8.8',
34
- 'reportGroup'=>'Planets',
35
- 'litleTxnId'=>'123456',
36
- 'amount'=>'106',
37
- 'orderSource'=>'ecommerce',
38
- 'card'=>{
39
- 'type'=>'VI',
40
- 'number' =>'4100000000000002',
41
- 'expDate' =>'1210'
42
- }}
43
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
44
- assert_match /Missing Required Field: orderId!!!!/, exception.message
45
- end
46
-
47
- def test_no_amount
48
- hash = {
49
- 'merchantId' => '101',
50
- 'version'=>'8.8',
51
- 'reportGroup'=>'Planets',
52
- 'litleTxnId'=>'123456',
53
- 'orderId'=>'12344',
54
- 'orderSource'=>'ecommerce',
55
- 'card'=>{
56
- 'type'=>'VI',
57
- 'number' =>'4100000000000002',
58
- 'expDate' =>'1210'
59
- }}
60
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
61
- assert_match /Missing Required Field: amount!!!!/, exception.message
62
- end
63
-
64
- def test_no_order_source
65
- hash = {
66
- 'merchantId' => '101',
67
- 'version'=>'8.8',
68
- 'reportGroup'=>'Planets',
69
- 'litleTxnId'=>'123456',
70
- 'orderId'=>'12344',
71
- 'amount'=>'106',
72
- 'card'=>{
73
- 'type'=>'VI',
74
- 'number' =>'4100000000000002',
75
- 'expDate' =>'1210'
76
- }}
77
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
78
- assert_match /Missing Required Field: orderSource!!!!/, exception.message
79
- end
80
-
81
31
  def test_both_choices_fraud_check_and_card_holder
82
32
  hash = {
83
33
  'merchantId' => '101',
@@ -263,5 +213,24 @@ class TestSale < Test::Unit::TestCase
263
213
  LitleOnlineRequest.new.sale(hash)
264
214
  end
265
215
 
216
+ def test_invalid_embedded_field_values
217
+ #becasue there are sub fields under fraud check that are not specified
218
+ hash = {
219
+ 'merchantId' => '101',
220
+ 'version'=>'8.8',
221
+ 'reportGroup'=>'Planets',
222
+ 'litleTxnId'=>'123456',
223
+ 'orderId'=>'12344',
224
+ 'amount'=>'106',
225
+ 'orderSource'=>'ecommerce',
226
+ 'fraudCheck'=>'one',
227
+ 'cardholderAuthentication'=>'two',
228
+ 'card'=>{
229
+ 'type'=>'VI',
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
234
+ end
266
235
  end
267
236
 
@@ -24,28 +24,9 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require 'lib/LitleOnline'
26
26
  require 'test/unit'
27
+ require 'mocha'
27
28
 
28
29
  class TestXmlfields < Test::Unit::TestCase
29
-
30
- def test_cardbothtypeandtrack
31
- hash = {
32
- 'merchantId' => '101',
33
- 'version'=>'8.8',
34
- 'reportGroup'=>'Planets',
35
- 'litleTxnId'=>'123456',
36
- 'orderId'=>'12344',
37
- 'amount'=>'106',
38
- 'orderSource'=>'ecommerce',
39
- 'card'=>{
40
- 'type'=>'VI',
41
- 'track'=>'1234',
42
- 'number' =>'4100000000000001',
43
- 'expDate' =>'1210'
44
- }}
45
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
46
- assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
47
- end
48
-
49
30
  def test_custom_billing_with_two_choices
50
31
  hash = {
51
32
  'merchantId' => '101',
@@ -84,88 +65,67 @@ class TestXmlfields < Test::Unit::TestCase
84
65
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
85
66
  end
86
67
 
87
- def test_paypal_missing_payer_id
68
+ def test_line_item_data
88
69
  hash = {
89
70
  'merchantId' => '101',
90
71
  'version'=>'8.8',
91
72
  'reportGroup'=>'Planets',
92
- 'orderId'=>'12344',
93
- 'amount'=>'106',
94
- 'orderSource'=>'ecommerce',
95
- 'paypal'=>{
96
- 'token'=>'1234',
97
- 'transactionId'=>'123456'
98
- }}
99
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
100
- assert_match /Missing Required Field: payerId!!!!/, exception.message
101
- end
73
+ 'enhancedData'=>
74
+ {
75
+ 'lineItemData'=>[
76
+ {'itemSequenceNumber'=>'1', 'itemDescription'=>'desc1'},
77
+ {'itemSequenceNumber'=>'2', 'itemDescription'=>'desc2'}
78
+ ]
79
+ }
80
+ }
102
81
 
103
- def test_paypal_missing_transaction_id
104
- hash = {
105
- 'merchantId' => '101',
106
- 'version'=>'8.8',
107
- 'reportGroup'=>'Planets',
108
- 'orderId'=>'12344',
109
- 'amount'=>'106',
110
- 'orderSource'=>'ecommerce',
111
- 'paypal'=>{
112
- 'token'=>'1234',
113
- 'payerId'=>'123456'
114
- }}
115
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
116
- assert_match /Missing Required Field: transactionId!!!!/, exception.message
82
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<enhancedData>.*<lineItemData>.*<itemSequenceNumber>1<\/itemSequenceNumber>.*<itemDescription>desc1<\/itemDescription>.*<\/lineItemData>.*<lineItemData>.*<itemSequenceNumber>2<\/itemSequenceNumber>.*<itemDescription>desc2<\/itemDescription>.*<\/lineItemData>.*<\/enhancedData>.*/m), is_a(Hash))
83
+ LitleOnlineRequest.new.authorization(hash)
117
84
  end
118
85
 
119
- def test_pos_without_capability
86
+ def test_detail_tax
120
87
  hash = {
121
88
  'merchantId' => '101',
122
89
  'version'=>'8.8',
123
90
  'reportGroup'=>'Planets',
124
- 'orderId'=>'12344',
125
- 'amount'=>'106',
126
- 'orderSource'=>'ecommerce',
127
- 'pos'=>{'entryMode'=>'track1','cardholderId'=>'pin'},
128
- 'card'=>{
129
- 'type'=>'VI',
130
- 'number' =>'4100000000000001',
131
- 'expDate' =>'1210'
132
- }}
133
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
134
- assert_match /Missing Required Field: capability!!!!/, exception.message
135
- end
91
+ 'enhancedData'=>
92
+ {
93
+ 'detailTax'=>[
94
+ {'taxIncludedInTotal'=>'true', 'taxTypeIdentifier'=>'00'},
95
+ {'taxIncludedInTotal'=>'false', 'taxTypeIdentifier'=>'01'}
96
+ ]
97
+ }
98
+ }
136
99
 
137
- def test_token_missing_token
138
- hash = {
139
- 'merchantId' => '101',
140
- 'version'=>'8.8',
141
- 'reportGroup'=>'Planets',
142
- 'orderId'=>'12344',
143
- 'amount'=>'106',
144
- 'orderSource'=>'ecommerce',
145
- 'token'=> {
146
- 'expDate'=>'1210',
147
- 'cardValidationNum'=>'555',
148
- 'type'=>'VI'
149
- }}
150
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
151
- assert_match /Missing Required Field: litleToken!!!!/, exception.message
100
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<enhancedData>.*<detailTax>.*<taxIncludedInTotal>true<\/taxIncludedInTotal>.*<taxTypeIdentifier>00<\/taxTypeIdentifier>.*<\/detailTax>.*<detailTax>.*<taxIncludedInTotal>false<\/taxIncludedInTotal>.*<taxTypeIdentifier>01<\/taxTypeIdentifier>.*<\/detailTax>.*<\/enhancedData>.*/m), is_a(Hash))
101
+ LitleOnlineRequest.new.authorization(hash)
152
102
  end
153
103
 
154
- def test_paypage_missing_id
104
+ def test_detail_tax_in_lineItem
155
105
  hash = {
156
106
  'merchantId' => '101',
157
107
  'version'=>'8.8',
158
108
  'reportGroup'=>'Planets',
159
- 'orderId'=>'12344',
160
- 'amount'=>'106',
161
- 'orderSource'=>'ecommerce',
162
- 'paypage'=> {
163
- 'expDate'=>'1210',
164
- 'cardValidationNum'=>'555',
165
- 'type'=>'VI'
166
- }}
167
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
168
- assert_match /Missing Required Field: paypageRegistrationId!!!!/, exception.message
109
+ 'enhancedData'=>
110
+ {
111
+ 'lineItemData'=>[
112
+ {'itemSequenceNumber'=>'1', 'itemDescription'=>'desc1','detailTax'=>[
113
+ {'taxAmount'=>'1'},
114
+ {'taxAmount'=>'2'}]
115
+ },
116
+ {'itemSequenceNumber'=>'2', 'itemDescription'=>'desc2','detailTax'=>[
117
+ {'taxAmount'=>'3'},
118
+ {'taxAmount'=>'4'}]
119
+ }],
120
+ 'detailTax'=>[
121
+ {'taxAmount'=>'5'},
122
+ {'taxAmount'=>'6'}
123
+ ]}
124
+ }
125
+
126
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<enhancedData>.*<detailTax>.*<taxAmount>5<\/taxAmount>.*<\/detailTax>.*<detailTax>.*<taxAmount>6<\/taxAmount>.*<\/detailTax>.*<lineItemData>.*<itemSequenceNumber>1<\/itemSequenceNumber>.*<itemDescription>desc1<\/itemDescription>.*<detailTax>.*<taxAmount>1<\/taxAmount>.*<\/detailTax>.*<detailTax>.*<taxAmount>2<\/taxAmount>.*<\/detailTax>.*<\/lineItemData>.*<lineItemData>.*<itemSequenceNumber>2<\/itemSequenceNumber>.*<itemDescription>desc2<\/itemDescription>.*<detailTax>.*<taxAmount>3<\/taxAmount>.*<\/detailTax>.*<detailTax>.*<taxAmount>4<\/taxAmount>.*<\/detailTax>.*<\/lineItemData>.*<\/enhancedData>.*/m), is_a(Hash))
127
+ LitleOnlineRequest.new.authorization(hash)
169
128
  end
129
+
170
130
  end
171
131