CnpOnline 11.4.0 → 12.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +4 -164
  3. data/CHANGELOG~ +0 -0
  4. data/CONTRIBUTORS +0 -2
  5. data/DESCRIPTION +1 -1
  6. data/LICENSE +0 -0
  7. data/README.md +13 -15
  8. data/Rakefile +3 -2
  9. data/Rakefile~ +4 -3
  10. data/SETUP.md +13 -10
  11. data/bin/Setup.rb +26 -22
  12. data/bin/sample_batch_driver.rb +15 -15
  13. data/bin/sample_driver.rb +5 -5
  14. data/lib/{LitleBatchRequest.rb → CnpBatchRequest.rb} +68 -66
  15. data/lib/{LitleListeners.rb → CnpListeners.rb} +48 -40
  16. data/lib/{LitleOnline.rb → CnpOnline.rb} +8 -7
  17. data/lib/{LitleOnlineRequest.rb → CnpOnlineRequest.rb} +53 -53
  18. data/lib/{LitleRequest.rb → CnpRequest.rb} +186 -192
  19. data/lib/{LitleTransaction.rb → CnpTransaction.rb} +53 -52
  20. data/lib/{LitleXmlMapper.rb → CnpXmlMapper.rb} +7 -7
  21. data/lib/Communications.rb +8 -7
  22. data/lib/Configuration.rb +7 -6
  23. data/lib/EnvironmentVariables.rb +2 -2
  24. data/lib/XMLFields.rb +98 -108
  25. data/lib/cacert.pem +0 -0
  26. data/samples/Auth/CnpAuthReversalTransaction.rb +15 -0
  27. data/samples/Auth/{LitleAuthorizationTransaction.rb → CnpAuthorizationTransaction.rb} +4 -4
  28. data/samples/Auth/{LitlePaymentFullLifeCycle.rb → CnpPaymentFullLifeCycle.rb} +11 -11
  29. data/samples/Batch/AccountUpdate.rb +11 -11
  30. data/samples/Batch/SampleBatchDriver.rb +16 -16
  31. data/samples/Capture/{LitleCaptureGivenAuthTransaction.rb → CnpCaptureGivenAuthTransaction.rb} +4 -4
  32. data/samples/Capture/CnpCaptureTransaction.rb +14 -0
  33. data/samples/Capture/{LitleForceCaptureTransaction.rb → CnpForceCaptureTransaction.rb} +5 -5
  34. data/samples/Capture/CnpPartialCapture.rb +16 -0
  35. data/samples/Credit/CnpCreditTransaction.rb +16 -0
  36. data/samples/Credit/{LitleRefundTransaction.rb → CnpRefundTransaction.rb} +4 -4
  37. data/samples/Other/{LitleAvsTransaction.rb → CnpAvsTransaction.rb} +4 -4
  38. data/samples/Other/CnpVoidTransaction.rb +19 -0
  39. data/samples/Paypage/FullPaypageLifeCycle.rb +16 -16
  40. data/samples/Run_all.rb +12 -12
  41. data/samples/Sale/{LitleSaleTransaction.rb → CnpSaleTransaction.rb} +4 -4
  42. data/samples/Sale/SampleSaleTransaction.rb +5 -5
  43. data/test/certification/certTest1_base.rb +104 -103
  44. data/test/certification/certTest2_authenhanced.rb +90 -88
  45. data/test/certification/certTest3_authreversal.rb +29 -28
  46. data/test/certification/certTest4_echeck.rb +22 -20
  47. data/test/certification/certTest5_token.rb +51 -49
  48. data/test/certification/certTest_batchAll.rb +60 -60
  49. data/test/certification/ts_all.rb +1 -1
  50. data/test/functional/test_activate.rb +9 -8
  51. data/test/functional/test_activateReversal.rb +5 -5
  52. data/test/functional/test_auth.rb +31 -30
  53. data/test/functional/test_authReversal.rb +8 -8
  54. data/test/functional/test_balanceInquiry.rb +6 -6
  55. data/test/functional/test_batch.rb +32 -32
  56. data/test/functional/test_batchStream.rb +14 -14
  57. data/test/functional/test_cancelSubscription.rb +4 -4
  58. data/test/functional/test_capture.rb +14 -14
  59. data/test/functional/test_captureGivenAuth.rb +16 -16
  60. data/test/functional/test_configuration.rb +26 -26
  61. data/test/functional/test_createPlan.rb +5 -5
  62. data/test/functional/test_credit.rb +13 -33
  63. data/test/functional/test_deactivate.rb +6 -6
  64. data/test/functional/test_deactivateReversal.rb +5 -5
  65. data/test/functional/test_depositReversal.rb +5 -5
  66. data/test/functional/test_echeckCredit.rb +20 -20
  67. data/test/functional/test_echeckRedeposit.rb +16 -16
  68. data/test/functional/test_echeckSale.rb +35 -35
  69. data/test/functional/test_echeckVerification.rb +17 -17
  70. data/test/functional/test_echeckVoid.rb +4 -4
  71. data/test/functional/test_forceCapture.rb +21 -21
  72. data/test/functional/test_fraudCheck.rb +6 -5
  73. data/test/functional/test_giftCardAuthReversal.rb +5 -5
  74. data/test/functional/test_giftCardCapture.rb +5 -5
  75. data/test/functional/test_giftCardCredit.rb +5 -5
  76. data/test/functional/test_litle_requests.rb +101 -99
  77. data/test/functional/test_load.rb +6 -6
  78. data/test/functional/test_loadReversal.rb +5 -5
  79. data/test/functional/test_override.rb +9 -9
  80. data/test/functional/{test_pgp_litle_requests.rb → test_pgp_cnp_requests.rb} +61 -60
  81. data/test/functional/test_queryTransaction.rb +10 -10
  82. data/test/functional/test_refundReversal.rb +5 -5
  83. data/test/functional/test_sale.rb +36 -36
  84. data/test/functional/test_token.rb +10 -10
  85. data/test/functional/test_unload.rb +6 -6
  86. data/test/functional/test_unloadReversal.rb +5 -5
  87. data/test/functional/test_updateCardValidationNumOnToken.rb +4 -4
  88. data/test/functional/test_updatePlan.rb +4 -4
  89. data/test/functional/test_updateSubscription.rb +5 -5
  90. data/test/functional/test_wallet.rb +5 -5
  91. data/test/functional/test_xmlfields.rb +29 -69
  92. data/test/functional/ts_all.rb +2 -2
  93. data/test/unit/test_LitleAUBatch.rb +15 -15
  94. data/test/unit/test_LitleBatchRequest.rb +42 -76
  95. data/test/unit/test_LitleOnlineRequest.rb +38 -38
  96. data/test/unit/test_LitleRequest.rb +47 -47
  97. data/test/unit/test_LitleTransaction.rb +34 -34
  98. data/test/unit/test_LitleXmlMapper.rb +27 -27
  99. data/test/unit/test_activate.rb +8 -8
  100. data/test/unit/test_activateReversal.rb +5 -5
  101. data/test/unit/test_auth.rb +43 -43
  102. data/test/unit/test_authReversal.rb +14 -14
  103. data/test/unit/test_balanceInquiry.rb +4 -4
  104. data/test/unit/test_cancelSubscription.rb +4 -4
  105. data/test/unit/test_capture.rb +20 -20
  106. data/test/unit/test_captureGivenAuth.rb +22 -22
  107. data/test/unit/test_createPlan.rb +4 -4
  108. data/test/unit/test_credit.rb +43 -43
  109. data/test/unit/test_deactivate.rb +6 -6
  110. data/test/unit/test_deactivateReversal.rb +5 -5
  111. data/test/unit/test_depositReversal.rb +5 -5
  112. data/test/unit/test_echeckCredit.rb +16 -16
  113. data/test/unit/test_echeckRedeposit.rb +19 -19
  114. data/test/unit/test_echeckSale.rb +16 -16
  115. data/test/unit/test_echeckVerification.rb +11 -11
  116. data/test/unit/test_echeckVoid.rb +8 -8
  117. data/test/unit/test_forceCapture.rb +19 -19
  118. data/test/unit/test_fraudCheck.rb +4 -4
  119. data/test/unit/test_giftCardAuthReversal.rb +5 -5
  120. data/test/unit/test_giftCardCapture.rb +5 -5
  121. data/test/unit/test_giftCardCredit.rb +5 -5
  122. data/test/unit/test_load.rb +4 -4
  123. data/test/unit/test_loadReversal.rb +5 -5
  124. data/test/unit/{test_pgp_LitleRequest → test_pgp_CnpRequest.rb} +32 -32
  125. data/test/unit/test_queryTransaction.rb +8 -8
  126. data/test/unit/test_refundReversal.rb +5 -5
  127. data/test/unit/test_sale.rb +64 -64
  128. data/test/unit/test_token.rb +13 -13
  129. data/test/unit/test_unload.rb +4 -4
  130. data/test/unit/test_unloadReversal.rb +5 -5
  131. data/test/unit/test_updateCardValidationNumOnToken.rb +16 -16
  132. data/test/unit/test_updatePlan.rb +4 -4
  133. data/test/unit/test_updateSubscription.rb +11 -11
  134. data/test/unit/test_wallet.rb +13 -13
  135. data/test/unit/test_xmlfields.rb +119 -119
  136. data/test/unit/ts_unit.rb +6 -6
  137. metadata +35 -26
  138. data/samples/Auth/LitleAuthReversalTransaction.rb +0 -15
  139. data/samples/Capture/LitleCaptureTransaction.rb +0 -14
  140. data/samples/Capture/LitlePartialCapture.rb +0 -16
  141. data/samples/Credit/LitleCreditTransaction.rb +0 -16
  142. data/samples/Other/LitleVoidTransaction.rb +0 -19
@@ -22,11 +22,11 @@ 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/CnpOnline",__FILE__)
26
26
  require 'test/unit'
27
27
 
28
28
  #test unloadReversal Transaction
29
- module LitleOnline
29
+ module CnpOnline
30
30
  class TestUnloadReversal < Test::Unit::TestCase
31
31
 
32
32
  def test_simple
@@ -35,7 +35,7 @@ def test_simple
35
35
  'version'=>'8.8',
36
36
  'id'=>'test',
37
37
  'reportGroup'=>'Planets',
38
- 'litleTxnId' =>'5000',
38
+ 'cnpTxnId' =>'5000',
39
39
  'card'=>{
40
40
  'type'=>'GC',
41
41
  'number' =>'400000000000001',
@@ -50,7 +50,7 @@ def test_simple
50
50
  'originalSequenceNumber' => '111111',
51
51
  }
52
52
 
53
- response= LitleOnlineRequest.new.deposit_reversal(hash)
53
+ response= CnpOnlineRequest.new.deposit_reversal(hash)
54
54
  assert_equal('000', response.depositReversalResponse.response)
55
55
  end
56
56
 
@@ -63,7 +63,7 @@ def test_simple
63
63
  }
64
64
 
65
65
  #Get exceptions
66
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.unload_reversal(hash)}
66
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.unload_reversal(hash)}
67
67
  #Test
68
68
  assert(exception.message =~ /Error validating xml data against the schema/)
69
69
  end
@@ -22,10 +22,10 @@ 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/CnpOnline",__FILE__)
26
26
  require 'test/unit'
27
27
 
28
- module LitleOnline
28
+ module CnpOnline
29
29
  class TestUpdateCardValidationNumOnToken < Test::Unit::TestCase
30
30
  def test_simple
31
31
  hash = {
@@ -34,10 +34,10 @@ module LitleOnline
34
34
  'id'=>'test',
35
35
  'reportGroup'=>'Planets',
36
36
  'orderId'=>'12344',
37
- 'litleToken'=>'1233456789103801',
37
+ 'cnpToken'=>'1233456789103801',
38
38
  'cardValidationNum'=>'123'
39
39
  }
40
- response= LitleOnlineRequest.new.update_card_validation_num_on_token(hash)
40
+ response= CnpOnlineRequest.new.update_card_validation_num_on_token(hash)
41
41
  assert_equal('Valid Format', response.message)
42
42
  end
43
43
  end
@@ -22,11 +22,11 @@ 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/CnpOnline",__FILE__)
26
26
  require 'test/unit'
27
27
 
28
28
  #test UpdatePlan Transaction
29
- module LitleOnline
29
+ module CnpOnline
30
30
  class TestUpdatePlan < Test::Unit::TestCase
31
31
 
32
32
  def test_simple_happy
@@ -39,7 +39,7 @@ def test_simple_happy
39
39
  'active'=>'true'
40
40
  }
41
41
 
42
- response= LitleOnlineRequest.new.update_plan(hash)
42
+ response= CnpOnlineRequest.new.update_plan(hash)
43
43
  assert_equal('Valid Format', response.message)
44
44
  end
45
45
 
@@ -53,7 +53,7 @@ def test_simple_happy
53
53
  }
54
54
 
55
55
  #Get exceptions
56
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.update_plan(hash)}
56
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.update_plan(hash)}
57
57
  #Test
58
58
  assert(exception.message =~ /Error validating xml data against the schema/)
59
59
  end
@@ -22,11 +22,11 @@ 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/CnpOnline",__FILE__)
26
26
  require 'test/unit'
27
27
 
28
28
  #test Authorization Transaction
29
- module LitleOnline
29
+ module CnpOnline
30
30
  class TestUpdateSubscription < Test::Unit::TestCase
31
31
 
32
32
  def test_simple_happy
@@ -38,7 +38,7 @@ def test_simple_happy
38
38
  'subscriptionId' =>'1001'
39
39
  }
40
40
 
41
- response= LitleOnlineRequest.new.update_subscription(hash)
41
+ response= CnpOnlineRequest.new.update_subscription(hash)
42
42
  assert_equal('Valid Format', response.message)
43
43
  end
44
44
 
@@ -60,7 +60,7 @@ def test_simple_happy
60
60
 
61
61
  }
62
62
 
63
- response= LitleOnlineRequest.new.update_subscription(hash)
63
+ response= CnpOnlineRequest.new.update_subscription(hash)
64
64
  assert_equal('Valid Format', response.message)
65
65
  end
66
66
 
@@ -72,7 +72,7 @@ def test_simple_happy
72
72
  }
73
73
 
74
74
  #Get exceptions
75
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.update_subscription(hash)}
75
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.update_subscription(hash)}
76
76
  #Test
77
77
  assert(exception.message =~ /Error validating xml data against the schema/)
78
78
  end
@@ -22,11 +22,11 @@ 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/CnpOnline",__FILE__)
26
26
  require 'test/unit'
27
27
 
28
28
  #test Authorization Transaction
29
- module LitleOnline
29
+ module CnpOnline
30
30
  class TestAuth < Test::Unit::TestCase
31
31
  def test_simple_auth_with_wallet
32
32
  hash = {
@@ -45,7 +45,7 @@ module LitleOnline
45
45
  'walletSourceType' => 'MasterPass',
46
46
  'walletSourceTypeId' => '102'
47
47
  }}
48
- response= LitleOnlineRequest.new.authorization(hash)
48
+ response= CnpOnlineRequest.new.authorization(hash)
49
49
  assert_equal 'Valid Format', response.message
50
50
  end
51
51
 
@@ -55,7 +55,7 @@ module LitleOnline
55
55
  'id' => 'test',
56
56
  'version'=>'8.8',
57
57
  'reportGroup'=>'Planets',
58
- 'litleTxnId'=>'123456',
58
+ 'cnpTxnId'=>'123456',
59
59
  'orderId'=>'12344',
60
60
  'amount'=>'106',
61
61
  'orderSource'=>'ecommerce',
@@ -67,7 +67,7 @@ module LitleOnline
67
67
  'walletSourceType' => 'MasterPass',
68
68
  'walletSourceTypeId' => '102'
69
69
  }}
70
- response= LitleOnlineRequest.new.sale(hash)
70
+ response= CnpOnlineRequest.new.sale(hash)
71
71
  assert_equal 'Valid Format', response.message
72
72
  end
73
73
  end
@@ -22,10 +22,10 @@ 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/CnpOnline",__FILE__)
26
26
  require 'test/unit'
27
27
 
28
- module LitleOnline
28
+ module CnpOnline
29
29
  class TestXmlfields < Test::Unit::TestCase
30
30
  def test_card_no_required_type_or_track
31
31
  hash = {
@@ -33,7 +33,7 @@ module LitleOnline
33
33
  'id' => 'test',
34
34
  'version'=>'8.8',
35
35
  'reportGroup'=>'Planets',
36
- 'litleTxnId'=>'123456',
36
+ 'cnpTxnId'=>'123456',
37
37
  'orderId'=>'12344',
38
38
  'amount'=>'106',
39
39
  'orderSource'=>'ecommerce',
@@ -43,7 +43,7 @@ module LitleOnline
43
43
  'cardValidationNum'=> '123'
44
44
  }}
45
45
  #Get exceptions
46
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
46
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.sale(hash)}
47
47
  #Test
48
48
  assert(exception.message =~ /Error validating xml data against the schema/)
49
49
  end
@@ -54,7 +54,7 @@ module LitleOnline
54
54
  'id' => 'test',
55
55
  'version'=>'8.8',
56
56
  'reportGroup'=>'Planets',
57
- 'litleTxnId'=>'123456',
57
+ 'cnpTxnId'=>'123456',
58
58
  'orderId'=>'12344',
59
59
  'amount'=>'106',
60
60
  'orderSource'=>'ecommerce',
@@ -64,38 +64,17 @@ module LitleOnline
64
64
  'number' =>'4100000000000000',
65
65
  'expDate' =>'1210'
66
66
  }}
67
- response= LitleOnlineRequest.new.sale(hash)
67
+ response= CnpOnlineRequest.new.sale(hash)
68
68
  assert_equal('Valid Format', response.message)
69
69
  end
70
-
71
- def test_bill_me_later
72
- hash = {
73
- 'merchantId' => '101',
74
- 'id' => 'test',
75
- 'version'=>'8.8',
76
- 'reportGroup'=>'Planets',
77
- 'litleTxnId'=>'123456',
78
- 'orderId'=>'12344',
79
- 'amount'=>'106',
80
- 'orderSource'=>'ecommerce',
81
- 'billMeLaterRequest'=>{'bmlMerchantId'=>'12345','preapprovalNumber'=>'12345678909023',
82
- 'customerPhoneChnaged'=>'False','itemCategoryCode'=>'2'},
83
- 'card'=>{
84
- 'type'=>'VI',
85
- 'number' =>'4100000000000000',
86
- 'expDate' =>'1210'
87
- }}
88
- response= LitleOnlineRequest.new.sale(hash)
89
- assert_equal('000', response.saleResponse.response)
90
- end
91
-
70
+
92
71
  def test__customer_info
93
72
  hash = {
94
73
  'merchantId' => '101',
95
74
  'id' => 'test',
96
75
  'version'=>'8.8',
97
76
  'reportGroup'=>'Planets',
98
- 'litleTxnId'=>'123456',
77
+ 'cnpTxnId'=>'123456',
99
78
  'orderId'=>'12344',
100
79
  'amount'=>'106',
101
80
  'orderSource'=>'ecommerce',
@@ -105,7 +84,7 @@ module LitleOnline
105
84
  'number' =>'4100000000000000',
106
85
  'expDate' =>'1210'
107
86
  }}
108
- response= LitleOnlineRequest.new.sale(hash)
87
+ response= CnpOnlineRequest.new.sale(hash)
109
88
  assert_equal('Valid Format', response.message)
110
89
  end
111
90
 
@@ -118,13 +97,13 @@ module LitleOnline
118
97
  'orderId'=>'12344',
119
98
  'amount'=>'106',
120
99
  'orderSource'=>'ecommerce',
121
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
100
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'},
122
101
  'card'=>{
123
102
  'type'=>'VI',
124
103
  'number' =>'4100000000000000',
125
104
  'expDate' =>'1210'
126
105
  }}
127
- response= LitleOnlineRequest.new.authorization(hash)
106
+ response= CnpOnlineRequest.new.authorization(hash)
128
107
  assert_equal('Valid Format', response.message)
129
108
  end
130
109
 
@@ -143,7 +122,7 @@ module LitleOnline
143
122
  'number' =>'4100000000000000',
144
123
  'expDate' =>'1210'
145
124
  }}
146
- response= LitleOnlineRequest.new.authorization(hash)
125
+ response= CnpOnlineRequest.new.authorization(hash)
147
126
  assert_equal('Valid Format', response.message)
148
127
  end
149
128
 
@@ -162,26 +141,7 @@ module LitleOnline
162
141
  'number' =>'4100000000000000',
163
142
  'expDate' =>'1210'
164
143
  }}
165
- response= LitleOnlineRequest.new.authorization(hash)
166
- assert_equal('Valid Format', response.message)
167
- end
168
-
169
- def test_amex_data
170
- hash = {
171
- 'merchantId' => '101',
172
- 'id' => 'test',
173
- 'version'=>'8.8',
174
- 'reportGroup'=>'Planets',
175
- 'orderId'=>'12344',
176
- 'amount'=>'106',
177
- 'card'=>{
178
- 'type'=>'VI',
179
- 'number' =>'4100000000000000',
180
- 'expDate' =>'1210'},
181
- 'orderSource'=>'ecommerce',
182
- 'amexAggregatorData'=>{'sellerMerchantCategoryCode'=>'1234','sellerId'=>'1234Id'}
183
- }
184
- response= LitleOnlineRequest.new.credit(hash)
144
+ response= CnpOnlineRequest.new.authorization(hash)
185
145
  assert_equal('Valid Format', response.message)
186
146
  end
187
147
 
@@ -201,7 +161,7 @@ module LitleOnline
201
161
  'amexAggregatorData'=>{'sellerMerchantCategoryCode'=>'1234'}
202
162
  }
203
163
  #Get exceptions
204
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
164
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.credit(hash)}
205
165
  #Test
206
166
  assert(exception.message =~ /Error validating xml data against the schema/)
207
167
  end
@@ -220,14 +180,14 @@ module LitleOnline
220
180
  'expDate' =>'1210'},
221
181
  'orderSource'=>'ecommerce',
222
182
  'enhancedData'=>{
223
- 'customerReference'=>'Litle',
183
+ 'customerReference'=>'Cnp',
224
184
  'salesTax'=>'50',
225
185
  'deliveryType'=>'TBD',
226
186
  'restriction'=>'DIG',
227
187
  'shipFromPostalCode'=>'01741',
228
188
  'destinationPostalCode'=>'01742'}
229
189
  }
230
- response= LitleOnlineRequest.new.credit(hash)
190
+ response= CnpOnlineRequest.new.credit(hash)
231
191
  assert_equal('Valid Format', response.message)
232
192
  end
233
193
 
@@ -246,14 +206,14 @@ module LitleOnline
246
206
  'orderSource'=>'ecommerce',
247
207
  'enhancedData'=>{
248
208
  'detailtax'=>{'taxAmount'=>'1234','tax'=>'50'},
249
- 'customerReference'=>'Litle',
209
+ 'customerReference'=>'Cnp',
250
210
  'salesTax'=>'50',
251
211
  'deliveryType'=>'TBD',
252
212
  'restriction'=>'DIG',
253
213
  'shipFromPostalCode'=>'01741',
254
214
  'destinationPostalCode'=>'01742'}
255
215
  }
256
- response= LitleOnlineRequest.new.credit(hash)
216
+ response= CnpOnlineRequest.new.credit(hash)
257
217
  assert_equal('Valid Format', response.message)
258
218
  end
259
219
 
@@ -278,14 +238,14 @@ module LitleOnline
278
238
  'unitOfMeasure'=>'pounds',
279
239
  'enhancedData'=>{
280
240
  'detailtax'=>{'taxAmount'=>'1234','tax'=>'50'}},
281
- 'customerReference'=>'Litle',
241
+ 'customerReference'=>'Cnp',
282
242
  'salesTax'=>'50',
283
243
  'deliveryType'=>'TBD',
284
244
  'restriction'=>'DIG',
285
245
  'shipFromPostalCode'=>'01741',
286
246
  'destinationPostalCode'=>'01742'}
287
247
  }
288
- response= LitleOnlineRequest.new.credit(hash)
248
+ response= CnpOnlineRequest.new.credit(hash)
289
249
  assert_equal('Valid Format', response.message)
290
250
  end
291
251
 
@@ -299,12 +259,12 @@ module LitleOnline
299
259
  'amount'=>'106',
300
260
  'orderSource'=>'ecommerce',
301
261
  'token'=> {
302
- 'litleToken'=>'123456789101112',
262
+ 'cnpToken'=>'123456789101112',
303
263
  'expDate'=>'1210',
304
264
  'cardValidationNum'=>'555',
305
265
  'type'=>'VI'
306
266
  }}
307
- response= LitleOnlineRequest.new.credit(hash)
267
+ response= CnpOnlineRequest.new.credit(hash)
308
268
  assert_equal('Valid Format', response.message)
309
269
  end
310
270
 
@@ -318,10 +278,10 @@ module LitleOnline
318
278
  'amount'=>'106',
319
279
  'orderSource'=>'ecommerce',
320
280
  'token'=> {
321
- 'litleToken'=>'123456789101112',
281
+ 'cnpToken'=>'123456789101112',
322
282
  'type'=>'VI'
323
283
  }}
324
- response= LitleOnlineRequest.new.credit(hash)
284
+ response= CnpOnlineRequest.new.credit(hash)
325
285
  assert_equal('Valid Format', response.message)
326
286
  end
327
287
 
@@ -340,7 +300,7 @@ module LitleOnline
340
300
  'cardValidationNum'=>'555',
341
301
  'type'=>'VI'
342
302
  }}
343
- response= LitleOnlineRequest.new.credit(hash)
303
+ response= CnpOnlineRequest.new.credit(hash)
344
304
  assert_equal('Valid Format', response.message)
345
305
  end
346
306
 
@@ -357,7 +317,7 @@ module LitleOnline
357
317
  'paypageRegistrationId'=>'123456789101112',
358
318
  'type'=>'VI'
359
319
  }}
360
- response= LitleOnlineRequest.new.credit(hash)
320
+ response= CnpOnlineRequest.new.credit(hash)
361
321
  assert_equal('Valid Format', response.message)
362
322
  end
363
323
 
@@ -383,7 +343,7 @@ module LitleOnline
383
343
  ]
384
344
  }
385
345
  }
386
- response= LitleOnlineRequest.new.authorization(hash)
346
+ response= CnpOnlineRequest.new.authorization(hash)
387
347
  assert_equal('Valid Format', response.message)
388
348
  end
389
349
 
@@ -409,7 +369,7 @@ module LitleOnline
409
369
  ]
410
370
  }
411
371
  }
412
- response= LitleOnlineRequest.new.authorization(hash)
372
+ response= CnpOnlineRequest.new.authorization(hash)
413
373
  assert_equal('Valid Format', response.message)
414
374
  end
415
375
 
@@ -443,7 +403,7 @@ module LitleOnline
443
403
  {'taxAmount'=>'6'}
444
404
  ]}
445
405
  }
446
- response= LitleOnlineRequest.new.authorization(hash)
406
+ response= CnpOnlineRequest.new.authorization(hash)
447
407
  assert_equal('Valid Format', response.message)
448
408
  end
449
409
  end
@@ -23,7 +23,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
23
  OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
 
26
- require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
+ require File.expand_path("../../../lib/CnpOnline",__FILE__)
27
27
 
28
28
 
29
29
  #test driver for running all tests
@@ -46,7 +46,7 @@ require_relative 'test_echeckVoid'
46
46
  require_relative 'test_updateCardValidationNumOnToken'
47
47
  require_relative 'test_wallet'
48
48
  require_relative 'test_queryTransaction'
49
- require_relative 'test_litle_requests'
49
+ #require_relative 'test_cnp_requests'
50
50
  require_relative 'test_batch'
51
51
  require_relative 'test_cancelSubscription'
52
52
  require_relative 'test_updateSubscription'