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,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 Test_echeckSale < Test::Unit::TestCase
30
30
  def test_echeck_sale_with_echeck
31
31
  hash = {
@@ -38,9 +38,9 @@ module LitleOnline
38
38
  'orderId'=>'12345',
39
39
  'orderSource'=>'ecommerce',
40
40
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
41
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
41
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
42
42
  }
43
- response= LitleOnlineRequest.new.echeck_sale(hash)
43
+ response= CnpOnlineRequest.new.echeck_sale(hash)
44
44
  assert_equal('Valid Format', response.message)
45
45
  end
46
46
 
@@ -52,7 +52,7 @@ module LitleOnline
52
52
  'reportGroup'=>'Planets'
53
53
  }
54
54
  #Get exceptions
55
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_sale(hash)}
55
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.echeck_sale(hash)}
56
56
  #Test
57
57
  assert(exception.message =~ /The content of element 'echeckSale' is not complete/)
58
58
  end
@@ -68,9 +68,9 @@ module LitleOnline
68
68
  'orderId'=>'12345',
69
69
  'orderSource'=>'ecommerce',
70
70
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
71
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
71
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
72
72
  }
73
- response= LitleOnlineRequest.new.echeck_sale(hash)
73
+ response= CnpOnlineRequest.new.echeck_sale(hash)
74
74
  assert_equal('Valid Format', response.message)
75
75
  end
76
76
 
@@ -85,10 +85,10 @@ module LitleOnline
85
85
  'orderId'=>'12345',
86
86
  'orderSource'=>'ecommerce',
87
87
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
88
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
89
- 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
88
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'},
89
+ 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
90
90
  }
91
- response= LitleOnlineRequest.new.echeck_sale(hash)
91
+ response= CnpOnlineRequest.new.echeck_sale(hash)
92
92
  assert_equal('Valid Format', response.message)
93
93
  end
94
94
 
@@ -102,11 +102,11 @@ module LitleOnline
102
102
  'verify'=>'true',
103
103
  'orderId'=>'12345',
104
104
  'orderSource'=>'ecommerce',
105
- 'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
105
+ 'echeckToken' => {'accType'=>'Checking','cnpToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
106
106
  'customBilling'=>{'phone'=>'123456789','descriptor'=>'good'},
107
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
107
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
108
108
  }
109
- response= LitleOnlineRequest.new.echeck_sale(hash)
109
+ response= CnpOnlineRequest.new.echeck_sale(hash)
110
110
  assert_equal('Valid Format', response.message)
111
111
  end
112
112
 
@@ -122,9 +122,9 @@ module LitleOnline
122
122
  'verify'=>'true',
123
123
  'orderId'=>'12345',
124
124
  'orderSource'=>'ecommerce',
125
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
125
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
126
126
  }
127
- response= LitleOnlineRequest.new.echeck_sale(hash)
127
+ response= CnpOnlineRequest.new.echeck_sale(hash)
128
128
  assert_equal('Valid Format', response.message)
129
129
  end
130
130
 
@@ -142,7 +142,7 @@ module LitleOnline
142
142
  'orderSource'=>'ecommerce',
143
143
  }
144
144
  #Get exceptions
145
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_sale(hash)}
145
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.echeck_sale(hash)}
146
146
  #Test
147
147
  assert(exception.message =~ /Error validating xml data against the schema/)
148
148
  end
@@ -151,15 +151,15 @@ module LitleOnline
151
151
  hash = {
152
152
  'reportGroup'=>'Planets',
153
153
  'id'=>'test',
154
- 'litleTxnId'=>'123456789101112',
154
+ 'cnpTxnId'=>'123456789101112',
155
155
  'orderId'=>'12345',
156
156
  'amount'=>'12',
157
157
  'orderSource'=>'ecommerce',
158
- 'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
159
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
160
- 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
158
+ 'echeckToken' => {'accType'=>'Checking','cnpToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
159
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'},
160
+ 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
161
161
  }
162
- response= LitleOnlineRequest.new.echeck_sale(hash)
162
+ response= CnpOnlineRequest.new.echeck_sale(hash)
163
163
  assert_equal('Valid Format', response.message)
164
164
  end
165
165
 
@@ -167,15 +167,15 @@ module LitleOnline
167
167
  hash = {
168
168
  'reportGroup'=>'Planets',
169
169
  'id'=>'test',
170
- 'litleTxnId'=>'123456',
170
+ 'cnpTxnId'=>'123456',
171
171
  'orderId'=>'12345',
172
172
  'amount'=>'10',
173
173
  'orderSource'=>'ecommerce',
174
- 'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
175
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
176
- 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
174
+ 'echeckToken' => {'accType'=>'Checking','cnpToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
175
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'},
176
+ 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
177
177
  }
178
- response= LitleOnlineRequest.new.echeck_sale(hash)
178
+ response= CnpOnlineRequest.new.echeck_sale(hash)
179
179
  assert_equal('Valid Format', response.message)
180
180
  end
181
181
 
@@ -191,9 +191,9 @@ module LitleOnline
191
191
  'orderId'=>'12345',
192
192
  'orderSource'=>'ecommerce',
193
193
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455','ccdPaymentInformation'=>'12345678901234567890123456789012345678901234567890123456789012345678901234567890'},
194
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
194
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
195
195
  }
196
- response= LitleOnlineRequest.new.echeck_sale(hash)
196
+ response= CnpOnlineRequest.new.echeck_sale(hash)
197
197
  assert_equal('Valid Format', response.message)
198
198
  end
199
199
 
@@ -209,10 +209,10 @@ module LitleOnline
209
209
  'orderId'=>'12345',
210
210
  'orderSource'=>'ecommerce',
211
211
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455','ccdPaymentInformation'=>'123456789012345678901234567890123456789012345678901234567890123456789012345678901'},
212
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
212
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
213
213
  }
214
214
  assert_raises RuntimeError do
215
- response= LitleOnlineRequest.new.echeck_sale(hash)
215
+ response= CnpOnlineRequest.new.echeck_sale(hash)
216
216
  puts "validation for ccdPaymentInformation"
217
217
  end
218
218
  end
@@ -221,12 +221,12 @@ module LitleOnline
221
221
  hash = {
222
222
  'reportGroup'=>'Planets',
223
223
  'id'=>'test',
224
- 'litleTxnId'=>'123456789101112',
224
+ 'cnpTxnId'=>'123456789101112',
225
225
  'amount'=>'12',
226
226
  'secondaryAmount'=>'50'
227
227
  }
228
228
  #Get exceptions
229
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_sale(hash)}
229
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.echeck_sale(hash)}
230
230
  #Test
231
231
  assert(exception.message =~ /Error validating xml data against the schema/)
232
232
  end
@@ -242,12 +242,12 @@ module LitleOnline
242
242
  'orderId'=>'12345',
243
243
  'orderSource'=>'ecommerce',
244
244
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
245
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
246
- 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
245
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'},
246
+ 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'},
247
247
  'merchantData'=>{'campaign'=>'camping'},
248
248
  'customIdentifier' =>'identifier',
249
249
  }
250
- response= LitleOnlineRequest.new.echeck_sale(hash)
250
+ response= CnpOnlineRequest.new.echeck_sale(hash)
251
251
  assert_equal('Valid Format', response.message)
252
252
  end
253
253
 
@@ -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 Test_echeckVerification < Test::Unit::TestCase
30
30
 
31
31
  def test_simple_echeck_verification
@@ -38,9 +38,9 @@ module LitleOnline
38
38
  'orderId'=>'12345',
39
39
  'orderSource'=>'ecommerce',
40
40
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
41
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
41
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
42
42
  }
43
- response= LitleOnlineRequest.new.echeck_verification(hash)
43
+ response= CnpOnlineRequest.new.echeck_verification(hash)
44
44
  assert_equal('Valid Format', response.message)
45
45
  end
46
46
 
@@ -53,10 +53,10 @@ module LitleOnline
53
53
  'amount'=>'123456',
54
54
  'orderId'=>'12345',
55
55
  'orderSource'=>'ecommerce',
56
- 'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
57
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
56
+ 'echeckToken' => {'accType'=>'Checking','cnpToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
57
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
58
58
  }
59
- response= LitleOnlineRequest.new.echeck_verification(hash)
59
+ response= CnpOnlineRequest.new.echeck_verification(hash)
60
60
  assert_equal('Valid Format', response.message)
61
61
  end
62
62
 
@@ -71,9 +71,9 @@ module LitleOnline
71
71
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
72
72
  'orderId'=>'12345',
73
73
  'orderSource'=>'ecommerce',
74
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
74
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
75
75
  }
76
- response= LitleOnlineRequest.new.echeck_verification(hash)
76
+ response= CnpOnlineRequest.new.echeck_verification(hash)
77
77
  assert_equal('Valid Format', response.message)
78
78
  end
79
79
 
@@ -90,7 +90,7 @@ module LitleOnline
90
90
  'orderSource'=>'ecommerce',
91
91
  }
92
92
  #Get exceptions
93
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
93
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.echeck_verification(hash)}
94
94
  #Test
95
95
  assert(exception.message =~ /Error validating xml data against the schema/)
96
96
  end
@@ -104,7 +104,7 @@ module LitleOnline
104
104
  'orderId'=>'12345'
105
105
  }
106
106
  #Get exceptions
107
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
107
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.echeck_verification(hash)}
108
108
  #Test
109
109
  assert(exception.message =~ /Error validating xml data against the schema/)
110
110
  end
@@ -117,7 +117,7 @@ module LitleOnline
117
117
  'reportGroup'=>'Planets',
118
118
  }
119
119
  #Get exceptions
120
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
120
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.echeck_verification(hash)}
121
121
  #Test
122
122
  assert(exception.message =~ /Error validating xml data against the schema/)
123
123
  end
@@ -132,12 +132,12 @@ module LitleOnline
132
132
  'orderId'=>'12345'
133
133
  }
134
134
  #Get exceptions
135
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_verification(hash)}
135
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.echeck_verification(hash)}
136
136
  #Test
137
137
  assert(exception.message =~ /Error validating xml data against the schema/)
138
138
  end
139
139
 
140
- def test_no_litleTxnId
140
+ def test_no_cnpTxnId
141
141
  hash = {
142
142
  'merchantId' => '101',
143
143
  'version'=>'8.8',
@@ -145,13 +145,13 @@ module LitleOnline
145
145
  'reportGroup'=>'Planets',
146
146
  'amount'=>'123',
147
147
  'invalidfield'=>'nonexistant',
148
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
148
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'},
149
149
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
150
150
  'orderId'=>'12345',
151
151
  'orderSource'=>'ecommerce',
152
- #'litleTxnId'=>'123456',
152
+ #'cnpTxnId'=>'123456',
153
153
  }
154
- response= LitleOnlineRequest.new.echeck_verification(hash)
154
+ response= CnpOnlineRequest.new.echeck_verification(hash)
155
155
  assert_equal('Valid Format', response.message)
156
156
  end
157
157
 
@@ -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 TestAuthReversal < Test::Unit::TestCase
30
30
  def test_simple_echeck_void
31
31
  hash = {
@@ -33,9 +33,9 @@ module LitleOnline
33
33
  'id' => 'test',
34
34
  'version'=>'8.8',
35
35
  'reportGroup'=>'Planets',
36
- 'litleTxnId'=>'12345678000',
36
+ 'cnpTxnId'=>'12345678000',
37
37
  }
38
- response= LitleOnlineRequest.new.echeck_void(hash)
38
+ response= CnpOnlineRequest.new.echeck_void(hash)
39
39
  assert_equal('0', response.response)
40
40
  end
41
41
  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 TestForceCapture < Test::Unit::TestCase
30
30
  def test_simple_force_capture_with_card
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',
@@ -42,7 +42,7 @@ module LitleOnline
42
42
  'number' =>'4100000000000001',
43
43
  'expDate' =>'1210'
44
44
  }}
45
- response= LitleOnlineRequest.new.force_capture(hash)
45
+ response= CnpOnlineRequest.new.force_capture(hash)
46
46
 
47
47
  assert_equal('0', response.response)
48
48
 
@@ -54,17 +54,17 @@ 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',
61
61
  'token'=> {
62
- 'litleToken'=>'123456789101112',
62
+ 'cnpToken'=>'123456789101112',
63
63
  'expDate'=>'1210',
64
64
  'cardValidationNum'=>'555',
65
65
  'type'=>'VI'
66
66
  }}
67
- response= LitleOnlineRequest.new.force_capture(hash)
67
+ response= CnpOnlineRequest.new.force_capture(hash)
68
68
  assert_equal('Valid Format', response.message)
69
69
  end
70
70
 
@@ -74,7 +74,7 @@ module LitleOnline
74
74
  'id' => 'test',
75
75
  'version'=>'8.8',
76
76
  'orderSource'=>'ecommerce',
77
- 'litleTxnId'=>'123456',
77
+ 'cnpTxnId'=>'123456',
78
78
  'amount'=>'106',
79
79
  'card'=>{
80
80
  'type'=>'VI',
@@ -84,7 +84,7 @@ module LitleOnline
84
84
  'reportGroup'=>'Planets',
85
85
  'orderId'=>'12344'
86
86
  }
87
- response= LitleOnlineRequest.new.force_capture(hash)
87
+ response= CnpOnlineRequest.new.force_capture(hash)
88
88
  assert_equal('Valid Format', response.message)
89
89
  end
90
90
 
@@ -94,7 +94,7 @@ module LitleOnline
94
94
  'id' => 'test',
95
95
  'version'=>'8.8',
96
96
  'reportGroup'=>'Planets',
97
- 'litleTxnId'=>'123456',
97
+ 'cnpTxnId'=>'123456',
98
98
  'orderId'=>'12344',
99
99
  'amount'=>'106',
100
100
  'orderSource'=>'ecommerce',
@@ -104,7 +104,7 @@ module LitleOnline
104
104
  'number' =>'4100000000000001',
105
105
  'expDate' =>'1210'
106
106
  }}
107
- response= LitleOnlineRequest.new.force_capture(hash)
107
+ response= CnpOnlineRequest.new.force_capture(hash)
108
108
  assert_equal('Valid Format', response.message)
109
109
  end
110
110
 
@@ -114,17 +114,17 @@ module LitleOnline
114
114
  'id' => 'test',
115
115
  'version'=>'8.8',
116
116
  'reportGroup'=>'Planets',
117
- 'litleTxnId'=>'123456',
117
+ 'cnpTxnId'=>'123456',
118
118
  'amount'=>'106',
119
119
  'orderSource'=>'ecommerce',
120
120
  'token'=> {
121
- 'litleToken'=>'123456789101112',
121
+ 'cnpToken'=>'123456789101112',
122
122
  'expDate'=>'1210',
123
123
  'cardValidationNum'=>'555',
124
124
  'type'=>'VI'
125
125
  }}
126
126
  #Get exceptions
127
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.force_capture(hash)}
127
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.force_capture(hash)}
128
128
  #Test
129
129
  assert(exception.message =~ /Error validating xml data against the schema/)
130
130
  end
@@ -135,7 +135,7 @@ module LitleOnline
135
135
  'id' => 'test',
136
136
  'version'=>'8.8',
137
137
  'reportGroup'=>'Planets',
138
- 'litleTxnId'=>'123456',
138
+ 'cnpTxnId'=>'123456',
139
139
  'orderId'=>'12344',
140
140
  'amount'=>'106',
141
141
  'card'=>{
@@ -144,7 +144,7 @@ module LitleOnline
144
144
  'expDate' =>'1210'
145
145
  }}
146
146
  #Get exceptions
147
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.force_capture(hash)}
147
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.force_capture(hash)}
148
148
  #Test
149
149
  assert(exception.message =~ /Error validating xml data against the schema/)
150
150
  end
@@ -155,7 +155,7 @@ module LitleOnline
155
155
  'id' => 'test',
156
156
  'version'=>'8.8',
157
157
  'reportGroup'=>'Planets',
158
- 'litleTxnId'=>'123456',
158
+ 'cnpTxnId'=>'123456',
159
159
  'orderId'=>'12344',
160
160
  'amount'=>'106',
161
161
  'orderSource'=>'ecommerce',
@@ -168,7 +168,7 @@ module LitleOnline
168
168
  'track2Status'=>'0'
169
169
  }
170
170
  }
171
- response= LitleOnlineRequest.new.force_capture(hash)
171
+ response= CnpOnlineRequest.new.force_capture(hash)
172
172
  assert_equal('0', response.response)
173
173
 
174
174
  end
@@ -179,7 +179,7 @@ module LitleOnline
179
179
  'id' => 'test',
180
180
  'version'=>'8.8',
181
181
  'reportGroup'=>'Planets',
182
- 'litleTxnId'=>'123456',
182
+ 'cnpTxnId'=>'123456',
183
183
  'orderId'=>'12344',
184
184
  'amount'=>'106',
185
185
  'secondaryAmount'=>'20',
@@ -189,7 +189,7 @@ module LitleOnline
189
189
  'number' =>'4100000000000001',
190
190
  'expDate' =>'1210'
191
191
  }}
192
- response= LitleOnlineRequest.new.force_capture(hash)
192
+ response= CnpOnlineRequest.new.force_capture(hash)
193
193
  assert_equal('000', response.forceCaptureResponse.response)
194
194
  end
195
195
 
@@ -208,7 +208,7 @@ module LitleOnline
208
208
  'number' =>'4100000000000001',
209
209
  'expDate' =>'1210'
210
210
  }}
211
- response= LitleOnlineRequest.new.force_capture(hash)
211
+ response= CnpOnlineRequest.new.force_capture(hash)
212
212
 
213
213
  assert_equal('0', response.response)
214
214