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 TestCredit < Test::Unit::TestCase
30
30
  def test_simple_credit_with_card
31
31
  hash = {
@@ -41,7 +41,7 @@ module LitleOnline
41
41
  'number' =>'4100000000000001',
42
42
  'expDate' =>'1210'
43
43
  }}
44
- response= LitleOnlineRequest.new.credit(hash)
44
+ response= CnpOnlineRequest.new.credit(hash)
45
45
  assert_equal('Valid Format', response.message)
46
46
  end
47
47
 
@@ -58,7 +58,7 @@ module LitleOnline
58
58
  'payerId'=>'1234',
59
59
  'transactionId'=>'1234',
60
60
  }}
61
- response= LitleOnlineRequest.new.credit(hash)
61
+ response= CnpOnlineRequest.new.credit(hash)
62
62
  assert_equal('Valid Format', response.message)
63
63
  end
64
64
 
@@ -76,7 +76,7 @@ module LitleOnline
76
76
  'payerId'=>'1234',
77
77
  'transactionId'=>'1234',
78
78
  }}
79
- response= LitleOnlineRequest.new.credit(hash)
79
+ response= CnpOnlineRequest.new.credit(hash)
80
80
  assert_equal('Valid Format', response.message)
81
81
  end
82
82
 
@@ -88,9 +88,9 @@ module LitleOnline
88
88
  'reportGroup'=>'Planets',
89
89
  'amount'=>'106',
90
90
  'secondaryAmount'=>'50',
91
- 'litleTxnId'=>'123456'
91
+ 'cnpTxnId'=>'123456'
92
92
  }
93
- response= LitleOnlineRequest.new.credit(hash)
93
+ response= CnpOnlineRequest.new.credit(hash)
94
94
  assert_equal('Valid Format', response.message)
95
95
  end
96
96
 
@@ -109,7 +109,7 @@ module LitleOnline
109
109
  'orderSource'=>'ecommerce',
110
110
  'amount'=>'106'
111
111
  }
112
- response= LitleOnlineRequest.new.credit(hash)
112
+ response= CnpOnlineRequest.new.credit(hash)
113
113
  assert_equal('Valid Format', response.message)
114
114
  end
115
115
 
@@ -128,7 +128,7 @@ module LitleOnline
128
128
  'number' =>'4100000000000001',
129
129
  'expDate' =>'1210'
130
130
  }}
131
- response= LitleOnlineRequest.new.credit(hash)
131
+ response= CnpOnlineRequest.new.credit(hash)
132
132
  assert_equal('Valid Format', response.message)
133
133
  end
134
134
 
@@ -147,27 +147,7 @@ module LitleOnline
147
147
  'number' =>'4100000000000001',
148
148
  'expDate' =>'1210'
149
149
  }}
150
- response= LitleOnlineRequest.new.credit(hash)
151
- assert_equal('Valid Format', response.message)
152
- end
153
-
154
- def test_processing_instructions_and_amex_data
155
- hash = {
156
- 'merchantId' => '101',
157
- 'id' => '102',
158
- 'version'=>'8.8',
159
- 'reportGroup'=>'Planets',
160
- 'amount'=>'2000',
161
- 'orderId'=>'12344',
162
- 'orderSource'=>'ecommerce',
163
- 'processingInstuctions'=>{'bypassVelocityCheck'=>'yes'},
164
- 'card'=>{
165
- 'type'=>'VI',
166
- 'number' =>'4100000000000001',
167
- 'expDate' =>'1210'},
168
- 'amexAggregatorData'=>{'sellerMerchantCategoryCode'=>'1234','sellerId'=>'1234Id'}
169
- }
170
- response= LitleOnlineRequest.new.credit(hash)
150
+ response= CnpOnlineRequest.new.credit(hash)
171
151
  assert_equal('Valid Format', response.message)
172
152
  end
173
153
 
@@ -189,7 +169,7 @@ module LitleOnline
189
169
  'track2Status'=>'0'
190
170
  }
191
171
  }
192
- response= LitleOnlineRequest.new.credit(hash)
172
+ response= CnpOnlineRequest.new.credit(hash)
193
173
  assert_equal('Valid Format', response.message)
194
174
  end
195
175
 
@@ -200,10 +180,10 @@ module LitleOnline
200
180
  'reportGroup'=>'Planets',
201
181
  'amount'=>'106',
202
182
  'secondaryAmount'=>'20',
203
- 'litleTxnId'=>'123456000',
183
+ 'cnpTxnId'=>'123456000',
204
184
  'pin'=>'1234'
205
185
  }
206
- response= LitleOnlineRequest.new.credit(hash)
186
+ response= CnpOnlineRequest.new.credit(hash)
207
187
  assert_equal('Valid Format', response.message)
208
188
  assert_equal('000', response.creditResponse.response)
209
189
  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 Deactivate Transaction
29
- module LitleOnline
29
+ module CnpOnline
30
30
  class TestDeactivate < Test::Unit::TestCase
31
31
 
32
32
  def test_simple_happy
@@ -44,7 +44,7 @@ def test_simple_happy
44
44
  }
45
45
  }
46
46
 
47
- response= LitleOnlineRequest.new.deactivate(hash)
47
+ response= CnpOnlineRequest.new.deactivate(hash)
48
48
  assert_equal('Valid Format', response.message)
49
49
  end
50
50
 
@@ -63,7 +63,7 @@ def test_simple_happy
63
63
  }
64
64
  }
65
65
 
66
- response= LitleOnlineRequest.new.deactivate(hash)
66
+ response= CnpOnlineRequest.new.deactivate(hash)
67
67
  assert_equal('Valid Format', response.message)
68
68
  end
69
69
 
@@ -76,7 +76,7 @@ def test_simple_happy
76
76
  }
77
77
 
78
78
  #Get exceptions
79
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.deactivate(hash)}
79
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.deactivate(hash)}
80
80
  #Test
81
81
  assert(exception.message =~ /Error validating xml data against the schema/)
82
82
  end
@@ -96,7 +96,7 @@ def test_simple_happy
96
96
  }
97
97
  }
98
98
  #Get exceptions
99
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.deactivate(hash)}
99
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.deactivate(hash)}
100
100
  #Test
101
101
  assert(exception.message =~ /Error validating xml data against the schema/)
102
102
  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 DeactivateReversal Transaction
29
- module LitleOnline
29
+ module CnpOnline
30
30
  class TestDectivateReversal < 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.deactivate_reversal(hash)}
66
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.deactivate_reversal(hash)}
67
67
  #Test
68
68
  assert(exception.message =~ /Error validating xml data against the schema/)
69
69
  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 DepositReversal Transaction
29
- module LitleOnline
29
+ module CnpOnline
30
30
  class TestDepositReversal < Test::Unit::TestCase
31
31
  def test_simple
32
32
  hash = {
@@ -34,7 +34,7 @@ module LitleOnline
34
34
  'version'=>'8.8',
35
35
  'id'=>'test',
36
36
  'reportGroup'=>'Planets',
37
- 'litleTxnId' =>'5000',
37
+ 'cnpTxnId' =>'5000',
38
38
  'card'=>{
39
39
  'type'=>'GC',
40
40
  'number' =>'400000000000000',
@@ -49,7 +49,7 @@ module LitleOnline
49
49
  'originalSequenceNumber' => '111111',
50
50
  }
51
51
 
52
- response= LitleOnlineRequest.new.deposit_reversal(hash)
52
+ response= CnpOnlineRequest.new.deposit_reversal(hash)
53
53
  assert_equal('000', response.depositReversalResponse.response)
54
54
  end
55
55
 
@@ -62,7 +62,7 @@ module LitleOnline
62
62
  }
63
63
 
64
64
  #Get exceptions
65
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.deposit_reversal(hash)}
65
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.deposit_reversal(hash)}
66
66
  #Test
67
67
  assert(exception.message =~ /Error validating xml data against the schema/)
68
68
  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 Test_echeckCredit < Test::Unit::TestCase
30
30
  def test_simple_echeckcredit
31
31
  hash = {
@@ -33,10 +33,10 @@ module LitleOnline
33
33
  'version'=>'8.8',
34
34
  'id'=>'test',
35
35
  'reportGroup'=>'Planets',
36
- 'litleTxnId'=>'123456789101112',
36
+ 'cnpTxnId'=>'123456789101112',
37
37
  'amount'=>'12'
38
38
  }
39
- response= LitleOnlineRequest.new.echeck_credit(hash)
39
+ response= CnpOnlineRequest.new.echeck_credit(hash)
40
40
  assert_equal('Valid Format', response.message)
41
41
  end
42
42
 
@@ -48,7 +48,7 @@ module LitleOnline
48
48
  'reportGroup'=>'Planets',
49
49
  }
50
50
  #Get exceptions
51
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_credit(hash)}
51
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.echeck_credit(hash)}
52
52
  #Test
53
53
  assert(exception.message =~ /Error validating xml data against the schema/)
54
54
  end
@@ -64,9 +64,9 @@ module LitleOnline
64
64
  'orderId'=>'12345',
65
65
  'orderSource'=>'ecommerce',
66
66
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
67
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
67
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
68
68
  }
69
- response= LitleOnlineRequest.new.echeck_credit(hash)
69
+ response= CnpOnlineRequest.new.echeck_credit(hash)
70
70
  assert_equal('Valid Format', response.message)
71
71
  end
72
72
 
@@ -80,10 +80,10 @@ module LitleOnline
80
80
  'verify'=>'true',
81
81
  'orderId'=>'12345',
82
82
  'orderSource'=>'ecommerce',
83
- 'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
84
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
83
+ 'echeckToken' => {'accType'=>'Checking','cnpToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
84
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
85
85
  }
86
- response= LitleOnlineRequest.new.echeck_credit(hash)
86
+ response= CnpOnlineRequest.new.echeck_credit(hash)
87
87
  assert_equal('Valid Format', response.message)
88
88
  end
89
89
 
@@ -99,9 +99,9 @@ module LitleOnline
99
99
  'verify'=>'true',
100
100
  'orderId'=>'12345',
101
101
  'orderSource'=>'ecommerce',
102
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
102
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
103
103
  }
104
- response= LitleOnlineRequest.new.echeck_credit(hash)
104
+ response= CnpOnlineRequest.new.echeck_credit(hash)
105
105
  assert_equal('Valid Format', response.message)
106
106
  end
107
107
 
@@ -119,7 +119,7 @@ module LitleOnline
119
119
  'orderSource'=>'ecommerce',
120
120
  }
121
121
  #Get exceptions
122
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_credit(hash)}
122
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.echeck_credit(hash)}
123
123
  #Test
124
124
  assert(exception.message =~ /Error validating xml data against the schema/)
125
125
  end
@@ -136,9 +136,9 @@ module LitleOnline
136
136
  'orderId'=>'12345',
137
137
  'orderSource'=>'ecommerce',
138
138
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
139
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
139
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'}
140
140
  }
141
- response= LitleOnlineRequest.new.echeck_credit(hash)
141
+ response= CnpOnlineRequest.new.echeck_credit(hash)
142
142
  assert_equal('Valid Format', response.message)
143
143
  end
144
144
 
@@ -148,11 +148,11 @@ module LitleOnline
148
148
  'version'=>'8.8',
149
149
  'id'=>'test',
150
150
  'reportGroup'=>'Planets',
151
- 'litleTxnId'=>'123456789101112',
151
+ 'cnpTxnId'=>'123456789101112',
152
152
  'amount'=>'12',
153
153
  'secondaryAmount'=>'50'
154
154
  }
155
- response= LitleOnlineRequest.new.echeck_credit(hash)
155
+ response= CnpOnlineRequest.new.echeck_credit(hash)
156
156
  assert_equal('Valid Format', response.message)
157
157
  end
158
158
 
@@ -167,12 +167,12 @@ module LitleOnline
167
167
  'orderId'=>'12345',
168
168
  'orderSource'=>'ecommerce',
169
169
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
170
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
171
- 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
170
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'},
171
+ 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'},
172
172
  'merchantData'=>{'campaign'=>'camping'},
173
173
  'customIdentifier' =>'identifier',
174
174
  }
175
- response= LitleOnlineRequest.new.echeck_credit(hash)
175
+ response= CnpOnlineRequest.new.echeck_credit(hash)
176
176
  assert_equal('Valid Format', response.message)
177
177
  end
178
178
  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 Test_echeckRedeposit < Test::Unit::TestCase
30
30
  def test_simple_echeck_redeposit
31
31
  hash = {
@@ -33,9 +33,9 @@ module LitleOnline
33
33
  'version'=>'8.8',
34
34
  'id'=>'test',
35
35
  'reportGroup'=>'Planets',
36
- 'litleTxnId'=>'123456'
36
+ 'cnpTxnId'=>'123456'
37
37
  }
38
- response= LitleOnlineRequest.new.echeck_redeposit(hash)
38
+ response= CnpOnlineRequest.new.echeck_redeposit(hash)
39
39
  assert_equal('Valid Format', response.message)
40
40
  end
41
41
 
@@ -45,10 +45,10 @@ module LitleOnline
45
45
  'version'=>'8.8',
46
46
  'id'=>'test',
47
47
  'reportGroup'=>'Planets',
48
- 'litleTxnId'=>'123456',
48
+ 'cnpTxnId'=>'123456',
49
49
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'}
50
50
  }
51
- response= LitleOnlineRequest.new.echeck_redeposit(hash)
51
+ response= CnpOnlineRequest.new.echeck_redeposit(hash)
52
52
  assert_equal('Valid Format', response.message)
53
53
  end
54
54
 
@@ -58,11 +58,11 @@ module LitleOnline
58
58
  'version'=>'8.8',
59
59
  'id'=>'test',
60
60
  'reportGroup'=>'Planets',
61
- 'litleTxnId'=>'123456',
62
- 'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
61
+ 'cnpTxnId'=>'123456',
62
+ 'echeckToken' => {'accType'=>'Checking','cnpToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
63
63
 
64
64
  }
65
- response= LitleOnlineRequest.new.echeck_redeposit(hash)
65
+ response= CnpOnlineRequest.new.echeck_redeposit(hash)
66
66
  assert_equal('Valid Format', response.message)
67
67
  end
68
68
 
@@ -74,9 +74,9 @@ module LitleOnline
74
74
  'reportGroup'=>'Planets',
75
75
  'invalidfield'=>'nonexistant',
76
76
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
77
- 'litleTxnId'=>'123456'
77
+ 'cnpTxnId'=>'123456'
78
78
  }
79
- response= LitleOnlineRequest.new.echeck_redeposit(hash)
79
+ response= CnpOnlineRequest.new.echeck_redeposit(hash)
80
80
  assert_equal('Valid Format', response.message)
81
81
  end
82
82
 
@@ -87,7 +87,7 @@ module LitleOnline
87
87
  'reportGroup'=>'Planets',
88
88
  }
89
89
  #Get exceptions
90
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.echeck_redeposit(hash)}
90
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.echeck_redeposit(hash)}
91
91
  #Test
92
92
  assert(exception.message =~ /Error validating xml data against the schema/)
93
93
  end
@@ -101,15 +101,15 @@ module LitleOnline
101
101
  'amount'=>'123456',
102
102
  'verify'=>'true',
103
103
  'orderId'=>'12345',
104
- 'litleTxnId'=>'123456',
104
+ 'cnpTxnId'=>'123456',
105
105
  'orderSource'=>'ecommerce',
106
106
  'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
107
- 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
108
- 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
107
+ 'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'},
108
+ 'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'cnp.com'},
109
109
  'merchantData'=>{'campaign'=>'camping'},
110
110
  'customIdentifier' =>'identifier',
111
111
  }
112
- response= LitleOnlineRequest.new.echeck_redeposit(hash)
112
+ response= CnpOnlineRequest.new.echeck_redeposit(hash)
113
113
  assert_equal('Valid Format', response.message)
114
114
  end
115
115