CnpOnline 9.14.0 → 11.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +7 -7
  2. data/CHANGELOG +23 -17
  3. data/CONTRIBUTORS +0 -0
  4. data/DESCRIPTION +1 -1
  5. data/LICENSE +1 -1
  6. data/README.md +5 -3
  7. data/Rakefile +5 -5
  8. data/Rakefile~ +5 -5
  9. data/SETUP.md +3 -3
  10. data/bin/Setup.rb +59 -41
  11. data/lib/Communications.rb +3 -3
  12. data/lib/Configuration.rb +52 -45
  13. data/lib/EnvironmentVariables.rb +5 -1
  14. data/lib/LitleBatchRequest.rb +72 -7
  15. data/lib/LitleListeners.rb +17 -1
  16. data/lib/LitleOnline.rb +3 -4
  17. data/lib/LitleOnlineRequest.rb +37 -7
  18. data/lib/LitleRequest.rb +315 -186
  19. data/lib/LitleTransaction.rb +212 -85
  20. data/lib/LitleXmlMapper.rb +4 -2
  21. data/lib/XMLFields.rb +384 -171
  22. data/lib/cacert.pem +0 -0
  23. data/samples/Auth/LitleAuthReversalTransaction.rb +2 -2
  24. data/samples/Auth/LitleAuthorizationTransaction.rb +1 -0
  25. data/samples/Auth/LitlePaymentFullLifeCycle.rb +12 -6
  26. data/samples/Batch/AccountUpdate.rb +1 -0
  27. data/samples/Batch/SampleBatchDriver.rb +2 -1
  28. data/samples/Capture/LitleCaptureGivenAuthTransaction.rb +2 -1
  29. data/samples/Capture/LitleCaptureTransaction.rb +2 -2
  30. data/samples/Capture/LitleForceCaptureTransaction.rb +2 -1
  31. data/samples/Capture/LitlePartialCapture.rb +3 -3
  32. data/samples/Credit/LitleCreditTransaction.rb +2 -2
  33. data/samples/Credit/LitleRefundTransaction.rb +2 -1
  34. data/samples/Other/LitleAvsTransaction.rb +2 -1
  35. data/samples/Other/LitleVoidTransaction.rb +2 -1
  36. data/samples/Paypage/FullPaypageLifeCycle.rb +7 -2
  37. data/samples/Run_all.rb +0 -0
  38. data/samples/Sale/LitleSaleTransaction.rb +2 -1
  39. data/samples/Sale/SampleSaleTransaction.rb +2 -1
  40. data/test/certification/certTest1_base.rb +52 -53
  41. data/test/certification/certTest2_authenhanced.rb +24 -25
  42. data/test/certification/certTest3_authreversal.rb +23 -26
  43. data/test/certification/certTest4_echeck.rb +18 -32
  44. data/test/certification/certTest5_token.rb +105 -106
  45. data/test/certification/certTest_batchAll.rb +47 -15
  46. data/test/functional/test_activate.rb +32 -4
  47. data/test/functional/test_activateReversal.rb +18 -5
  48. data/test/functional/test_auth.rb +94 -48
  49. data/test/functional/test_authReversal.rb +4 -1
  50. data/test/functional/test_balanceInquiry.rb +28 -3
  51. data/test/functional/test_batchStream.rb +2 -4
  52. data/test/functional/test_cancelSubscription.rb +2 -2
  53. data/test/functional/test_capture.rb +21 -14
  54. data/test/functional/test_captureGivenAuth.rb +15 -6
  55. data/test/functional/test_createPlan.rb +1 -1
  56. data/test/functional/test_credit.rb +14 -5
  57. data/test/functional/test_deactivate.rb +26 -3
  58. data/test/functional/test_deactivateReversal.rb +18 -5
  59. data/test/functional/test_depositReversal.rb +31 -19
  60. data/test/functional/test_echeckCredit.rb +34 -6
  61. data/test/functional/test_echeckRedeposit.rb +29 -2
  62. data/test/functional/test_echeckSale.rb +68 -11
  63. data/test/functional/test_echeckVerification.rb +32 -7
  64. data/test/functional/test_echeckVoid.rb +2 -1
  65. data/test/functional/test_forceCapture.rb +20 -6
  66. data/test/functional/test_fraudCheck.rb +3 -5
  67. data/test/functional/test_giftCardAuthReversal.rb +72 -0
  68. data/test/functional/test_giftCardCapture.rb +72 -0
  69. data/test/functional/test_giftCardCredit.rb +69 -0
  70. data/test/functional/test_litle_requests.rb +3 -6
  71. data/test/functional/test_load.rb +27 -3
  72. data/test/functional/test_loadReversal.rb +18 -5
  73. data/test/functional/test_override.rb +7 -3
  74. data/test/functional/test_pgp_litle_requests.rb +294 -0
  75. data/test/functional/test_queryTransaction.rb +152 -0
  76. data/test/functional/test_refundReversal.rb +18 -5
  77. data/test/functional/test_sale.rb +122 -159
  78. data/test/functional/test_token.rb +17 -11
  79. data/test/functional/test_unload.rb +27 -3
  80. data/test/functional/test_unloadReversal.rb +18 -5
  81. data/test/functional/test_updateCardValidationNumOnToken.rb +1 -0
  82. data/test/functional/test_updatePlan.rb +2 -1
  83. data/test/functional/test_updateSubscription.rb +3 -1
  84. data/test/functional/test_wallet.rb +74 -0
  85. data/test/functional/test_xmlfields.rb +22 -3
  86. data/test/functional/ts_all.rb +2 -0
  87. data/test/unit/test_LitleBatchRequest.rb +53 -5
  88. data/test/unit/test_LitleOnlineRequest.rb +5 -30
  89. data/test/unit/test_LitleRequest.rb +7 -6
  90. data/test/unit/test_LitleTransaction.rb +34 -5
  91. data/test/unit/test_LitleXmlMapper.rb +3 -0
  92. data/test/unit/test_activate.rb +22 -2
  93. data/test/unit/test_activateReversal.rb +15 -3
  94. data/test/unit/test_auth.rb +11 -9
  95. data/test/unit/test_balanceInquiry.rb +2 -2
  96. data/test/unit/test_capture.rb +2 -2
  97. data/test/unit/test_captureGivenAuth.rb +21 -1
  98. data/test/unit/test_credit.rb +1 -1
  99. data/test/unit/test_deactivate.rb +19 -0
  100. data/test/unit/test_deactivateReversal.rb +15 -3
  101. data/test/unit/test_depositReversal.rb +17 -5
  102. data/test/unit/test_echeckCredit.rb +19 -0
  103. data/test/unit/test_echeckRedeposit.rb +15 -0
  104. data/test/unit/test_echeckSale.rb +20 -1
  105. data/test/unit/test_echeckVerification.rb +6 -3
  106. data/test/unit/test_forceCapture.rb +1 -1
  107. data/test/unit/test_giftCardAuthReversal.rb +58 -0
  108. data/test/{functional/test_utf8.rb → unit/test_giftCardCapture.rb} +25 -12
  109. data/test/unit/test_giftCardCredit.rb +57 -0
  110. data/test/unit/test_load.rb +2 -2
  111. data/test/unit/test_loadReversal.rb +15 -3
  112. data/test/unit/test_pgp_LitleRequest +139 -0
  113. data/test/unit/test_queryTransaction.rb +105 -0
  114. data/test/unit/test_refundReversal.rb +15 -3
  115. data/test/unit/test_sale.rb +23 -3
  116. data/test/unit/test_token.rb +24 -20
  117. data/test/unit/test_unload.rb +2 -2
  118. data/test/unit/test_unloadReversal.rb +15 -3
  119. data/test/unit/test_wallet.rb +262 -0
  120. data/test/unit/ts_unit.rb +2 -1
  121. metadata +81 -100
@@ -31,6 +31,7 @@ module LitleOnline
31
31
  hash = {
32
32
  'merchantId' => '101',
33
33
  'version'=>'8.8',
34
+ 'id'=>'test',
34
35
  'reportGroup'=>'Planets',
35
36
  'orderId'=>'12344',
36
37
  'accountNumber'=>'1233456789103801'
@@ -43,6 +44,7 @@ module LitleOnline
43
44
  hash = {
44
45
  'merchantId' => '101',
45
46
  'version'=>'8.8',
47
+ 'id'=>'test',
46
48
  'reportGroup'=>'Planets',
47
49
  'orderId'=>'12344',
48
50
  'paypageRegistrationId'=>'QU1pTFZnV2NGQWZrZzRKeTNVR0lzejB1K2Q5VDdWMTVqb2J5WFJ2Snh4U0U4eTBxaFg2cEVWaDBWSlhtMVZTTw=='
@@ -56,18 +58,19 @@ module LitleOnline
56
58
  hash = {
57
59
  'merchantId' => '101',
58
60
  'version'=>'8.8',
61
+ 'id'=>'test',
59
62
  'reportGroup'=>'Planets',
60
63
  'orderId'=>'12344',
61
64
  'applepay'=>{
62
- 'data'=>'1234',
63
- 'header'=>{
64
- 'applicationData'=>'454657413164',
65
- 'ephemeralPublicKey'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
66
- 'publicKeyHash'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
67
- 'transactionId'=>'1234'
68
- },
69
- 'signature' =>'1',
70
- 'version'=>'1.0.0'
65
+ 'data'=>'1234',
66
+ 'header'=>{
67
+ 'applicationData'=>'454657413164',
68
+ 'ephemeralPublicKey'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
69
+ 'publicKeyHash'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
70
+ 'transactionId'=>'1234'
71
+ },
72
+ 'signature' =>'1',
73
+ 'version'=>'10000'
71
74
  }
72
75
  }
73
76
  response= LitleOnlineRequest.new.register_token_request(hash)
@@ -79,6 +82,7 @@ module LitleOnline
79
82
  hash = {
80
83
  'reportGroup'=>'Planets',
81
84
  'merchantId' => '101',
85
+ 'id'=>'test',
82
86
  'version'=>'8.8',
83
87
  'orderId'=>'12344',
84
88
  'echeckForToken'=>{'accNum'=>'12344565','routingNum'=>'123476545'}
@@ -91,6 +95,7 @@ module LitleOnline
91
95
  hash = {
92
96
  'merchantId' => '101',
93
97
  'version'=>'8.8',
98
+ 'id'=>'test',
94
99
  'orderId'=>'12344',
95
100
  'accountNumber'=>'1233456789103801',
96
101
  'reportGroup'=>'Planets',
@@ -103,6 +108,7 @@ module LitleOnline
103
108
  hash = {
104
109
  'merchantId' => '101',
105
110
  'version'=>'8.8',
111
+ 'id'=>'test',
106
112
  'NOSUCHFIELD'=>'none',
107
113
  'orderId'=>'12344',
108
114
  'accountNumber'=>'1233456789103801',
@@ -111,12 +117,13 @@ module LitleOnline
111
117
  response= LitleOnlineRequest.new.register_token_request(hash)
112
118
  assert_equal('Valid Format', response.message)
113
119
  end
114
-
120
+
115
121
  def test_simple_token_with_androidpay
116
122
  hash = {
117
123
  'merchantId' => '101',
118
124
  'version'=>'8.8',
119
125
  'reportGroup'=>'Planets',
126
+ 'id'=>'test',
120
127
  'orderId'=>'androidpay',
121
128
  'accountNumber'=>'1233456789103801'
122
129
  }
@@ -126,6 +133,5 @@ module LitleOnline
126
133
  assert_equal('2050', response.registerTokenResponse.androidpayResponse.expYear)
127
134
  assert_equal('aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1kUXc0dzlXZ1hjUQ0K', response.registerTokenResponse.androidpayResponse.cryptogram)
128
135
  end
129
-
130
136
  end
131
137
  end
@@ -33,12 +33,13 @@ def test_simple_happy
33
33
  hash = {
34
34
  'merchantId' => '101',
35
35
  'version'=>'8.8',
36
+ 'id'=>'test',
36
37
  'reportGroup'=>'Planets',
37
38
  'orderId' =>'1001',
38
39
  'amount' =>'500',
39
40
  'orderSource' =>'ecommerce',
40
41
  'card'=>{
41
- 'type'=>'VI',
42
+ 'type'=>'GC',
42
43
  'number' =>'4100000000000001',
43
44
  'expDate' =>'1210'
44
45
  }
@@ -52,12 +53,13 @@ def test_simple_happy
52
53
  hash = {
53
54
  'merchantId' => '101',
54
55
  'version'=>'8.8',
56
+ 'id'=>'test',
55
57
  'reportGroup'=>'Planets',
56
58
  'amount' =>'500',
57
59
  'orderId' =>'1001',
58
60
  'orderSource' =>'ecommerce',
59
61
  'card'=>{
60
- 'type'=>'VI',
62
+ 'type'=>'GC',
61
63
  'number' =>'4100000000000001',
62
64
  'expDate' =>'1210'
63
65
  }
@@ -78,7 +80,29 @@ def test_simple_happy
78
80
  #Get exceptions
79
81
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.unload_request(hash)}
80
82
  #Test
81
- assert(exception.message =~ /Error validating xml data against the schema/)
83
+ assert(exception.message =~ /Error validating xml data against the schema/)
84
+ end
85
+
86
+ def test_GiftCardCardType_NotPresent
87
+ hash = {
88
+ 'merchantId' => '101',
89
+ 'version'=>'8.8',
90
+ 'id' =>'test',
91
+ 'reportGroup'=>'Planets',
92
+ 'amount' =>'500',
93
+ 'orderId' =>'1001',
94
+ 'orderSource' =>'ecommerce',
95
+ 'card'=>{
96
+ 'type'=>'VI',
97
+ 'number' =>'4100000000000001',
98
+ 'expDate' =>'1210'
99
+ }
100
+ }
101
+
102
+ #Get exceptions
103
+ exception = assert_raise(RuntimeError){LitleOnlineRequest.new.unload_request(hash)}
104
+ #Test
105
+ assert(exception.message =~ /Error validating xml data against the schema/)
82
106
  end
83
107
  end
84
108
  end
@@ -33,12 +33,25 @@ def test_simple
33
33
  hash = {
34
34
  'merchantId' => '101',
35
35
  'version'=>'8.8',
36
+ 'id'=>'test',
36
37
  'reportGroup'=>'Planets',
37
- 'litleTxnId' =>'5000'
38
- }
38
+ 'litleTxnId' =>'5000',
39
+ 'card'=>{
40
+ 'type'=>'GC',
41
+ 'number' =>'400000000000001',
42
+ 'expDate' =>'0150',
43
+ 'pin' => '1234',
44
+ 'cardValidationNum' => '411'
45
+ },
46
+ 'originalRefCode' => '101',
47
+ 'originalAmount' => '34561',
48
+ 'originalTxnTime' => '2017-01-24T09:00:00',
49
+ 'originalSystemTraceId' => '33',
50
+ 'originalSequenceNumber' => '111111',
51
+ }
39
52
 
40
- response= LitleOnlineRequest.new.unload_reversal(hash)
41
- assert_equal('Valid Format', response.message)
53
+ response= LitleOnlineRequest.new.deposit_reversal(hash)
54
+ assert_equal('000', response.depositReversalResponse.response)
42
55
  end
43
56
 
44
57
 
@@ -48,7 +61,7 @@ def test_simple
48
61
  'version'=>'8.8',
49
62
  'reportGroup'=>'Planets',
50
63
  }
51
-
64
+
52
65
  #Get exceptions
53
66
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.unload_reversal(hash)}
54
67
  #Test
@@ -31,6 +31,7 @@ module LitleOnline
31
31
  hash = {
32
32
  'merchantId' => '101',
33
33
  'version'=>'8.8',
34
+ 'id'=>'test',
34
35
  'reportGroup'=>'Planets',
35
36
  'orderId'=>'12344',
36
37
  'litleToken'=>'1233456789103801',
@@ -33,6 +33,7 @@ def test_simple_happy
33
33
  hash ={
34
34
  'merchantId' => '101',
35
35
  'version'=>'8.8',
36
+ 'id'=>'test',
36
37
  'reportGroup'=>'Planets',
37
38
  'planCode'=>'planCodeString',
38
39
  'active'=>'true'
@@ -54,7 +55,7 @@ def test_simple_happy
54
55
  #Get exceptions
55
56
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.update_plan(hash)}
56
57
  #Test
57
- assert(exception.message =~ /Error validating xml data against the schema/)
58
+ assert(exception.message =~ /Error validating xml data against the schema/)
58
59
  end
59
60
  end
60
61
  end
@@ -33,6 +33,7 @@ def test_simple_happy
33
33
  hash = {
34
34
  'merchantId' => '101',
35
35
  'version'=>'8.8',
36
+ 'id'=>'test',
36
37
  'reportGroup'=>'Planets',
37
38
  'subscriptionId' =>'1001'
38
39
  }
@@ -45,6 +46,7 @@ def test_simple_happy
45
46
  hash = {
46
47
  'merchantId' => '101',
47
48
  'version'=>'8.8',
49
+ 'id'=>'test',
48
50
  'reportGroup'=>'Planets',
49
51
  'subscriptionId' =>'1001',
50
52
  'billingDate'=>'2014-03-11',
@@ -72,7 +74,7 @@ def test_simple_happy
72
74
  #Get exceptions
73
75
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.update_subscription(hash)}
74
76
  #Test
75
- assert(exception.message =~ /Error validating xml data against the schema/)
77
+ assert(exception.message =~ /Error validating xml data against the schema/)
76
78
  end
77
79
  end
78
80
  end
@@ -0,0 +1,74 @@
1
+ =begin
2
+ Copyright (c) 2017 Vantiv eCommerce
3
+
4
+ Permission is hereby granted, free of charge, to any person
5
+ obtaining a copy of this software and associated documentation
6
+ files (the "Software"), to deal in the Software without
7
+ restriction, including without limitation the rights to use,
8
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the
10
+ Software is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
+ OTHER DEALINGS IN THE SOFTWARE.
24
+ =end
25
+ require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
+ require 'test/unit'
27
+
28
+ #test Authorization Transaction
29
+ module LitleOnline
30
+ class TestAuth < Test::Unit::TestCase
31
+ def test_simple_auth_with_wallet
32
+ hash = {
33
+ 'merchantId' => '101',
34
+ 'id' => 'test',
35
+ 'version'=>'8.8',
36
+ 'reportGroup'=>'Planets',
37
+ 'amount'=>'106',
38
+ 'orderId'=>'123456',
39
+ 'orderSource'=>'ecommerce',
40
+ 'paypal'=>{
41
+ 'payerId'=>'1234',
42
+ 'token'=>'1234',
43
+ 'transactionId'=>'123456'},
44
+ 'wallet'=> {
45
+ 'walletSourceType' => 'MasterPass',
46
+ 'walletSourceTypeId' => '102'
47
+ }}
48
+ response= LitleOnlineRequest.new.authorization(hash)
49
+ assert_equal 'Valid Format', response.message
50
+ end
51
+
52
+ def test_simple_sale_with_wallet
53
+ hash = {
54
+ 'merchantId' => '101',
55
+ 'id' => 'test',
56
+ 'version'=>'8.8',
57
+ 'reportGroup'=>'Planets',
58
+ 'litleTxnId'=>'123456',
59
+ 'orderId'=>'12344',
60
+ 'amount'=>'106',
61
+ 'orderSource'=>'ecommerce',
62
+ 'paypal'=>{
63
+ 'payerId'=>'1234',
64
+ 'token'=>'1234',
65
+ 'transactionId'=>'123456'},
66
+ 'wallet'=> {
67
+ 'walletSourceType' => 'MasterPass',
68
+ 'walletSourceTypeId' => '102'
69
+ }}
70
+ response= LitleOnlineRequest.new.sale(hash)
71
+ assert_equal 'Valid Format', response.message
72
+ end
73
+ end
74
+ end
@@ -30,6 +30,7 @@ module LitleOnline
30
30
  def test_card_no_required_type_or_track
31
31
  hash = {
32
32
  'merchantId' => '101',
33
+ 'id' => 'test',
33
34
  'version'=>'8.8',
34
35
  'reportGroup'=>'Planets',
35
36
  'litleTxnId'=>'123456',
@@ -44,12 +45,13 @@ module LitleOnline
44
45
  #Get exceptions
45
46
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
46
47
  #Test
47
- assert(exception.message =~ /Error validating xml data against the schema/)
48
+ assert(exception.message =~ /Error validating xml data against the schema/)
48
49
  end
49
50
 
50
51
  def test_simple_custom_billing
51
52
  hash = {
52
53
  'merchantId' => '101',
54
+ 'id' => 'test',
53
55
  'version'=>'8.8',
54
56
  'reportGroup'=>'Planets',
55
57
  'litleTxnId'=>'123456',
@@ -69,6 +71,7 @@ module LitleOnline
69
71
  def test_bill_me_later
70
72
  hash = {
71
73
  'merchantId' => '101',
74
+ 'id' => 'test',
72
75
  'version'=>'8.8',
73
76
  'reportGroup'=>'Planets',
74
77
  'litleTxnId'=>'123456',
@@ -89,6 +92,7 @@ module LitleOnline
89
92
  def test__customer_info
90
93
  hash = {
91
94
  'merchantId' => '101',
95
+ 'id' => 'test',
92
96
  'version'=>'8.8',
93
97
  'reportGroup'=>'Planets',
94
98
  'litleTxnId'=>'123456',
@@ -108,12 +112,13 @@ module LitleOnline
108
112
  def test_simple_bill_to_address
109
113
  hash = {
110
114
  'merchantId' => '101',
115
+ 'id' => 'test',
111
116
  'version'=>'8.8',
112
117
  'reportGroup'=>'Planets',
113
118
  'orderId'=>'12344',
114
119
  'amount'=>'106',
115
120
  'orderSource'=>'ecommerce',
116
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'vantiv.com'},
121
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
117
122
  'card'=>{
118
123
  'type'=>'VI',
119
124
  'number' =>'4100000000000000',
@@ -126,6 +131,7 @@ module LitleOnline
126
131
  def test_processing_instructions
127
132
  hash = {
128
133
  'merchantId' => '101',
134
+ 'id' => 'test',
129
135
  'version'=>'8.8',
130
136
  'reportGroup'=>'Planets',
131
137
  'orderId'=>'12344',
@@ -144,6 +150,7 @@ module LitleOnline
144
150
  def test_pos
145
151
  hash = {
146
152
  'merchantId' => '101',
153
+ 'id' => 'test',
147
154
  'version'=>'8.8',
148
155
  'reportGroup'=>'Planets',
149
156
  'orderId'=>'12344',
@@ -162,6 +169,7 @@ module LitleOnline
162
169
  def test_amex_data
163
170
  hash = {
164
171
  'merchantId' => '101',
172
+ 'id' => 'test',
165
173
  'version'=>'8.8',
166
174
  'reportGroup'=>'Planets',
167
175
  'orderId'=>'12344',
@@ -180,6 +188,7 @@ module LitleOnline
180
188
  def test_amex_data_missing_seller_id
181
189
  hash = {
182
190
  'merchantId' => '101',
191
+ 'id' => 'test',
183
192
  'version'=>'8.8',
184
193
  'reportGroup'=>'Planets',
185
194
  'orderId'=>'12344',
@@ -194,12 +203,13 @@ module LitleOnline
194
203
  #Get exceptions
195
204
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
196
205
  #Test
197
- assert(exception.message =~ /Error validating xml data against the schema/)
206
+ assert(exception.message =~ /Error validating xml data against the schema/)
198
207
  end
199
208
 
200
209
  def test_simple_enhanced_data
201
210
  hash = {
202
211
  'merchantId' => '101',
212
+ 'id' => 'test',
203
213
  'version'=>'8.8',
204
214
  'reportGroup'=>'Planets',
205
215
  'orderId'=>'12344',
@@ -224,6 +234,7 @@ module LitleOnline
224
234
  def test_enhanced_data_with_detail_tax
225
235
  hash = {
226
236
  'merchantId' => '101',
237
+ 'id' => 'test',
227
238
  'version'=>'8.8',
228
239
  'reportGroup'=>'Planets',
229
240
  'orderId'=>'12344',
@@ -249,6 +260,7 @@ module LitleOnline
249
260
  def test_enhanced_data_with_line_item
250
261
  hash = {
251
262
  'merchantId' => '101',
263
+ 'id' => 'test',
252
264
  'version'=>'8.8',
253
265
  'reportGroup'=>'Planets',
254
266
  'orderId'=>'12344',
@@ -280,6 +292,7 @@ module LitleOnline
280
292
  def test_simple_token
281
293
  hash = {
282
294
  'merchantId' => '101',
295
+ 'id' => 'test',
283
296
  'version'=>'8.8',
284
297
  'reportGroup'=>'Planets',
285
298
  'orderId'=>'12344',
@@ -298,6 +311,7 @@ module LitleOnline
298
311
  def test_token_missing_exp_dat_and_valid_num
299
312
  hash = {
300
313
  'merchantId' => '101',
314
+ 'id' => 'test',
301
315
  'version'=>'8.8',
302
316
  'reportGroup'=>'Planets',
303
317
  'orderId'=>'12344',
@@ -314,6 +328,7 @@ module LitleOnline
314
328
  def test_simple_paypage
315
329
  hash = {
316
330
  'merchantId' => '101',
331
+ 'id' => 'test',
317
332
  'version'=>'8.8',
318
333
  'reportGroup'=>'Planets',
319
334
  'orderId'=>'12344',
@@ -332,6 +347,7 @@ module LitleOnline
332
347
  def test_paypage_missing_exp_dat_and_valid_num
333
348
  hash = {
334
349
  'merchantId' => '101',
350
+ 'id' => 'test',
335
351
  'version'=>'8.8',
336
352
  'reportGroup'=>'Planets',
337
353
  'orderId'=>'12344',
@@ -348,6 +364,7 @@ module LitleOnline
348
364
  def test_line_item_data
349
365
  hash = {
350
366
  'merchantId' => '101',
367
+ 'id' => 'test',
351
368
  'version'=>'8.8',
352
369
  'reportGroup'=>'Planets',
353
370
  'orderId'=>'1',
@@ -373,6 +390,7 @@ module LitleOnline
373
390
  def test_detail_tax
374
391
  hash = {
375
392
  'merchantId' => '101',
393
+ 'id' => 'test',
376
394
  'version'=>'8.8',
377
395
  'reportGroup'=>'Planets',
378
396
  'orderId'=>'1',
@@ -398,6 +416,7 @@ module LitleOnline
398
416
  def test_detail_tax_in_lineItem
399
417
  hash = {
400
418
  'merchantId' => '101',
419
+ 'id' => 'test',
401
420
  'version'=>'8.8',
402
421
  'reportGroup'=>'Planets',
403
422
  'orderId'=>'1',