CnpOnline 8.31.1 → 9.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +29 -12
  3. data/DESCRIPTION +2 -2
  4. data/LICENSE +1 -1
  5. data/README.md +1 -1
  6. data/Rakefile +4 -4
  7. data/Rakefile~ +5 -5
  8. data/SETUP.md +3 -3
  9. data/bin/Setup.rb +9 -8
  10. data/bin/sample_batch_driver.rb +1 -1
  11. data/bin/sample_driver.rb +1 -1
  12. data/lib/Communications.rb +1 -1
  13. data/lib/Configuration.rb +16 -16
  14. data/lib/EnvironmentVariables.rb +1 -2
  15. data/lib/LitleBatchRequest.rb +283 -147
  16. data/lib/LitleListeners.rb +132 -33
  17. data/lib/LitleOnline.rb +5 -4
  18. data/lib/LitleOnlineRequest.rb +69 -59
  19. data/lib/LitleRequest.rb +178 -141
  20. data/lib/LitleTransaction.rb +279 -122
  21. data/lib/LitleXmlMapper.rb +9 -4
  22. data/lib/XMLFields.rb +345 -26
  23. data/test/certification/certTest1_base.rb +74 -73
  24. data/test/certification/certTest2_authenhanced.rb +1 -1
  25. data/test/certification/certTest3_authreversal.rb +1 -1
  26. data/test/certification/certTest4_echeck.rb +4 -1
  27. data/test/certification/certTest5_token.rb +4 -4
  28. data/test/certification/certTest_batchAll.rb +296 -55
  29. data/test/certification/ts_all.rb +1 -1
  30. data/test/functional/test_activate.rb +7 -3
  31. data/test/functional/test_activateReversal.rb +7 -3
  32. data/test/functional/test_auth.rb +119 -16
  33. data/test/functional/test_authReversal.rb +5 -3
  34. data/test/functional/test_balanceInquiry.rb +5 -3
  35. data/test/functional/test_batch.rb +3 -3
  36. data/test/functional/test_batchStream.rb +14 -4
  37. data/test/functional/test_cancelSubscription.rb +5 -3
  38. data/test/functional/test_capture.rb +34 -3
  39. data/test/functional/test_captureGivenAuth.rb +55 -4
  40. data/test/functional/test_configuration.rb +2 -2
  41. data/test/functional/test_createPlan.rb +5 -3
  42. data/test/functional/test_credit.rb +45 -16
  43. data/test/functional/test_deactivate.rb +5 -3
  44. data/test/functional/test_deactivateReversal.rb +5 -3
  45. data/test/functional/test_depositReversal.rb +5 -3
  46. data/test/functional/test_echeckCredit.rb +26 -9
  47. data/test/functional/test_echeckRedeposit.rb +5 -3
  48. data/test/functional/test_echeckSale.rb +49 -28
  49. data/test/functional/test_echeckVerification.rb +20 -12
  50. data/test/functional/test_echeckVoid.rb +1 -1
  51. data/test/functional/test_forceCapture.rb +44 -22
  52. data/test/functional/test_fraudCheck.rb +77 -0
  53. data/test/functional/test_litle_requests.rb +24 -24
  54. data/test/functional/test_load.rb +5 -3
  55. data/test/functional/test_loadReversal.rb +5 -3
  56. data/test/functional/test_refundReversal.rb +5 -3
  57. data/test/functional/test_sale.rb +214 -29
  58. data/test/functional/test_token.rb +19 -3
  59. data/test/functional/test_unload.rb +5 -3
  60. data/test/functional/test_unloadReversal.rb +6 -4
  61. data/test/functional/test_updateCardValidationNumOnToken.rb +1 -1
  62. data/test/functional/test_updatePlan.rb +5 -3
  63. data/test/functional/test_updateSubscription.rb +5 -3
  64. data/test/functional/test_utf8.rb +44 -0
  65. data/test/functional/test_xmlfields.rb +10 -6
  66. data/test/functional/ts_all.rb +2 -1
  67. data/test/unit/test_LitleAUBatch.rb +29 -1
  68. data/test/unit/test_LitleBatchRequest.rb +247 -113
  69. data/test/unit/test_LitleOnlineRequest.rb +37 -54
  70. data/test/unit/test_LitleRequest.rb +3 -3
  71. data/test/unit/test_LitleTransaction.rb +5 -5
  72. data/test/unit/test_LitleXmlMapper.rb +136 -0
  73. data/test/unit/test_activate.rb +1 -21
  74. data/test/unit/test_activateReversal.rb +1 -1
  75. data/test/unit/test_auth.rb +54 -14
  76. data/test/unit/test_authReversal.rb +1 -1
  77. data/test/unit/test_balanceInquiry.rb +1 -1
  78. data/test/unit/test_cancelSubscription.rb +1 -1
  79. data/test/unit/test_capture.rb +27 -1
  80. data/test/unit/test_captureGivenAuth.rb +44 -18
  81. data/test/unit/test_createPlan.rb +1 -1
  82. data/test/unit/test_credit.rb +16 -3
  83. data/test/unit/test_deactivate.rb +1 -1
  84. data/test/unit/test_deactivateReversal.rb +1 -1
  85. data/test/unit/test_depositReversal.rb +1 -1
  86. data/test/unit/test_echeckCredit.rb +15 -2
  87. data/test/unit/test_echeckRedeposit.rb +1 -1
  88. data/test/unit/test_echeckSale.rb +18 -1
  89. data/test/unit/test_echeckVerification.rb +1 -1
  90. data/test/unit/test_echeckVoid.rb +1 -1
  91. data/test/unit/test_forceCapture.rb +20 -2
  92. data/test/unit/test_fraudCheck.rb +45 -0
  93. data/test/unit/test_load.rb +1 -1
  94. data/test/unit/test_loadReversal.rb +1 -1
  95. data/test/unit/test_refundReversal.rb +1 -1
  96. data/test/unit/test_sale.rb +73 -7
  97. data/test/unit/test_token.rb +15 -4
  98. data/test/unit/test_unload.rb +1 -1
  99. data/test/unit/test_unloadReversal.rb +1 -1
  100. data/test/unit/test_updateCardValidationNumOnToken.rb +1 -1
  101. data/test/unit/test_updatePlan.rb +1 -1
  102. data/test/unit/test_updateSubscription.rb +1 -1
  103. data/test/unit/test_xmlfields.rb +1 -1
  104. data/test/unit/ts_unit.rb +2 -1
  105. metadata +10 -7
  106. data/CHANGELOG~ +0 -142
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -43,7 +43,7 @@ module LitleOnline
43
43
  'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
44
44
  },
45
45
  'signature' =>'sign',
46
- 'version' =>'12345'
46
+ 'version' =>'1.0.0'
47
47
  }
48
48
  }
49
49
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*?<litleOnlineRequest.*?<registerTokenRequest.*?<applepay>.*?<data>user<\/data>.*?<\/applepay>.*?<\/registerTokenRequest>.*?/m), is_a(Hash))
@@ -66,7 +66,7 @@ module LitleOnline
66
66
  'transactionId'=>'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
67
67
  },
68
68
  'signature' =>'sign',
69
- 'version' =>'12345'
69
+ 'version' =>'1.0.0'
70
70
  }
71
71
  }
72
72
  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.register_token_request(hash)}
@@ -138,7 +138,18 @@ module LitleOnline
138
138
  LitleXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
139
139
  LitleOnlineRequest.new.register_token_request(hash)
140
140
  end
141
+
142
+ def test_androidpay
143
+ hash = {
144
+ 'merchantId' => '101',
145
+ 'version'=>'8.8',
146
+ 'reportGroup'=>'Planets',
147
+ 'orderId'=>'androidpay',
148
+ 'accountNumber'=>'1233456789103801'
149
+ }
150
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<orderId>androidpay<\/orderId>.*<accountNumber>1233456789103801<\/accountNumber>.*/m), is_a(Hash))
151
+ LitleOnlineRequest.new.register_token_request(hash)
152
+ end
141
153
 
142
154
  end
143
-
144
155
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2012 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2011 Litle & Co.
2
+ Copyright (c) 2017 Vantiv eCommerce
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -62,4 +62,5 @@ require_relative 'test_refundReversal'
62
62
  require_relative 'test_loadReversal'
63
63
  require_relative 'test_unloadReversal'
64
64
  require_relative 'test_deactivateReversal'
65
+ require_relative 'test_fraudCheck'
65
66
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: CnpOnline
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.31.1
4
+ version: 9.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vantiv eCommerce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-24 00:00:00.000000000 Z
11
+ date: 2018-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xml-object
@@ -95,9 +95,9 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  description: |+
98
- Litle Online Ruby SDK created for version 8.18 of Litle XML format, see the XSD schema for specific fields that are supported by this format.
98
+ Vantiv eCommerce Ruby SDK created for version 9.10 of Vantiv eCommerce XML format, see the XSD schema for specific fields that are supported by this format.
99
99
 
100
- This gem contains an application interface in the Ruby programming language created by Litle & Co.
100
+ This gem contains an application interface in the Ruby programming language created by Vantiv eCommerce.
101
101
 
102
102
 
103
103
  email: sdksupport@vantiv.com
@@ -108,7 +108,6 @@ extensions: []
108
108
  extra_rdoc_files: []
109
109
  files:
110
110
  - CHANGELOG
111
- - CHANGELOG~
112
111
  - CONTRIBUTORS
113
112
  - DESCRIPTION
114
113
  - LICENSE
@@ -177,6 +176,7 @@ files:
177
176
  - test/functional/test_echeckVerification.rb
178
177
  - test/functional/test_echeckVoid.rb
179
178
  - test/functional/test_forceCapture.rb
179
+ - test/functional/test_fraudCheck.rb
180
180
  - test/functional/test_litle_requests.rb
181
181
  - test/functional/test_load.rb
182
182
  - test/functional/test_loadReversal.rb
@@ -189,6 +189,7 @@ files:
189
189
  - test/functional/test_updateCardValidationNumOnToken.rb
190
190
  - test/functional/test_updatePlan.rb
191
191
  - test/functional/test_updateSubscription.rb
192
+ - test/functional/test_utf8.rb
192
193
  - test/functional/test_xmlfields.rb
193
194
  - test/functional/ts_all.rb
194
195
  - test/unit/test_LitleAUBatch.rb
@@ -196,6 +197,7 @@ files:
196
197
  - test/unit/test_LitleOnlineRequest.rb
197
198
  - test/unit/test_LitleRequest.rb
198
199
  - test/unit/test_LitleTransaction.rb
200
+ - test/unit/test_LitleXmlMapper.rb
199
201
  - test/unit/test_activate.rb
200
202
  - test/unit/test_activateReversal.rb
201
203
  - test/unit/test_auth.rb
@@ -215,6 +217,7 @@ files:
215
217
  - test/unit/test_echeckVerification.rb
216
218
  - test/unit/test_echeckVoid.rb
217
219
  - test/unit/test_forceCapture.rb
220
+ - test/unit/test_fraudCheck.rb
218
221
  - test/unit/test_load.rb
219
222
  - test/unit/test_loadReversal.rb
220
223
  - test/unit/test_refundReversal.rb
@@ -238,7 +241,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
238
241
  requirements:
239
242
  - - ">="
240
243
  - !ruby/object:Gem::Version
241
- version: 1.8.7
244
+ version: 2.2.0
242
245
  required_rubygems_version: !ruby/object:Gem::Requirement
243
246
  requirements:
244
247
  - - ">="
@@ -251,6 +254,6 @@ rubygems_version: 2.7.6
251
254
  signing_key:
252
255
  specification_version: 4
253
256
  summary: Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv
254
- eCommerce XML format v8.31
257
+ eCommerce XML format v9.12
255
258
  test_files:
256
259
  - test/unit/ts_unit.rb
data/CHANGELOG~ DELETED
@@ -1,142 +0,0 @@
1
- = LitleOnline CHANGELOG
2
-
3
- ==Version 8.31.1 (April 24, 2018)
4
- * BugFix: Set content-type to text/xml; charset=UTF-8
5
-
6
- == version 8.31.0(March 29, 2018)
7
- * Feature : Processingtype elements added to sale, authorization, and forcecapture
8
-
9
- ==version 8.29.2
10
- HTTP timeout set to 500ms
11
-
12
- == version 8.29.1(March 11, 2015)
13
- * BugFix: fixed a XML field bug in Account Update Token
14
-
15
- == version 8.29.0(January 28, 2015)
16
- * Feature : Added support for Applepay and Secondary Amount
17
- * BugFix: fix an incorrect mapping in fraud check option fields for Sale transaction
18
-
19
- == version 8.27.0(August 27, 2014)
20
- * Feature : Added samples for all kinds of transactions
21
-
22
- == version 8.25.1(July 18,2014)
23
- * Feature : Added Env variables to setup ruby config
24
-
25
-
26
- == version 8.25.0 (March 17, 2014)
27
- * Feature: Added support for ROAM: Authorization, ForceCapture, CaptureGivenAuth, Sale, Credit
28
-
29
- == version 8.24.0 (March 17, 2014)
30
- * Feature: add triggered rules for advancedFraudCheckResult
31
-
32
- == Version 8.23.0 (March 14, 2014)
33
- * Feature: advancedFraudChecks now available in authorization and sale
34
- * Feature: catLevel (Cardholder Activated Terminal) now available in pos
35
- * Feature: advancedFraudResults now available in fraudResult
36
-
37
- == Version 8.22.0 (March 14, 2014)
38
- * Feature: Support for the following new gift card transactions:
39
- ActivateReversal, DeactivateReversal, LoadReversal, RefundReversal,
40
- UnloadReversal, DepositReversal
41
- * Feature: UpdateSubscription now can take token or paypage updates, and
42
- can return token in the response
43
- * Feature: Support for virtualGiftCard in giftCard activations and can be returned in EnhancedAuthResponses
44
- * Feature: Gift Card responses can be returned from AuthReversal
45
-
46
- == Version 8.21.0 (March 13, 2014)
47
- * Feature: Support for the following new recurring transactions:
48
- CreatePlan, UpdatePlan
49
- * Feature: Support for the following new gift card transactions:
50
- Activate, Deactivate, Load, Unload, Balance Inquiry
51
- * Feature: Gift card responses are now returned as part of
52
- authorzationResponse, authReversalResponse, captureResponse,
53
- forceCapture, captureGivenAuthResponse, saleResponse, creditResponse
54
- * Feature: fraudResult is now returned as part of captureResponse,
55
- forceCaptureResponse, captureGivenAuthResponse, creditResponse
56
-
57
- == Version 8.20.0 (December 17, 2013)
58
- * Feature: More initial support for Recurring, including the ability to update or cancel subscriptions
59
-
60
- == Version 8.19.0 (March 07, 2014)
61
- * Feature: Added deptRepayment as a choice for authorizations, forceCapture, captureGivenAuth, sale
62
- * Feature: More initial support for Recurring, including a backwards incompatible changing a field from numberOfPaymentsRemaining to numberOfPayments
63
-
64
- == Version 8.18.0 (July 31, 2013)
65
- * Feature: Add initial support for Recurring
66
- * Feature: Add support for Gift Card as a card type (GC)
67
-
68
- == Version 8.17.0 (June 13, 2013)
69
- * Feature: Batch support - see https://gist.github.com/litleSDK/5687345, https://gist.github.com/litleSDK/5714803 and https://gist.github.com/litleSDK/5714847
70
- * Feature: Add support for surcharging credit card transactions
71
- * Feature: Add support for specifying the terminalId on a pos transaction
72
- * Feature: Add support for pos transactions on tied refunds
73
- * Cleanup: Drop support for 1.8.6
74
-
75
- == Version 8.16.0 (March 29, 2013)
76
-
77
- * Feature: Merged pull request #7 from pierre to add external logging support
78
- * Feature: Add recyling to voidResponse
79
- * Bugfix: Force the "version" attribute of a LitleOnlineRequest to be the major and minor version of the sdk submitting the transaction instead of using the value from the configuration file
80
- * Bugfix: Add Connection: close header to reduce the chance of 403s from reaching the ip connection limit
81
- * Bugfix: Merged pull request #5 from simeonwillbanks to fix a typo in sale when payPalOrderComplete is specified
82
-
83
- == Version 8.15.0 (January 31, 2013)
84
-
85
- * Feature: Add merchantData to echeck verifications and echeck redeposits
86
-
87
- == Version 8.14.0 (January 31, 2013)
88
-
89
- * Feature: Temporary storage of card validation num on tokens
90
- * Feature: Updating card validation numbers on tokens
91
-
92
- == Version 8.13.2 (June 28, 2012)
93
-
94
- * Feature: Most schema validations are now handled by ruby code and throw errors.
95
- * Bugfix: Remove hardcoded username/password fields
96
-
97
- == Version 8.13.1 (May 22, 2012)
98
-
99
- * Feature: Echeck Void now supported
100
-
101
- == Version 8.13.0 (May 18, 2012)
102
-
103
- * Feature: Authorizations and Sales can accept an optional fraudFilterOverride parameter
104
-
105
- == Version 8.12.4 (May 17, 2012)
106
-
107
- * Bugfix: Use modules so that we are not polluting the global namespace
108
-
109
- == Version 8.12.3 (May 17, 2012)
110
-
111
- * Bugfix: Allow use without the configuration file
112
-
113
- == Version 8.12.2 (May 16, 2012)
114
-
115
- * Bugfix: Fix bug where rails "capture" method was interfering with Litle's "capture"
116
-
117
- == Version 8.12.1 (May 15, 2012)
118
-
119
- * Feature: Support Ruby 1.8.7
120
- * Bugfix: Add support for line item data and tax detail to enhanced auth
121
-
122
- == Version 8.12.0 (April 16, 2012)
123
-
124
- * Feature: Add support for actionReason on credit
125
- * Feature: Track SDK Usage
126
- * Bugfix: Add support for MerchantData on auth and sale
127
-
128
- == Version 8.10.3 (April 16, 2012)
129
-
130
- * Feature: Support Ruby 1.8.6
131
- * Bugfix: Setup sandbox url was incorrect
132
- * Cleanup: Support newest sandbox conventions
133
-
134
- == Version 8.10.1 (March 2, 2012)
135
-
136
- * Feature: Allow use without the configuration file
137
- * Bugfix: Reauth works
138
- * Cleanup: Use ruby conventions
139
-
140
- == Version 8.10.0 (February 17, 2012)
141
-
142
- * Initial release