LitleOnline 8.25.1 → 8.29.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +10 -2
  3. data/README.md +2 -22
  4. data/Rakefile +2 -2
  5. data/accurev_plugin.log +1037 -0
  6. data/bin/sample_batch_driver.rb +1 -0
  7. data/bin/sample_driver.rb +4 -4
  8. data/lib/Configuration.rb +2 -2
  9. data/lib/EnvironmentVariables.rb +2 -1
  10. data/lib/LitleBatchRequest.rb +16 -3
  11. data/lib/LitleOnlineRequest.rb +2 -2
  12. data/lib/LitleRequest.rb +8 -4
  13. data/lib/LitleTransaction.rb +10 -6
  14. data/lib/XMLFields.rb +203 -159
  15. data/samples/Auth/LitleAuthReversalTransaction.rb +15 -0
  16. data/samples/Auth/LitleAuthorizationTransaction.rb +31 -0
  17. data/samples/Auth/LitlePaymentFullLifeCycle.rb +47 -0
  18. data/samples/Batch/AccountUpdate.rb +64 -0
  19. data/samples/Batch/SampleBatchDriver.rb +94 -0
  20. data/samples/Capture/LitleCaptureGivenAuthTransaction.rb +30 -0
  21. data/samples/Capture/LitleCaptureTransaction.rb +14 -0
  22. data/samples/Capture/LitleForceCaptureTransaction.rb +26 -0
  23. data/samples/Capture/LitlePartialCapture.rb +16 -0
  24. data/samples/Credit/LitleCreditTransaction.rb +16 -0
  25. data/samples/Credit/LitleRefundTransaction.rb +29 -0
  26. data/samples/Other/LitleAvsTransaction.rb +34 -0
  27. data/samples/Other/LitleVoidTransaction.rb +18 -0
  28. data/samples/Paypage/FullPaypageLifeCycle.rb +74 -0
  29. data/samples/Run_all.rb +17 -0
  30. data/samples/Sale/LitleSaleTransaction.rb +29 -0
  31. data/samples/Sale/SampleSaleTransaction.rb +24 -0
  32. data/test/functional/test_auth.rb +54 -30
  33. data/test/functional/test_captureGivenAuth.rb +41 -18
  34. data/test/functional/test_credit.rb +17 -0
  35. data/test/functional/test_echeckCredit.rb +23 -6
  36. data/test/functional/test_echeckSale.rb +27 -10
  37. data/test/functional/test_forceCapture.rb +19 -0
  38. data/test/functional/test_sale.rb +44 -19
  39. data/test/functional/test_token.rb +27 -5
  40. data/test/unit/test_LitleOnlineRequest.rb +2 -2
  41. data/test/unit/test_activate.rb +1 -1
  42. data/test/unit/test_activateReversal.rb +1 -1
  43. data/test/unit/test_auth.rb +104 -41
  44. data/test/unit/test_balanceInquiry.rb +1 -1
  45. data/test/unit/test_cancelSubscription.rb +1 -1
  46. data/test/unit/test_captureGivenAuth.rb +31 -22
  47. data/test/unit/test_createPlan.rb +1 -1
  48. data/test/unit/test_credit.rb +61 -39
  49. data/test/unit/test_deactivate.rb +1 -1
  50. data/test/unit/test_deactivateReversal.rb +1 -1
  51. data/test/unit/test_depositReversal.rb +1 -1
  52. data/test/unit/test_echeckCredit.rb +18 -5
  53. data/test/unit/test_echeckRedeposit.rb +1 -1
  54. data/test/unit/test_echeckSale.rb +14 -1
  55. data/test/unit/test_echeckVerification.rb +1 -1
  56. data/test/unit/test_echeckVoid.rb +1 -1
  57. data/test/unit/test_forceCapture.rb +11 -0
  58. data/test/unit/test_load.rb +1 -1
  59. data/test/unit/test_loadReversal.rb +1 -1
  60. data/test/unit/test_refundReversal.rb +1 -1
  61. data/test/unit/test_sale.rb +113 -55
  62. data/test/unit/test_token.rb +53 -7
  63. data/test/unit/test_unload.rb +1 -1
  64. data/test/unit/test_unloadReversal.rb +1 -1
  65. data/test/unit/test_updateCardValidationNumOnToken.rb +1 -1
  66. data/test/unit/test_updatePlan.rb +1 -1
  67. data/test/unit/test_xmlfields.rb +2 -2
  68. metadata +22 -4
@@ -24,7 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
-
27
+ require 'mocha/setup'
28
28
  module LitleOnline
29
29
  class TestActivate < Test::Unit::TestCase
30
30
 
@@ -24,7 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
-
27
+ require 'mocha/setup'
28
28
  module LitleOnline
29
29
  class TestActivateReversal < Test::Unit::TestCase
30
30
 
@@ -22,15 +22,13 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
22
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
23
  OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
- require File.expand_path("../../../lib/LitleOnline",__FILE__)
25
+ require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
27
  require 'mocha/setup'
28
28
 
29
29
  #test Authorization Transaction
30
30
  module LitleOnline
31
-
32
31
  class TestAuth < Test::Unit::TestCase
33
-
34
32
  def test_success_re_auth
35
33
  hash = {
36
34
  'merchantId' => '101',
@@ -38,12 +36,65 @@ module LitleOnline
38
36
  'reportGroup'=>'Planets',
39
37
  'litleTxnId'=>'123456'
40
38
  }
41
-
39
+
42
40
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>123456<\/litleTxnId>.*/m), is_a(Hash))
43
41
  LitleOnlineRequest.new.authorization(hash)
44
42
  end
45
-
46
-
43
+
44
+ def test_success_applepay
45
+ hash = {
46
+ 'merchantId' => '101',
47
+ 'version'=>'8.8',
48
+ 'reportGroup'=>'Planets',
49
+ 'orderId'=>'12344',
50
+ 'amount'=>'106',
51
+ 'orderSource'=>'ecommerce',
52
+ 'applepay'=>{
53
+ 'data'=>'user',
54
+ 'header'=>{
55
+ 'applicationData'=>'454657413164',
56
+ 'ephemeralPublicKey'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
57
+ 'publicKeyHash'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
58
+ 'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
59
+ },
60
+ 'signature' =>'sign',
61
+ 'version' =>'1'
62
+ }
63
+ }
64
+
65
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*?<litleOnlineRequest.*?<authorization.*?<applepay>.*?<data>user<\/data>.*?<\/applepay>.*?<\/authorization>.*?/m), is_a(Hash))
66
+ LitleOnlineRequest.new.authorization(hash)
67
+ end
68
+
69
+ def test_both_choices_card_and_applepay
70
+ hash = {
71
+ 'merchantId' => '101',
72
+ 'version'=>'8.8',
73
+ 'reportGroup'=>'Planets',
74
+ 'orderId'=>'12344',
75
+ 'amount'=>'106',
76
+ 'orderSource'=>'ecommerce',
77
+ 'card'=>{
78
+ 'type'=>'VI',
79
+ 'number' =>'4100000000000001',
80
+ 'expDate' =>'1210'
81
+ },
82
+ 'applepay'=>{
83
+ 'data'=>'user',
84
+ 'header'=>{
85
+ 'applicationData'=>'454657413164',
86
+ 'ephemeralPublicKey'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
87
+ 'publicKeyHash'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
88
+ 'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
89
+ },
90
+ 'signature' =>'sign',
91
+ 'version' =>'1'
92
+ }}
93
+
94
+ exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
95
+ assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
96
+ end
97
+
47
98
  def test_both_choices_card_and_paypal
48
99
  hash = {
49
100
  'merchantId' => '101',
@@ -62,11 +113,11 @@ module LitleOnline
62
113
  'token'=>'1234',
63
114
  'transactionId'=>'123456'
64
115
  }}
65
-
116
+
66
117
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
67
118
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
68
119
  end
69
-
120
+
70
121
  def test_three_choices_card_and_paypage_and_paypal
71
122
  hash = {
72
123
  'merchantId' => '101',
@@ -93,7 +144,7 @@ module LitleOnline
93
144
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
94
145
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
95
146
  end
96
-
147
+
97
148
  def test_all_choices_card_and_paypage_and_paypal_and_token
98
149
  hash = {
99
150
  'merchantId' => '101',
@@ -125,11 +176,11 @@ module LitleOnline
125
176
  'cardValidationNum'=>'555',
126
177
  'type'=>'VI'
127
178
  }}
128
-
179
+
129
180
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
130
181
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
131
182
  end
132
-
183
+
133
184
  def test_merchant_data_auth
134
185
  hash = {
135
186
  'merchantId' => '101',
@@ -139,15 +190,15 @@ module LitleOnline
139
190
  'orderSource'=>'ecommerce',
140
191
  'reportGroup'=>'Planets',
141
192
  'merchantData'=> {
142
- 'campaign'=>'foo'
193
+ 'campaign'=>'foo'
143
194
  }
144
195
  }
145
-
196
+
146
197
  XMLObject.expects(:new)
147
198
  Communications.expects(:http_post).with(regexp_matches(/.*<merchantData>.*?<campaign>foo<\/campaign>.*?<\/merchantData>.*/m),kind_of(Hash))
148
199
  LitleOnlineRequest.new.authorization(hash)
149
200
  end
150
-
201
+
151
202
  def test_fraud_filter_override
152
203
  hash = {
153
204
  'merchantId' => '101',
@@ -158,12 +209,12 @@ module LitleOnline
158
209
  'reportGroup'=>'Planets',
159
210
  'fraudFilterOverride'=> 'true'
160
211
  }
161
-
212
+
162
213
  XMLObject.expects(:new)
163
214
  Communications.expects(:http_post).with(regexp_matches(/.*<authorization.*?<fraudFilterOverride>true<\/fraudFilterOverride>.*?<\/authorization>.*/m),kind_of(Hash))
164
215
  LitleOnlineRequest.new.authorization(hash)
165
216
  end
166
-
217
+
167
218
  def test_pos_without_capability
168
219
  hash = {
169
220
  'merchantId' => '101',
@@ -197,7 +248,7 @@ module LitleOnline
197
248
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
198
249
  assert_match /If paypal is specified, it must have a payerId/, exception.message
199
250
  end
200
-
251
+
201
252
  def test_paypal_missing_transaction_id
202
253
  hash = {
203
254
  'merchantId' => '101',
@@ -231,7 +282,7 @@ module LitleOnline
231
282
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.authorization(hash)}
232
283
  assert_match /If pos is specified, it must have a entryMode/, exception.message
233
284
  end
234
-
285
+
235
286
  def test_auth_override_username
236
287
  hash = {
237
288
  'merchantId' => '101',
@@ -244,7 +295,7 @@ module LitleOnline
244
295
  'reportGroup'=>'Planets',
245
296
  'fraudFilterOverride'=> 'true'
246
297
  }
247
-
298
+
248
299
  XMLObject.expects(:new)
249
300
  Communications.expects(:http_post).with(regexp_matches(/.*<authentication.*?<user>UNIT<\/user>.*?<\/authentication>.*/m),kind_of(Hash))
250
301
  LitleOnlineRequest.new.authorization(hash)
@@ -262,26 +313,26 @@ module LitleOnline
262
313
  'reportGroup'=>'Planets',
263
314
  'fraudFilterOverride'=> 'true'
264
315
  }
265
-
316
+
266
317
  XMLObject.expects(:new)
267
318
  Communications.expects(:http_post).with(regexp_matches(/.*<authentication.*?<password>TEST<\/password>.*?<\/authentication>.*/m),kind_of(Hash))
268
319
  LitleOnlineRequest.new.authorization(hash)
269
320
  end
270
-
321
+
271
322
  def test_logged_in_user
272
323
  hash = {
273
- 'merchantSdk' => 'Ruby;8.14.0',
324
+ 'merchantSdk' => 'Ruby;8.14.0',
274
325
  'merchantId' => '101',
275
326
  'version'=>'8.8',
276
327
  'reportGroup'=>'Planets',
277
328
  'litleTxnId'=>'123456',
278
329
  'loggedInUser'=>'gdake'
279
330
  }
280
-
331
+
281
332
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
282
333
  LitleOnlineRequest.new.authorization(hash)
283
334
  end
284
-
335
+
285
336
  def test_surcharge_amount
286
337
  hash = {
287
338
  'orderId' => '12344',
@@ -293,7 +344,19 @@ module LitleOnline
293
344
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
294
345
  LitleOnlineRequest.new.authorization(hash)
295
346
  end
296
-
347
+
348
+ def test_secondary_amount
349
+ hash = {
350
+ 'orderId' => '12344',
351
+ 'amount' => '2',
352
+ 'secondaryAmount' => '1',
353
+ 'orderSource' => 'ecommerce',
354
+ 'reportGroup' => 'Planets'
355
+ }
356
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><secondaryAmount>1<\/secondaryAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
357
+ LitleOnlineRequest.new.authorization(hash)
358
+ end
359
+
297
360
  def test_surcharge_amount_optional
298
361
  hash = {
299
362
  'orderId' => '12344',
@@ -304,17 +367,17 @@ module LitleOnline
304
367
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
305
368
  LitleOnlineRequest.new.authorization(hash)
306
369
  end
307
-
370
+
308
371
  def test_method_of_payment_allows_giftcard
309
372
  hash = {
310
373
  'orderId' => '12344',
311
374
  'amount' => '2',
312
375
  'orderSource' => 'ecommerce',
313
376
  'card' => {
314
- 'number' => '4141000000000000',
315
- 'expDate' => '1210',
316
- 'type' => 'GC'
317
- }
377
+ 'number' => '4141000000000000',
378
+ 'expDate' => '1210',
379
+ 'type' => 'GC'
380
+ }
318
381
  }
319
382
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*<card><type>GC<\/type><number>4141000000000000<\/number><expDate>1210<\/expDate><\/card>.*/m), is_a(Hash))
320
383
  LitleOnlineRequest.new.authorization(hash)
@@ -326,10 +389,10 @@ module LitleOnline
326
389
  'amount' => '2',
327
390
  'orderSource' => 'ecommerce',
328
391
  'card' => {
329
- 'number' => '4141000000000000',
330
- 'expDate' => '1210',
331
- 'type' => 'GC'
332
- } ,
392
+ 'number' => '4141000000000000',
393
+ 'expDate' => '1210',
394
+ 'type' => 'GC'
395
+ } ,
333
396
  'advancedFraudChecks' => {'threatMetrixSessionId'=>'1234'}
334
397
  }
335
398
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*<advancedFraudChecks><threatMetrixSessionId>1234<\/threatMetrixSessionId><\/advancedFraudChecks>.*/m), is_a(Hash))
@@ -342,13 +405,13 @@ module LitleOnline
342
405
  'amount' => '2',
343
406
  'orderSource' => 'ecommerce',
344
407
  'mpos'=>
345
- {
346
- 'ksn'=>'ksnString',
347
- 'formatId'=>'30',
348
- 'encryptedTrack'=>'encryptedTrackString',
349
- 'track1Status'=>'0',
350
- 'track2Status'=>'0'
351
- }
408
+ {
409
+ 'ksn'=>'ksnString',
410
+ 'formatId'=>'30',
411
+ 'encryptedTrack'=>'encryptedTrackString',
412
+ 'track1Status'=>'0',
413
+ 'track2Status'=>'0'
414
+ }
352
415
  }
353
416
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*<mpos><ksn>ksnString<\/ksn><formatId>30<\/formatId><encryptedTrack>encryptedTrackString<\/encryptedTrack><track1Status>0<\/track1Status><track2Status>0<\/track2Status><\/mpos>.*/m), is_a(Hash))
354
417
  LitleOnlineRequest.new.authorization(hash)
@@ -24,7 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
-
27
+ require 'mocha/setup'
28
28
  module LitleOnline
29
29
  class TestBalanceInquiry < Test::Unit::TestCase
30
30
 
@@ -24,7 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
-
27
+ require 'mocha/setup'
28
28
  module LitleOnline
29
29
  class TestCancelSubscription < Test::Unit::TestCase
30
30
 
@@ -22,14 +22,12 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
22
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
23
  OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
- require File.expand_path("../../../lib/LitleOnline",__FILE__)
25
+ require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
27
  require 'mocha/setup'
28
28
 
29
29
  module LitleOnline
30
-
31
30
  class TestcaptureGivenAuth < Test::Unit::TestCase
32
-
33
31
  def test_both_choices_card_and_token
34
32
  hash = {
35
33
  'merchantId' => '101',
@@ -55,7 +53,7 @@ module LitleOnline
55
53
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.capture_given_auth(hash)}
56
54
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
57
55
  end
58
-
56
+
59
57
  def test_all_three_choices
60
58
  hash = {
61
59
  'merchantId' => '101',
@@ -84,15 +82,15 @@ module LitleOnline
84
82
  'cardValidationNum'=>'555',
85
83
  'type'=>'VI'
86
84
  }}
87
-
85
+
88
86
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.capture_given_auth(hash)}
89
87
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
90
88
  end
91
-
89
+
92
90
  def test_logged_in_user
93
91
  hash = {
94
- 'loggedInUser' => 'gdake',
95
- 'merchantSdk' => 'Ruby;8.14.0',
92
+ 'loggedInUser' => 'gdake',
93
+ 'merchantSdk' => 'Ruby;8.14.0',
96
94
  'merchantId' => '101',
97
95
  'version'=>'8.8',
98
96
  'reportGroup'=>'Planets',
@@ -111,7 +109,19 @@ module LitleOnline
111
109
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
112
110
  LitleOnlineRequest.new.capture_given_auth(hash)
113
111
  end
114
-
112
+
113
+ def test_secondary_amount
114
+ hash = {
115
+ 'orderId' => '12344',
116
+ 'amount' => '2',
117
+ 'secondaryAmount' => '1',
118
+ 'orderSource' => 'ecommerce',
119
+ 'reportGroup' => 'Planets'
120
+ }
121
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><secondaryAmount>1<\/secondaryAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
122
+ LitleOnlineRequest.new.capture_given_auth(hash)
123
+ end
124
+
115
125
  def test_surcharge_amount
116
126
  hash = {
117
127
  'amount' => '2',
@@ -122,7 +132,7 @@ module LitleOnline
122
132
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
123
133
  LitleOnlineRequest.new.capture_given_auth(hash)
124
134
  end
125
-
135
+
126
136
  def test_surcharge_amount_optional
127
137
  hash = {
128
138
  'amount' => '2',
@@ -132,7 +142,6 @@ module LitleOnline
132
142
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
133
143
  LitleOnlineRequest.new.capture_given_auth(hash)
134
144
  end
135
-
136
145
 
137
146
  def test_fraudResult
138
147
  hash = {
@@ -143,11 +152,11 @@ module LitleOnline
143
152
  'authDate'=>'2002-10-09','authCode'=>'543216',
144
153
  'authAmount'=>'12345',
145
154
  'fraudResult' => {
146
- 'advancedFraudResults' =>
147
- {'deviceReviewStatus' => 'deviceReviewStatusString',
148
- 'deviceReputationScore' => '100'
149
- }
150
- }
155
+ 'advancedFraudResults' =>
156
+ {'deviceReviewStatus' => 'deviceReviewStatusString',
157
+ 'deviceReputationScore' => '100'
158
+ }
159
+ }
151
160
  }
152
161
  }
153
162
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*<advancedFraudResults><deviceReviewStatus>deviceReviewStatusString<\/deviceReviewStatus><deviceReputationScore>100<\/deviceReputationScore><\/advancedFraudResults>.*/m), is_a(Hash))
@@ -163,12 +172,12 @@ module LitleOnline
163
172
  'authDate'=>'2002-10-09','authCode'=>'543216',
164
173
  'authAmount'=>'12345',
165
174
  'fraudResult' => {
166
- 'advancedFraudResults' =>
167
- {'deviceReviewStatus' => 'deviceReviewStatusString',
168
- 'deviceReputationScore' => '100',
169
- 'triggeredRule' => ['rule1','rule2']
170
- }
171
- }
175
+ 'advancedFraudResults' =>
176
+ {'deviceReviewStatus' => 'deviceReviewStatusString',
177
+ 'deviceReputationScore' => '100',
178
+ 'triggeredRule' => ['rule1','rule2']
179
+ }
180
+ }
172
181
  }
173
182
  }
174
183
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*<advancedFraudResults><deviceReviewStatus>deviceReviewStatusString<\/deviceReviewStatus><deviceReputationScore>100<\/deviceReputationScore><triggeredRule>rule1<\/triggeredRule><triggeredRule>rule2<\/triggeredRule><\/advancedFraudResults>.*/m), is_a(Hash))
@@ -24,7 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
-
27
+ require 'mocha/setup'
28
28
  module LitleOnline
29
29
  class TestCreatePlan < Test::Unit::TestCase
30
30