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,24 +22,24 @@ 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
  require 'mocha/setup'
28
28
 
29
- module LitleOnline
29
+ module CnpOnline
30
30
  class TestAuthReversal < Test::Unit::TestCase
31
31
  def test_invalid_field
32
32
  hash = {
33
33
  'merchantId' => '101',
34
34
  'version'=>'8.8',
35
- 'litleTxnId'=>'12345678000',
35
+ 'cnpTxnId'=>'12345678000',
36
36
  'NonexistentField'=>'none',
37
37
  'payPalNotes'=>'Notes',
38
38
  'amount'=>'106',
39
39
  'reportGroup'=>'Planets',
40
40
  }
41
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>12345678000<\/litleTxnId>.*/m), is_a(Hash))
42
- LitleOnlineRequest.new.auth_reversal(hash)
41
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<cnpTxnId>12345678000<\/cnpTxnId>.*/m), is_a(Hash))
42
+ CnpOnlineRequest.new.auth_reversal(hash)
43
43
  end
44
44
 
45
45
  def test_logged_in_user
@@ -47,36 +47,36 @@ module LitleOnline
47
47
  'merchantSdk' => 'Ruby;8.14.0',
48
48
  'merchantId' => '101',
49
49
  'version'=>'8.8',
50
- 'litleTxnId'=>'12345678000',
50
+ 'cnpTxnId'=>'12345678000',
51
51
  'reportGroup'=>'Planets',
52
52
  'amount'=>'5000',
53
53
  'loggedInUser'=>'gdake'
54
54
  }
55
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
56
- LitleOnlineRequest.new.auth_reversal(hash)
55
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
56
+ CnpOnlineRequest.new.auth_reversal(hash)
57
57
  end
58
58
 
59
59
  def test_surcharge_amount
60
60
  hash = {
61
- 'litleTxnId' => '3',
61
+ 'cnpTxnId' => '3',
62
62
  'amount' => '2',
63
63
  'surchargeAmount' => '1',
64
64
  'payPalNotes' => 'note',
65
65
  'reportGroup' => 'Planets'
66
66
  }
67
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><payPalNotes>note<\/payPalNotes>.*/m), is_a(Hash))
68
- LitleOnlineRequest.new.auth_reversal(hash)
67
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><payPalNotes>note<\/payPalNotes>.*/m), is_a(Hash))
68
+ CnpOnlineRequest.new.auth_reversal(hash)
69
69
  end
70
70
 
71
71
  def test_surcharge_amount_optional
72
72
  hash = {
73
- 'litleTxnId' => '3',
73
+ 'cnpTxnId' => '3',
74
74
  'amount' => '2',
75
75
  'payPalNotes' => 'note',
76
76
  'reportGroup' => 'Planets'
77
77
  }
78
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><payPalNotes>note<\/payPalNotes>.*/m), is_a(Hash))
79
- LitleOnlineRequest.new.auth_reversal(hash)
78
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><payPalNotes>note<\/payPalNotes>.*/m), is_a(Hash))
79
+ CnpOnlineRequest.new.auth_reversal(hash)
80
80
  end
81
81
  end
82
82
  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
  require 'mocha/setup'
28
- module LitleOnline
28
+ module CnpOnline
29
29
  class TestBalanceInquiry < Test::Unit::TestCase
30
30
 
31
31
  def test_simple
@@ -43,8 +43,8 @@ module LitleOnline
43
43
  }
44
44
  }
45
45
 
46
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<balanceInquiry reportGroup="Planets"><orderId>11<\/orderId><orderSource>ecommerce<\/orderSource><card><type>GC<\/type><number>4100000000000001<\/number><expDate>1210<\/expDate><\/card><\/balanceInquiry>.*/m), is_a(Hash))
47
- LitleOnlineRequest.new.balance_inquiry(hash)
46
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<balanceInquiry reportGroup="Planets"><orderId>11<\/orderId><orderSource>ecommerce<\/orderSource><card><type>GC<\/type><number>4100000000000001<\/number><expDate>1210<\/expDate><\/card><\/balanceInquiry>.*/m), is_a(Hash))
47
+ CnpOnlineRequest.new.balance_inquiry(hash)
48
48
  end
49
49
 
50
50
  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
  require 'mocha/setup'
28
- module LitleOnline
28
+ module CnpOnline
29
29
  class TestCancelSubscription < Test::Unit::TestCase
30
30
 
31
31
  def test_simple
@@ -34,8 +34,8 @@ module LitleOnline
34
34
  'merchantId' => '101',
35
35
  'version'=>'8.8',
36
36
  }
37
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<cancelSubscription><subscriptionId>100<\/subscriptionId><\/cancelSubscription>.*/m), is_a(Hash))
38
- LitleOnlineRequest.new.cancel_subscription(hash)
37
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<cancelSubscription><subscriptionId>100<\/subscriptionId><\/cancelSubscription>.*/m), is_a(Hash))
38
+ CnpOnlineRequest.new.cancel_subscription(hash)
39
39
  end
40
40
 
41
41
  end
@@ -22,76 +22,76 @@ 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
  require 'mocha/setup'
28
28
 
29
- module LitleOnline
29
+ module CnpOnline
30
30
  class Test_capture < Test::Unit::TestCase
31
31
  def test_success_capture
32
32
  hash = {
33
- 'litleTxnId'=>'123456'
33
+ 'cnpTxnId'=>'123456'
34
34
  }
35
35
 
36
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>123456<\/litleTxnId>.*/m), is_a(Hash))
37
- LitleOnlineRequest.new.capture(hash)
36
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<cnpTxnId>123456<\/cnpTxnId>.*/m), is_a(Hash))
37
+ CnpOnlineRequest.new.capture(hash)
38
38
  end
39
39
  def test_logged_in_user
40
40
  hash = {
41
41
  'merchantSdk' => 'Ruby;8.14.0',
42
- 'litleTxnId'=>'123456',
42
+ 'cnpTxnId'=>'123456',
43
43
  'loggedInUser'=>'gdake'
44
44
  }
45
45
 
46
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
47
- LitleOnlineRequest.new.capture(hash)
46
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
47
+ CnpOnlineRequest.new.capture(hash)
48
48
  end
49
49
  def test_surcharge_amount
50
50
  hash = {
51
- 'litleTxnId' => '3',
51
+ 'cnpTxnId' => '3',
52
52
  'amount' => '2',
53
53
  'surchargeAmount' => '1',
54
54
  'payPalNotes' => 'note',
55
55
  'reportGroup' => 'Planets'
56
56
  }
57
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><payPalNotes>note<\/payPalNotes>.*/m), is_a(Hash))
58
- LitleOnlineRequest.new.capture(hash)
57
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><payPalNotes>note<\/payPalNotes>.*/m), is_a(Hash))
58
+ CnpOnlineRequest.new.capture(hash)
59
59
  end
60
60
 
61
61
  def test_surcharge_amount_optional
62
62
  hash = {
63
- 'litleTxnId' => '3',
63
+ 'cnpTxnId' => '3',
64
64
  'amount' => '2',
65
65
  'payPalNotes' => 'note',
66
66
  'reportGroup' => 'Planets'
67
67
  }
68
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><payPalNotes>note<\/payPalNotes>.*/m), is_a(Hash))
69
- LitleOnlineRequest.new.capture(hash)
68
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><payPalNotes>note<\/payPalNotes>.*/m), is_a(Hash))
69
+ CnpOnlineRequest.new.capture(hash)
70
70
  end
71
71
 
72
72
  def test_pin
73
73
  hash = {
74
- 'litleTxnId' => '123456000',
74
+ 'cnpTxnId' => '123456000',
75
75
  'amount' => '2',
76
76
  'payPalNotes' => 'note',
77
77
  'pin' => '1234'
78
78
  }
79
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<pin>1234<\/pin>.*/m), is_a(Hash))
80
- LitleOnlineRequest.new.capture(hash)
79
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<pin>1234<\/pin>.*/m), is_a(Hash))
80
+ CnpOnlineRequest.new.capture(hash)
81
81
  end
82
82
 
83
83
  def test_custom_billing
84
84
  hash = {
85
85
  'payPalNotes'=>'Notes',
86
- 'litleTxnId'=>'123456000',
86
+ 'cnpTxnId'=>'123456000',
87
87
  'amount'=>'106',
88
88
  'customBilling'=>{
89
89
  'city' =>'boston',
90
90
  'descriptor' => 'card was present',
91
91
  }
92
92
  }
93
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<customBilling><city>boston<\/city><descriptor>card was present<\/descriptor><\/customBilling>.*/m), is_a(Hash))
94
- LitleOnlineRequest.new.capture(hash)
93
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<customBilling><city>boston<\/city><descriptor>card was present<\/descriptor><\/customBilling>.*/m), is_a(Hash))
94
+ CnpOnlineRequest.new.capture(hash)
95
95
  end
96
96
 
97
97
  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
  require 'mocha/setup'
28
28
 
29
- module LitleOnline
29
+ module CnpOnline
30
30
  class TestcaptureGivenAuth < Test::Unit::TestCase
31
31
  def test_both_choices_card_and_token
32
32
  hash = {
@@ -41,7 +41,7 @@ module LitleOnline
41
41
  'authAmount'=>'12345'
42
42
  },
43
43
  'token'=> {
44
- 'litleToken'=>'123456789101112',
44
+ 'cnpToken'=>'123456789101112',
45
45
  'expDate'=>'1210',
46
46
  'cardValidationNum'=>'555',
47
47
  'type'=>'VI'},
@@ -50,7 +50,7 @@ module LitleOnline
50
50
  'number' =>'4100000000000001',
51
51
  'expDate' =>'1210'
52
52
  }}
53
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.capture_given_auth(hash)}
53
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.capture_given_auth(hash)}
54
54
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
55
55
  end
56
56
 
@@ -77,13 +77,13 @@ module LitleOnline
77
77
  'cardValidationNum'=>'555',
78
78
  'type'=>'VI'},
79
79
  'token'=> {
80
- 'litleToken'=>'1234567890123',
80
+ 'cnpToken'=>'1234567890123',
81
81
  'expDate'=>'1210',
82
82
  'cardValidationNum'=>'555',
83
83
  'type'=>'VI'
84
84
  }}
85
85
 
86
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.capture_given_auth(hash)}
86
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.capture_given_auth(hash)}
87
87
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
88
88
  end
89
89
 
@@ -106,8 +106,8 @@ module LitleOnline
106
106
  'number' =>'4100000000000001',
107
107
  'expDate' =>'1210'
108
108
  }}
109
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
110
- LitleOnlineRequest.new.capture_given_auth(hash)
109
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
110
+ CnpOnlineRequest.new.capture_given_auth(hash)
111
111
  end
112
112
 
113
113
  def test_secondary_amount
@@ -118,8 +118,8 @@ module LitleOnline
118
118
  'orderSource' => 'ecommerce',
119
119
  'reportGroup' => 'Planets'
120
120
  }
121
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><secondaryAmount>1<\/secondaryAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
122
- LitleOnlineRequest.new.capture_given_auth(hash)
121
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><secondaryAmount>1<\/secondaryAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
122
+ CnpOnlineRequest.new.capture_given_auth(hash)
123
123
  end
124
124
 
125
125
  def test_surcharge_amount
@@ -129,8 +129,8 @@ module LitleOnline
129
129
  'orderSource' => 'ecommerce',
130
130
  'reportGroup' => 'Planets'
131
131
  }
132
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
133
- LitleOnlineRequest.new.capture_given_auth(hash)
132
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
133
+ CnpOnlineRequest.new.capture_given_auth(hash)
134
134
  end
135
135
 
136
136
  def test_surcharge_amount_optional
@@ -139,8 +139,8 @@ module LitleOnline
139
139
  'orderSource' => 'ecommerce',
140
140
  'reportGroup' => 'Planets'
141
141
  }
142
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
143
- LitleOnlineRequest.new.capture_given_auth(hash)
142
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
143
+ CnpOnlineRequest.new.capture_given_auth(hash)
144
144
  end
145
145
 
146
146
  def test_fraudResult
@@ -159,8 +159,8 @@ module LitleOnline
159
159
  }
160
160
  }
161
161
  }
162
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<advancedFraudResults><deviceReviewStatus>deviceReviewStatusString<\/deviceReviewStatus><deviceReputationScore>100<\/deviceReputationScore><\/advancedFraudResults>.*/m), is_a(Hash))
163
- LitleOnlineRequest.new.capture_given_auth(hash)
162
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<advancedFraudResults><deviceReviewStatus>deviceReviewStatusString<\/deviceReviewStatus><deviceReputationScore>100<\/deviceReputationScore><\/advancedFraudResults>.*/m), is_a(Hash))
163
+ CnpOnlineRequest.new.capture_given_auth(hash)
164
164
  end
165
165
 
166
166
  def test_fraudResult1
@@ -180,8 +180,8 @@ module LitleOnline
180
180
  }
181
181
  }
182
182
  }
183
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<advancedFraudResults><deviceReviewStatus>deviceReviewStatusString<\/deviceReviewStatus><deviceReputationScore>100<\/deviceReputationScore><triggeredRule>rule1<\/triggeredRule><triggeredRule>rule2<\/triggeredRule><\/advancedFraudResults>.*/m), is_a(Hash))
184
- LitleOnlineRequest.new.capture_given_auth(hash)
183
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<advancedFraudResults><deviceReviewStatus>deviceReviewStatusString<\/deviceReviewStatus><deviceReputationScore>100<\/deviceReputationScore><triggeredRule>rule1<\/triggeredRule><triggeredRule>rule2<\/triggeredRule><\/advancedFraudResults>.*/m), is_a(Hash))
184
+ CnpOnlineRequest.new.capture_given_auth(hash)
185
185
  end
186
186
 
187
187
  def test_processingType
@@ -202,8 +202,8 @@ module LitleOnline
202
202
  'number' =>'4100000000000001',
203
203
  'expDate' =>'1210'
204
204
  }}
205
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<processingType>initialRecurring<\/processingType>.*/m), is_a(Hash))
206
- LitleOnlineRequest.new.capture_given_auth(hash)
205
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<processingType>initialRecurring<\/processingType>.*/m), is_a(Hash))
206
+ CnpOnlineRequest.new.capture_given_auth(hash)
207
207
  end
208
208
 
209
209
  def test_originalNetworkTransactionId_originalTransactionAmount
@@ -226,8 +226,8 @@ module LitleOnline
226
226
  'originalNetworkTransactionId'=>'987654321098765432109876543210',
227
227
  'originalTransactionAmount'=>'10661'
228
228
  }
229
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<originalNetworkTransactionId>987654321098765432109876543210<\/originalNetworkTransactionId><originalTransactionAmount>10661<\/originalTransactionAmount>.*/m), is_a(Hash))
230
- LitleOnlineRequest.new.capture_given_auth(hash)
229
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<originalNetworkTransactionId>987654321098765432109876543210<\/originalNetworkTransactionId><originalTransactionAmount>10661<\/originalTransactionAmount>.*/m), is_a(Hash))
230
+ CnpOnlineRequest.new.capture_given_auth(hash)
231
231
  end
232
232
 
233
233
  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
  require 'mocha/setup'
28
- module LitleOnline
28
+ module CnpOnline
29
29
  class TestCreatePlan < Test::Unit::TestCase
30
30
 
31
31
  def test_simple
@@ -43,8 +43,8 @@ module LitleOnline
43
43
  'trialIntervalType'=>'MONTH',
44
44
  'active'=>'true'
45
45
  }
46
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<createPlan><planCode>planCodeString<\/planCode><name>nameString<\/name><description>descriptionString<\/description><intervalType>ANNUAL<\/intervalType><amount>500<\/amount><numberOfPayments>2<\/numberOfPayments><trialNumberOfIntervals>1<\/trialNumberOfIntervals><trialIntervalType>MONTH<\/trialIntervalType><active>true<\/active><\/createPlan>.*/m), is_a(Hash))
47
- LitleOnlineRequest.new.create_plan(hash)
46
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<createPlan><planCode>planCodeString<\/planCode><name>nameString<\/name><description>descriptionString<\/description><intervalType>ANNUAL<\/intervalType><amount>500<\/amount><numberOfPayments>2<\/numberOfPayments><trialNumberOfIntervals>1<\/trialNumberOfIntervals><trialIntervalType>MONTH<\/trialIntervalType><active>true<\/active><\/createPlan>.*/m), is_a(Hash))
47
+ CnpOnlineRequest.new.create_plan(hash)
48
48
  end
49
49
 
50
50
  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
  require 'mocha/setup'
28
28
 
29
- module LitleOnline
29
+ module CnpOnline
30
30
  class TestCredit < Test::Unit::TestCase
31
31
  def test_both_choices_card_and_paypal
32
32
  hash = {
@@ -48,7 +48,7 @@ module LitleOnline
48
48
  'transactionId'=>'123456'
49
49
  }}
50
50
 
51
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
51
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.credit(hash)}
52
52
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
53
53
  end
54
54
 
@@ -76,7 +76,7 @@ module LitleOnline
76
76
  'token'=>'1234',
77
77
  'transactionId'=>'123456'
78
78
  }}
79
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
79
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.credit(hash)}
80
80
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
81
81
  end
82
82
 
@@ -108,14 +108,14 @@ module LitleOnline
108
108
  'transactionId'=>'123456'
109
109
  },
110
110
  'token'=> {
111
- 'litleToken'=>'1234567890123',
111
+ 'cnpToken'=>'1234567890123',
112
112
  'expDate'=>'1210',
113
113
  'cardValidationNum'=>'555',
114
114
  'type'=>'VI'
115
115
  }
116
116
  }
117
117
 
118
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
118
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.credit(hash)}
119
119
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
120
120
  end
121
121
 
@@ -129,8 +129,8 @@ module LitleOnline
129
129
  'reportGroup'=>'Planets',
130
130
  'actionReason'=> 'SUSPECT_FRAUD'
131
131
  }
132
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<actionReason>SUSPECT_FRAUD<\/actionReason>.*/m), is_a(Hash))
133
- LitleOnlineRequest.new.credit(hash)
132
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<actionReason>SUSPECT_FRAUD<\/actionReason>.*/m), is_a(Hash))
133
+ CnpOnlineRequest.new.credit(hash)
134
134
  end
135
135
 
136
136
  def test_simple_enhanced_data_incorrect_enum_for_country_code
@@ -147,13 +147,13 @@ module LitleOnline
147
147
  'orderSource'=>'ecommerce',
148
148
  'enhancedData'=>{
149
149
  'destinationCountryCode'=>'001',
150
- 'customerReference'=>'Litle',
150
+ 'customerReference'=>'Cnp',
151
151
  'salesTax'=>'50',
152
152
  'deliveryType'=>'TBD',
153
153
  'shipFromPostalCode'=>'01741',
154
154
  'destinationPostalCode'=>'01742'}
155
155
  }
156
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
156
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.credit(hash)}
157
157
  assert_match /If enhancedData destinationCountryCode is specified, it must be/, exception.message
158
158
  end
159
159
 
@@ -166,13 +166,13 @@ module LitleOnline
166
166
  'amount'=>'106',
167
167
  'orderSource'=>'ecommerce',
168
168
  'token'=> {
169
- 'litleToken'=>'123456789012',
169
+ 'cnpToken'=>'123456789012',
170
170
  'expDate'=>'1210',
171
171
  'cardValidationNum'=>'555',
172
172
  'type'=>'VI'
173
173
  }}
174
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
175
- assert_match /If token litleToken is specified, it must be between/, exception.message
174
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.credit(hash)}
175
+ assert_match /If token cnpToken is specified, it must be between/, exception.message
176
176
  end
177
177
 
178
178
  def test_token_missing_token
@@ -188,8 +188,8 @@ module LitleOnline
188
188
  'cardValidationNum'=>'555',
189
189
  'type'=>'VI'
190
190
  }}
191
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
192
- assert_match /If token is specified, it must have a litleToken/, exception.message
191
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.credit(hash)}
192
+ assert_match /If token is specified, it must have a cnpToken/, exception.message
193
193
  end
194
194
 
195
195
  def test_pos_with_invalid_entry_mode
@@ -206,7 +206,7 @@ module LitleOnline
206
206
  'number' =>'4100000000000001',
207
207
  'expDate' =>'1210'
208
208
  }}
209
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
209
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.credit(hash)}
210
210
  assert_match /If pos entryMode is specified, it must be in/, exception.message
211
211
  end
212
212
 
@@ -223,7 +223,7 @@ module LitleOnline
223
223
  'cardValidationNum'=>'555',
224
224
  'type'=>'VI'
225
225
  }}
226
- exception = assert_raise(RuntimeError){LitleOnlineRequest.new.credit(hash)}
226
+ exception = assert_raise(RuntimeError){CnpOnlineRequest.new.credit(hash)}
227
227
  assert_match /If paypage is specified, it must have a paypageRegistrationId/, exception.message
228
228
  end
229
229
 
@@ -238,43 +238,43 @@ module LitleOnline
238
238
  'orderSource'=>'ecommerce',
239
239
  'reportGroup'=>'Planets'
240
240
  }
241
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
242
- LitleOnlineRequest.new.credit(hash)
241
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
242
+ CnpOnlineRequest.new.credit(hash)
243
243
  end
244
244
 
245
245
  def test_secondary_amount_tied
246
246
  hash = {
247
247
  'amount' => '2',
248
248
  'secondaryAmount' => '1',
249
- 'litleTxnId' => '3',
249
+ 'cnpTxnId' => '3',
250
250
  'processingInstructions' => {},
251
251
  'reportGroup' => 'Planets'
252
252
  }
253
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>3<\/litleTxnId><amount>2<\/amount><secondaryAmount>1<\/secondaryAmount><process.*/m), is_a(Hash))
254
- LitleOnlineRequest.new.credit(hash)
253
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<cnpTxnId>3<\/cnpTxnId><amount>2<\/amount><secondaryAmount>1<\/secondaryAmount><process.*/m), is_a(Hash))
254
+ CnpOnlineRequest.new.credit(hash)
255
255
  end
256
256
 
257
257
  def test_surcharge_amount_tied
258
258
  hash = {
259
259
  'amount' => '2',
260
260
  'surchargeAmount' => '1',
261
- 'litleTxnId' => '3',
261
+ 'cnpTxnId' => '3',
262
262
  'processingInstructions' => {},
263
263
  'reportGroup' => 'Planets'
264
264
  }
265
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>3<\/litleTxnId><amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><process.*/m), is_a(Hash))
266
- LitleOnlineRequest.new.credit(hash)
265
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<cnpTxnId>3<\/cnpTxnId><amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><process.*/m), is_a(Hash))
266
+ CnpOnlineRequest.new.credit(hash)
267
267
  end
268
268
 
269
269
  def test_surcharge_amount_tied_optional
270
270
  hash = {
271
271
  'amount' => '2',
272
- 'litleTxnId' => '3',
272
+ 'cnpTxnId' => '3',
273
273
  'processingInstructions' => {},
274
274
  'reportGroup' => 'Planets'
275
275
  }
276
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>3<\/litleTxnId><amount>2<\/amount><process.*/m), is_a(Hash))
277
- LitleOnlineRequest.new.credit(hash)
276
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<cnpTxnId>3<\/cnpTxnId><amount>2<\/amount><process.*/m), is_a(Hash))
277
+ CnpOnlineRequest.new.credit(hash)
278
278
  end
279
279
 
280
280
  def test_secondary_amount_orphan
@@ -284,8 +284,8 @@ module LitleOnline
284
284
  'orderSource' => 'ecommerce',
285
285
  'reportGroup' => 'Planets'
286
286
  }
287
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><secondaryAmount>1<\/secondaryAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
288
- LitleOnlineRequest.new.credit(hash)
287
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><secondaryAmount>1<\/secondaryAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
288
+ CnpOnlineRequest.new.credit(hash)
289
289
  end
290
290
 
291
291
  def test_surcharge_amount_orphan
@@ -295,8 +295,8 @@ module LitleOnline
295
295
  'orderSource' => 'ecommerce',
296
296
  'reportGroup' => 'Planets'
297
297
  }
298
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
299
- LitleOnlineRequest.new.credit(hash)
298
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><surchargeAmount>1<\/surchargeAmount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
299
+ CnpOnlineRequest.new.credit(hash)
300
300
  end
301
301
 
302
302
  def test_surcharge_amount_orphan_optional
@@ -305,8 +305,8 @@ module LitleOnline
305
305
  'orderSource' => 'ecommerce',
306
306
  'reportGroup' => 'Planets'
307
307
  }
308
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
309
- LitleOnlineRequest.new.credit(hash)
308
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<amount>2<\/amount><orderSource>ecommerce<\/orderSource>.*/m), is_a(Hash))
309
+ CnpOnlineRequest.new.credit(hash)
310
310
  end
311
311
 
312
312
  def test_pos_tied
@@ -319,22 +319,22 @@ module LitleOnline
319
319
  'cardholderId' => 'nopin',
320
320
  'catLevel' => 'self service'
321
321
  },
322
- 'litleTxnId' => '3',
322
+ 'cnpTxnId' => '3',
323
323
  'reportGroup' => 'Planets',
324
324
  'orderSource' => 'ecommerce',
325
325
  'payPalNotes' => 'notes'
326
326
  }
327
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>3<\/litleTxnId><amount>2<\/amount><pos><capability>magstripe<\/capability><entryMode>keyed<\/entryMode><cardholderId>nopin<\/cardholderId><terminalId>abc123<\/terminalId><catLevel>self service<\/catLevel><\/pos><payPalNotes>.*/m), is_a(Hash))
328
- LitleOnlineRequest.new.credit(hash)
327
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<cnpTxnId>3<\/cnpTxnId><amount>2<\/amount><pos><capability>magstripe<\/capability><entryMode>keyed<\/entryMode><cardholderId>nopin<\/cardholderId><terminalId>abc123<\/terminalId><catLevel>self service<\/catLevel><\/pos><payPalNotes>.*/m), is_a(Hash))
328
+ CnpOnlineRequest.new.credit(hash)
329
329
  end
330
330
 
331
331
  def test_post_tied_optional
332
332
  hash = {
333
333
  'amount' => '2',
334
- 'litleTxnId' => '3',
334
+ 'cnpTxnId' => '3',
335
335
  }
336
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<litleTxnId>3<\/litleTxnId><amount>2<\/amount><\/credit>.*/m), is_a(Hash))
337
- LitleOnlineRequest.new.credit(hash)
336
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<cnpTxnId>3<\/cnpTxnId><amount>2<\/amount><\/credit>.*/m), is_a(Hash))
337
+ CnpOnlineRequest.new.credit(hash)
338
338
  end
339
339
 
340
340
  def test_pin
@@ -344,11 +344,11 @@ module LitleOnline
344
344
  'reportGroup'=>'Planets',
345
345
  'amount'=>'106',
346
346
  'secondaryAmount'=>'20',
347
- 'litleTxnId'=>'1234',
347
+ 'cnpTxnId'=>'1234',
348
348
  'pin'=>'3333'
349
349
  }
350
- LitleXmlMapper.expects(:request).with(regexp_matches(/.*<pin>3333<\/pin>.*/m), is_a(Hash))
351
- LitleOnlineRequest.new.credit(hash)
350
+ CnpXmlMapper.expects(:request).with(regexp_matches(/.*<pin>3333<\/pin>.*/m), is_a(Hash))
351
+ CnpOnlineRequest.new.credit(hash)
352
352
  end
353
353
 
354
354
  end