LitleOnline 8.25.1 → 8.29.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +10 -2
  3. data/README.md +2 -22
  4. data/Rakefile +2 -2
  5. data/accurev_plugin.log +1037 -0
  6. data/bin/sample_batch_driver.rb +1 -0
  7. data/bin/sample_driver.rb +4 -4
  8. data/lib/Configuration.rb +2 -2
  9. data/lib/EnvironmentVariables.rb +2 -1
  10. data/lib/LitleBatchRequest.rb +16 -3
  11. data/lib/LitleOnlineRequest.rb +2 -2
  12. data/lib/LitleRequest.rb +8 -4
  13. data/lib/LitleTransaction.rb +10 -6
  14. data/lib/XMLFields.rb +203 -159
  15. data/samples/Auth/LitleAuthReversalTransaction.rb +15 -0
  16. data/samples/Auth/LitleAuthorizationTransaction.rb +31 -0
  17. data/samples/Auth/LitlePaymentFullLifeCycle.rb +47 -0
  18. data/samples/Batch/AccountUpdate.rb +64 -0
  19. data/samples/Batch/SampleBatchDriver.rb +94 -0
  20. data/samples/Capture/LitleCaptureGivenAuthTransaction.rb +30 -0
  21. data/samples/Capture/LitleCaptureTransaction.rb +14 -0
  22. data/samples/Capture/LitleForceCaptureTransaction.rb +26 -0
  23. data/samples/Capture/LitlePartialCapture.rb +16 -0
  24. data/samples/Credit/LitleCreditTransaction.rb +16 -0
  25. data/samples/Credit/LitleRefundTransaction.rb +29 -0
  26. data/samples/Other/LitleAvsTransaction.rb +34 -0
  27. data/samples/Other/LitleVoidTransaction.rb +18 -0
  28. data/samples/Paypage/FullPaypageLifeCycle.rb +74 -0
  29. data/samples/Run_all.rb +17 -0
  30. data/samples/Sale/LitleSaleTransaction.rb +29 -0
  31. data/samples/Sale/SampleSaleTransaction.rb +24 -0
  32. data/test/functional/test_auth.rb +54 -30
  33. data/test/functional/test_captureGivenAuth.rb +41 -18
  34. data/test/functional/test_credit.rb +17 -0
  35. data/test/functional/test_echeckCredit.rb +23 -6
  36. data/test/functional/test_echeckSale.rb +27 -10
  37. data/test/functional/test_forceCapture.rb +19 -0
  38. data/test/functional/test_sale.rb +44 -19
  39. data/test/functional/test_token.rb +27 -5
  40. data/test/unit/test_LitleOnlineRequest.rb +2 -2
  41. data/test/unit/test_activate.rb +1 -1
  42. data/test/unit/test_activateReversal.rb +1 -1
  43. data/test/unit/test_auth.rb +104 -41
  44. data/test/unit/test_balanceInquiry.rb +1 -1
  45. data/test/unit/test_cancelSubscription.rb +1 -1
  46. data/test/unit/test_captureGivenAuth.rb +31 -22
  47. data/test/unit/test_createPlan.rb +1 -1
  48. data/test/unit/test_credit.rb +61 -39
  49. data/test/unit/test_deactivate.rb +1 -1
  50. data/test/unit/test_deactivateReversal.rb +1 -1
  51. data/test/unit/test_depositReversal.rb +1 -1
  52. data/test/unit/test_echeckCredit.rb +18 -5
  53. data/test/unit/test_echeckRedeposit.rb +1 -1
  54. data/test/unit/test_echeckSale.rb +14 -1
  55. data/test/unit/test_echeckVerification.rb +1 -1
  56. data/test/unit/test_echeckVoid.rb +1 -1
  57. data/test/unit/test_forceCapture.rb +11 -0
  58. data/test/unit/test_load.rb +1 -1
  59. data/test/unit/test_loadReversal.rb +1 -1
  60. data/test/unit/test_refundReversal.rb +1 -1
  61. data/test/unit/test_sale.rb +113 -55
  62. data/test/unit/test_token.rb +53 -7
  63. data/test/unit/test_unload.rb +1 -1
  64. data/test/unit/test_unloadReversal.rb +1 -1
  65. data/test/unit/test_updateCardValidationNumOnToken.rb +1 -1
  66. data/test/unit/test_updatePlan.rb +1 -1
  67. data/test/unit/test_xmlfields.rb +2 -2
  68. metadata +22 -4
@@ -22,11 +22,57 @@ 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/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
+ require 'mocha/setup'
27
28
 
28
29
  module LitleOnline
29
30
  class TestToken < Test::Unit::TestCase
31
+ def test_success_applepay
32
+ hash = {
33
+ 'merchantId' => '101',
34
+ 'version'=>'8.8',
35
+ 'reportGroup'=>'Planets',
36
+ 'orderId'=>'12344',
37
+ 'applepay'=>{
38
+ 'data'=>'user',
39
+ 'header'=>{
40
+ 'applicationData'=>'454657413164',
41
+ 'ephemeralPublicKey'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
42
+ 'publicKeyHash'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
43
+ 'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
44
+ },
45
+ 'signature' =>'sign',
46
+ 'version' =>'1'
47
+ }
48
+ }
49
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*?<litleOnlineRequest.*?<registerTokenRequest.*?<applepay>.*?<data>user<\/data>.*?<\/applepay>.*?<\/registerTokenRequest>.*?/m), is_a(Hash))
50
+ LitleOnlineRequest.new.register_token_request(hash)
51
+ end
52
+
53
+ def test_account_num_and_applepay
54
+ hash = {
55
+ 'merchantId' => '101',
56
+ 'version'=>'8.8',
57
+ 'reportGroup'=>'Planets',
58
+ 'orderId'=>'12344',
59
+ 'accountNumber'=>'1233456789101112',
60
+ 'applepay'=>{
61
+ 'data'=>'user',
62
+ 'header'=>{
63
+ 'applicationData'=>'454657413164',
64
+ 'ephemeralPublicKey'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
65
+ 'publicKeyHash'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
66
+ 'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
67
+ },
68
+ 'signature' =>'sign',
69
+ 'version' =>'1'
70
+ }
71
+ }
72
+ exception = assert_raise(RuntimeError){LitleOnlineRequest.new.register_token_request(hash)}
73
+ assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
74
+ end
75
+
30
76
  def test_account_num_and_paypage
31
77
  hash = {
32
78
  'merchantId' => '101',
@@ -39,8 +85,8 @@ module LitleOnline
39
85
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.register_token_request(hash)}
40
86
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
41
87
  end
42
-
43
- def test_echeckandPaypage
88
+
89
+ def test_echeck_and_Paypage
44
90
  hash = {
45
91
  'merchantId' => '101',
46
92
  'version'=>'8.8',
@@ -52,8 +98,8 @@ module LitleOnline
52
98
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.register_token_request(hash)}
53
99
  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
54
100
  end
55
-
56
- def test_echeckandPaypageandaccountnum
101
+
102
+ def test_echeck_and_Paypage_and_accountnum
57
103
  hash = {
58
104
  'merchantId' => '101',
59
105
  'version'=>'8.8',
@@ -81,8 +127,8 @@ module LitleOnline
81
127
 
82
128
  def test_logged_in_user
83
129
  hash = {
84
- 'loggedInUser'=>'gdake',
85
- 'merchantSdk' => 'Ruby;8.14.0',
130
+ 'loggedInUser'=>'gdake',
131
+ 'merchantSdk' => 'Ruby;8.14.0',
86
132
  'merchantId' => '101',
87
133
  'version'=>'8.8',
88
134
  'reportGroup'=>'Planets',
@@ -24,7 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
-
27
+ require 'mocha/setup'
28
28
  module LitleOnline
29
29
  class TestUnload < Test::Unit::TestCase
30
30
 
@@ -24,7 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
-
27
+ require 'mocha/setup'
28
28
  module LitleOnline
29
29
  class TestUnloadReversal < Test::Unit::TestCase
30
30
 
@@ -24,7 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
-
27
+ require 'mocha/setup'
28
28
  module LitleOnline
29
29
  class TestUpdateCardValidationNumOnToken < Test::Unit::TestCase
30
30
  def test_simple
@@ -24,7 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE.
24
24
  =end
25
25
  require File.expand_path("../../../lib/LitleOnline",__FILE__)
26
26
  require 'test/unit'
27
-
27
+ require 'mocha/setup'
28
28
  module LitleOnline
29
29
  class TestUpdatePlan < Test::Unit::TestCase
30
30
 
@@ -972,9 +972,9 @@ module LitleOnline
972
972
  assert_equal(nil, FraudCheck.from_hash({ 'fraudCheck'=>{}}).authenticationValue)
973
973
  assert_equal("12345678901234567890123456789012", FraudCheck.from_hash({ 'fraudCheck'=>{'authenticationValue'=>'12345678901234567890123456789012' }}).authenticationValue)
974
974
  exception = assert_raise(RuntimeError){
975
- FraudCheck.from_hash({ 'fraudCheck'=>{'authenticationValue'=>'123456789012345678901234567890123' }})
975
+ FraudCheck.from_hash({ 'fraudCheck'=>{'authenticationValue'=>'123456789012345678901234567890123456789012345678901234567' }})
976
976
  }
977
- assert_equal "If fraudCheck authenticationValue is specified, it must be between 1 and 32 characters long", exception.message
977
+ assert_equal "If fraudCheck authenticationValue is specified, it must be between 1 and 56 characters long", exception.message
978
978
  end
979
979
 
980
980
  def test_fraudCheck_authenticationTransactionId
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: LitleOnline
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.25.1
4
+ version: 8.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Litle & Co
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-18 00:00:00.000000000 Z
11
+ date: 2015-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xml-object
@@ -114,6 +114,7 @@ files:
114
114
  - README.md
115
115
  - Rakefile
116
116
  - SETUP.md
117
+ - accurev_plugin.log
117
118
  - bin/Setup.rb
118
119
  - bin/sample_batch_driver.rb
119
120
  - bin/sample_driver.rb
@@ -129,6 +130,23 @@ files:
129
130
  - lib/LitleXmlMapper.rb
130
131
  - lib/XMLFields.rb
131
132
  - lib/cacert.pem
133
+ - samples/Auth/LitleAuthReversalTransaction.rb
134
+ - samples/Auth/LitleAuthorizationTransaction.rb
135
+ - samples/Auth/LitlePaymentFullLifeCycle.rb
136
+ - samples/Batch/AccountUpdate.rb
137
+ - samples/Batch/SampleBatchDriver.rb
138
+ - samples/Capture/LitleCaptureGivenAuthTransaction.rb
139
+ - samples/Capture/LitleCaptureTransaction.rb
140
+ - samples/Capture/LitleForceCaptureTransaction.rb
141
+ - samples/Capture/LitlePartialCapture.rb
142
+ - samples/Credit/LitleCreditTransaction.rb
143
+ - samples/Credit/LitleRefundTransaction.rb
144
+ - samples/Other/LitleAvsTransaction.rb
145
+ - samples/Other/LitleVoidTransaction.rb
146
+ - samples/Paypage/FullPaypageLifeCycle.rb
147
+ - samples/Run_all.rb
148
+ - samples/Sale/LitleSaleTransaction.rb
149
+ - samples/Sale/SampleSaleTransaction.rb
132
150
  - test/certification/certTest1_base.rb
133
151
  - test/certification/certTest2_authenhanced.rb
134
152
  - test/certification/certTest3_authreversal.rb
@@ -228,10 +246,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
246
  requirements:
229
247
  - Contact sdksupport@litle.com for more information
230
248
  rubyforge_project:
231
- rubygems_version: 2.2.2
249
+ rubygems_version: 2.4.5
232
250
  signing_key:
233
251
  specification_version: 4
234
252
  summary: Ruby SDK produced by Litle & Co. for transaction processing using Litle XML
235
- format v8.25
253
+ format v8.29
236
254
  test_files:
237
255
  - test/unit/ts_unit.rb