CnpOnline 12.1.1 → 12.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +6 -0
- data/Rakefile +2 -2
- data/lib/CnpBatchRequest.rb +13 -2
- data/lib/CnpOnlineRequest.rb +10 -4
- data/lib/CnpRequest.rb +2 -2
- data/lib/CnpTransaction.rb +22 -2
- data/lib/XMLFields.rb +169 -42
- data/test/certification/certTest1_base.rb +5 -4
- data/test/certification/certTest2_authenhanced.rb +51 -50
- data/test/certification/certTest3_authreversal.rb +6 -3
- data/test/certification/certTest4_echeck.rb +7 -6
- data/test/certification/certTest5_token.rb +15 -13
- data/test/functional/test_auth.rb +31 -1
- data/test/functional/test_capture.rb +25 -0
- data/test/functional/test_captureGivenAuth.rb +35 -1
- data/test/functional/test_credit.rb +31 -1
- data/test/functional/test_fastAccessFunding.rb +156 -0
- data/test/functional/test_forceCapture.rb +32 -0
- data/test/functional/test_fraudCheck.rb +1 -1
- data/test/functional/test_queryTransaction.rb +53 -52
- data/test/functional/test_sale.rb +54 -2
- data/test/functional/test_translateToken.rb +203 -0
- data/test/unit/test_LitleOnlineRequest.rb +1 -1
- metadata +5 -5
- data/CHANGELOG~ +0 -5
- data/Rakefile~ +0 -90
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cef590b8463a6f6118c20299168b6031a8fa03233274457f257e30ba35d49d2
|
4
|
+
data.tar.gz: b5ea9c7fbebe24a1fa599420eec7afe016ce5a82351d4cd1baf88d276fc64523
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00e1f8333670f342d9c2539a89d65d5a63609d2163758373d03f5171f51ed449b9ef0d0be25168ee00cb4d5c9d4dc92ddeed072ef1d370111268c1f3355005b0
|
7
|
+
data.tar.gz: ad514732266f706a30b9751ebb9eaaeac6ef0f3d2cf1776ab148cdbd9ff3b6a0153a91461b2a8af6ad2194f1a812717cc31035ae5c89ae2fcd18b31ff9ae9cc4
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
==Version 12.3.0 (May 10, 2018)
|
2
|
+
*Feature: Added LodgingInfo support
|
3
|
+
*Feature: Added TranslateToLowTokenValue support
|
4
|
+
*Feature: Added PinlessDebitRequest support
|
5
|
+
*Update: Additional fields to QueryTransaction & Fraudcheck requests
|
6
|
+
|
1
7
|
==Version 12.1.1 (April 05, 2018)
|
2
8
|
* Bugfix: nil defaults for proxy_addr & proxy_port
|
3
9
|
|
data/Rakefile
CHANGED
@@ -28,11 +28,11 @@ require 'rake/clean'
|
|
28
28
|
spec = Gem::Specification.new do |s|
|
29
29
|
FileUtils.rm_rf('pkg')
|
30
30
|
s.name = 'CnpOnline'
|
31
|
-
s.summary = 'Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv eCommerce XML format v12.
|
31
|
+
s.summary = 'Ruby SDK produced by Vantiv eCommerce for transaction processing using Vantiv eCommerce XML format v12.3'
|
32
32
|
s.description = File.read(File.join(File.dirname(__FILE__), 'DESCRIPTION'))
|
33
33
|
s.requirements =
|
34
34
|
['Contact sdksupport@vantiv.com for more information']
|
35
|
-
s.version = '12.
|
35
|
+
s.version = '12.3.0'
|
36
36
|
s.author = 'Vantiv - eCommerce'
|
37
37
|
s.email = 'sdksupport@vantiv.com'
|
38
38
|
s.homepage = 'https://developer.vantiv.com/community/ecommerce/pages/sdks#jive_content_id_Ruby_SDK'
|
data/lib/CnpBatchRequest.rb
CHANGED
@@ -44,7 +44,8 @@ module CnpOnline
|
|
44
44
|
:authReversal=>{ :numAuthReversals=>0, :authReversalAmount=>0 },
|
45
45
|
#12.1
|
46
46
|
:fastAccessFunding=>{ :numFastAccessFunding=>0, :fastAccessFundingAmount=>0 },
|
47
|
-
#12.
|
47
|
+
#12.3
|
48
|
+
:numTranslateToLowValueTokenRequests=>0,
|
48
49
|
#12.0 begin
|
49
50
|
:giftCardAuthReversal=>{ :numGiftCardAuthReversals=>0, :giftCardAuthReversalOriginalAmount=>0 },
|
50
51
|
#end
|
@@ -221,6 +222,13 @@ module CnpOnline
|
|
221
222
|
add_txn_to_batch(transaction, :fastAccessFunding, options)
|
222
223
|
end
|
223
224
|
|
225
|
+
def translate_to_low_value_token_request(options)
|
226
|
+
transaction = @cnp_txn.translate_to_low_value_token_request(options)
|
227
|
+
@txn_counts[:numTranslateToLowValueTokenRequests] += 1
|
228
|
+
|
229
|
+
add_txn_to_batch(transaction, :translateToLowValueTokenRequests, options)
|
230
|
+
end
|
231
|
+
|
224
232
|
def gift_card_auth_reversal(options)
|
225
233
|
transaction = @cnp_txn.gift_card_auth_reversal(options)
|
226
234
|
@txn_counts[:giftCardAuthReversal][:numGiftCardAuthReversals] += 1
|
@@ -536,10 +544,13 @@ module CnpOnline
|
|
536
544
|
request.forceCaptureAmount = @txn_counts[:forceCapture][:forceCaptureAmount]
|
537
545
|
request.numAuthReversals = @txn_counts[:authReversal][:numAuthReversals]
|
538
546
|
request.authReversalAmount = @txn_counts[:authReversal][:authReversalAmount]
|
547
|
+
# 12.3 begin
|
548
|
+
request.numTranslateToLowValueTokenRequests = @txn_counts[:numTranslateToLowValueTokenRequests]
|
549
|
+
# 12.3 end
|
539
550
|
# 12.1 begin
|
540
551
|
request.numFastAccessFunding = @txn_counts[:fastAccessFunding][:numFastAccessFunding]
|
541
552
|
request.fastAccessFundingAmount = @txn_counts[:fastAccessFunding][:fastAccessFundingAmount]
|
542
|
-
# end
|
553
|
+
# 12.1 end
|
543
554
|
# 12.0 begin
|
544
555
|
request.numGiftCardAuthReversals = @txn_counts[:giftCardAuthReversal][:numGiftCardAuthReversals]
|
545
556
|
request.giftCardAuthReversalOriginalAmount = @txn_counts[:giftCardAuthReversal][:giftCardAuthReversalOriginalAmount]
|
data/lib/CnpOnlineRequest.rb
CHANGED
@@ -122,11 +122,17 @@ module CnpOnline
|
|
122
122
|
end
|
123
123
|
|
124
124
|
def fast_access_funding(options)
|
125
|
-
transaction = @
|
125
|
+
transaction = @cnp_transaction.fast_access_funding(options)
|
126
126
|
|
127
127
|
commit(transaction, :fastAccessFunding, options)
|
128
128
|
end
|
129
129
|
|
130
|
+
def translate_to_low_value_token_request(options)
|
131
|
+
transaction = @cnp_transaction.translate_to_low_value_token_request(options)
|
132
|
+
|
133
|
+
commit(transaction, :translateToLowValueTokenRequest, options)
|
134
|
+
end
|
135
|
+
|
130
136
|
def giftCardCredit(options)
|
131
137
|
transaction = @cnp_transaction.giftCardCredit(options)
|
132
138
|
|
@@ -190,7 +196,7 @@ module CnpOnline
|
|
190
196
|
|
191
197
|
def update_card_validation_num_on_token(options)
|
192
198
|
transaction = @cnp_transaction.update_card_validation_num_on_token(options)
|
193
|
-
|
199
|
+
|
194
200
|
commit(transaction, :updateCardValidationNumOnToken, options)
|
195
201
|
end
|
196
202
|
|
@@ -289,7 +295,7 @@ module CnpOnline
|
|
289
295
|
|
290
296
|
request.authentication = authentication
|
291
297
|
request.merchantId = get_merchant_id(options)
|
292
|
-
request.version = '12.
|
298
|
+
request.version = '12.3'
|
293
299
|
request.loggedInUser = get_logged_in_user(options)
|
294
300
|
request.xmlns = "http://www.vantivcnp.com/schema"
|
295
301
|
request.merchantSdk = get_merchant_sdk(options)
|
@@ -319,7 +325,7 @@ module CnpOnline
|
|
319
325
|
end
|
320
326
|
|
321
327
|
def get_merchant_sdk(options)
|
322
|
-
options['merchantSdk'] || 'Ruby;12.
|
328
|
+
options['merchantSdk'] || 'Ruby;12.3'
|
323
329
|
end
|
324
330
|
|
325
331
|
def get_report_group(options)
|
data/lib/CnpRequest.rb
CHANGED
@@ -207,7 +207,7 @@ module CnpOnline
|
|
207
207
|
cnpRequest.authentication = authentication
|
208
208
|
cnpRequest.numBatchRequests = "0"
|
209
209
|
|
210
|
-
cnpRequest.version = '12.
|
210
|
+
cnpRequest.version = '12.3'
|
211
211
|
cnpRequest.xmlns = "http://www.vantivcnp.com/schema"
|
212
212
|
|
213
213
|
|
@@ -459,7 +459,7 @@ module CnpOnline
|
|
459
459
|
authentication.password = get_config(:password, options)
|
460
460
|
|
461
461
|
cnp_request.authentication = authentication
|
462
|
-
cnp_request.version = '12.
|
462
|
+
cnp_request.version = '12.3'
|
463
463
|
cnp_request.xmlns = "http://www.vantivcnp.com/schema"
|
464
464
|
# cnp_request.id = options['sessionId'] #grab from options; okay if nil
|
465
465
|
cnp_request.numBatchRequests = @num_batch_requests
|
data/lib/CnpTransaction.rb
CHANGED
@@ -50,6 +50,14 @@ module CnpOnline
|
|
50
50
|
return transaction
|
51
51
|
end
|
52
52
|
|
53
|
+
def translate_to_low_value_token_request(options)
|
54
|
+
transaction = TranslateToLowValueTokenRequest.new
|
55
|
+
add_account_info(transaction, options)
|
56
|
+
transaction.orderId = options['orderId']
|
57
|
+
transaction.token = options['token']
|
58
|
+
return transaction
|
59
|
+
end
|
60
|
+
|
53
61
|
def authorization(options)
|
54
62
|
transaction = Authorization.new
|
55
63
|
transaction.secondaryAmount = options['secondaryAmount']
|
@@ -59,6 +67,7 @@ module CnpOnline
|
|
59
67
|
transaction.advancedFraudChecks= AdvancedFraudChecks.from_hash(options, 'advancedFraudChecks')
|
60
68
|
#SDK XML 11
|
61
69
|
transaction.wallet = Wallet.from_hash(options, 'wallet')
|
70
|
+
transaction.lodgingInfo = LodgingInfo.from_hash(options, 'lodgingInfo')
|
62
71
|
transaction.processingType = options['processingType']
|
63
72
|
transaction.originalNetworkTransactionId = options['originalNetworkTransactionId']
|
64
73
|
transaction.originalTransactionAmount = options['originalTransactionAmount']
|
@@ -299,13 +308,18 @@ module CnpOnline
|
|
299
308
|
transaction.cnpInternalRecurringRequest = CnpInternalRecurringRequest.from_hash(options,'cnpInternalRecurringRequest')
|
300
309
|
transaction.debtRepayment = options['debtRepayment']
|
301
310
|
transaction.advancedFraudChecks = AdvancedFraudChecks.from_hash(options, 'advancedFraudChecks')
|
311
|
+
|
302
312
|
#SDK XML 11
|
303
313
|
transaction.wallet = Wallet.from_hash(options, 'wallet')
|
304
314
|
transaction.processingType = options['processingType']
|
305
315
|
transaction.originalNetworkTransactionId = options['originalNetworkTransactionId']
|
306
316
|
transaction.originalTransactionAmount = options['originalTransactionAmount']
|
307
317
|
transaction.sepaDirectDebit = SepaDirectDebit.from_hash(options,'sepaDirectDebit')
|
308
|
-
|
318
|
+
|
319
|
+
#SDK 12
|
320
|
+
transaction.lodgingInfo = LodgingInfo.from_hash(options, 'lodgingInfo')
|
321
|
+
transaction.pinlessDebitRequest = PinlessDebitRequestType.from_hash(options, 'pinlessDebitRequest')
|
322
|
+
|
309
323
|
return transaction
|
310
324
|
end
|
311
325
|
|
@@ -328,6 +342,7 @@ module CnpOnline
|
|
328
342
|
transaction.surchargeAmount = options['surchargeAmount']
|
329
343
|
transaction.customBilling = CustomBilling.from_hash(options)
|
330
344
|
transaction.enhancedData = EnhancedData.from_hash(options)
|
345
|
+
transaction.lodgingInfo = LodgingInfo.from_hash(options)
|
331
346
|
transaction.processingInstructions = ProcessingInstructions.from_hash(options)
|
332
347
|
transaction.pos = Pos.from_hash(options)
|
333
348
|
transaction.billMeLaterRequest = BillMeLaterRequest.from_hash(options)
|
@@ -385,6 +400,7 @@ module CnpOnline
|
|
385
400
|
transaction.secondaryAmount = options['secondaryAmount']
|
386
401
|
transaction.surchargeAmount = options['surchargeAmount']
|
387
402
|
transaction.customBilling = CustomBilling.from_hash(options)
|
403
|
+
transaction.lodgingInfo = LodgingInfo.from_hash(options)
|
388
404
|
transaction.debtRepayment = options['debtRepayment']
|
389
405
|
#SDK XML 11
|
390
406
|
transaction.processingType = options['processingType']
|
@@ -407,6 +423,8 @@ module CnpOnline
|
|
407
423
|
transaction.payPalNotes = options['payPalNotes']
|
408
424
|
#SDK XML 11
|
409
425
|
transaction.customBilling = CustomBilling.from_hash(options)
|
426
|
+
#SDK XML 12
|
427
|
+
transaction.lodgingInfo = LodgingInfo.from_hash(options)
|
410
428
|
transaction.pin = options['pin']
|
411
429
|
|
412
430
|
add_account_info(transaction, options)
|
@@ -421,6 +439,7 @@ module CnpOnline
|
|
421
439
|
transaction.authInformation = AuthInformation.from_hash(options)
|
422
440
|
transaction.shipToAddress = Contact.from_hash(options,'shipToAddress')
|
423
441
|
transaction.customBilling = CustomBilling.from_hash(options)
|
442
|
+
transaction.lodgingInfo = LodgingInfo.from_hash(options)
|
424
443
|
transaction.billMeLaterRequest = BillMeLaterRequest.from_hash(options)
|
425
444
|
transaction.debtRepayment = options['debtRepayment']
|
426
445
|
#SDK XML 11
|
@@ -550,7 +569,8 @@ module CnpOnline
|
|
550
569
|
transaction.origId = options['origId']
|
551
570
|
transaction.origActionType = options['origActionType']
|
552
571
|
transaction.origCnpTxnId = options['origCnpTxnId']
|
553
|
-
|
572
|
+
transaction.showStatusOnly = options['showStatusOnly']
|
573
|
+
# transaction.origOrderId = options['origOrderId']
|
554
574
|
# transaction.origAccountNumber = options['origAccountNumber']
|
555
575
|
add_account_info(transaction, options)
|
556
576
|
|
data/lib/XMLFields.rb
CHANGED
@@ -300,8 +300,8 @@ module CnpOnline
|
|
300
300
|
#SDK XML 10
|
301
301
|
class Wallet
|
302
302
|
include XML::Mapping
|
303
|
-
text_node :walletSourceType, "walletSourceType", :default_value=>nil
|
304
|
-
text_node :walletSourceTypeId, "walletSourceTypeId", :default_value=>nil
|
303
|
+
text_node :walletSourceType, "walletSourceType", :default_value=>nil
|
304
|
+
text_node :walletSourceTypeId, "walletSourceTypeId", :default_value=>nil
|
305
305
|
def self.from_hash(hash, name='wallet')
|
306
306
|
base = hash[name]
|
307
307
|
if(base)
|
@@ -316,7 +316,7 @@ module CnpOnline
|
|
316
316
|
nil
|
317
317
|
end
|
318
318
|
end
|
319
|
-
end
|
319
|
+
end
|
320
320
|
|
321
321
|
|
322
322
|
class FraudCheck
|
@@ -1320,6 +1320,106 @@ module CnpOnline
|
|
1320
1320
|
end
|
1321
1321
|
end
|
1322
1322
|
|
1323
|
+
class LodgingCharge
|
1324
|
+
include XML::Mapping
|
1325
|
+
text_node :name, "name", :default_value=>nil
|
1326
|
+
def self.from_hash(hash, name='lodgingCharge')
|
1327
|
+
base = hash[name]
|
1328
|
+
if(base)
|
1329
|
+
this = LodgingCharge.new
|
1330
|
+
this.name = base['name']
|
1331
|
+
SchemaValidation.validate_required(this.name,true,name,'name')
|
1332
|
+
SchemaValidation.validate_enum(this.name, false, ['RESTAURANT','GIFTSHOP','MINIBAR','TELEPHONE','OTHER','LAUNDRY'], name, 'name')
|
1333
|
+
this
|
1334
|
+
else
|
1335
|
+
nil
|
1336
|
+
end
|
1337
|
+
end
|
1338
|
+
end
|
1339
|
+
|
1340
|
+
class LodgingInfo
|
1341
|
+
include XML::Mapping
|
1342
|
+
text_node :hotelFolioNumber, "hotelFolioNumber", :default_value=>nil
|
1343
|
+
text_node :checkInDate, "checkInDate", :default_value=>nil
|
1344
|
+
text_node :checkOutDate, "checkOutDate", :default_value=>nil
|
1345
|
+
text_node :duration, "duration", :default_value=>nil
|
1346
|
+
text_node :customerServicePhone, "customerServicePhone", :default_value=>nil
|
1347
|
+
text_node :programCode, "programCode", :default_value=>nil
|
1348
|
+
text_node :roomRate, "roomRate", :default_value=>nil
|
1349
|
+
text_node :roomTax, "roomTax", :default_value=>nil
|
1350
|
+
text_node :numAdults, "numAdults", :default_value=>nil
|
1351
|
+
text_node :propertyLocalPhone, "propertyLocalPhone", :default_value=>nil
|
1352
|
+
text_node :fireSafetyIndicator, "fireSafetyIndicator", :default_value=>nil
|
1353
|
+
object_node :lodgingCharge, "lodgingCharge", :class=>LodgingCharge, :default_value=>nil
|
1354
|
+
def self.from_hash(hash, name='lodgingInfo')
|
1355
|
+
base = hash[name]
|
1356
|
+
if(base)
|
1357
|
+
this = LodgingInfo.new
|
1358
|
+
this.hotelFolioNumber = base['hotelFolioNumber']
|
1359
|
+
this.checkInDate = base['checkInDate']
|
1360
|
+
this.checkOutDate = base['checkOutDate']
|
1361
|
+
this.duration = base['duration']
|
1362
|
+
this.customerServicePhone = base['customerServicePhone']
|
1363
|
+
this.programCode = base['programCode']
|
1364
|
+
this.roomRate = base['roomRate']
|
1365
|
+
this.roomTax = base['roomTax']
|
1366
|
+
this.numAdults = base['numAdults']
|
1367
|
+
this.propertyLocalPhone = base['propertyLocalPhone']
|
1368
|
+
this.fireSafetyIndicator = base['fireSafetyIndicator']
|
1369
|
+
this.lodgingCharge = LodgingCharge.from_hash(base)
|
1370
|
+
SchemaValidation.validate_length(this.hotelFolioNumber, false, 1, 25, name, 'hotelFolioNumber')
|
1371
|
+
SchemaValidation.validate_date(this.checkInDate, false, name, 'hotelFolioNumber')
|
1372
|
+
SchemaValidation.validate_date(this.checkOutDate, false, name, 'hotelFolioNumber')
|
1373
|
+
SchemaValidation.validate_size(this.duration, false, 0, 999, name, 'duration')
|
1374
|
+
SchemaValidation.validate_length(this.customerServicePhone, false, 1, 17, name, 'customerServicePhone')
|
1375
|
+
SchemaValidation.validate_enum(this.programCode, false, ['LODGING','NOSHOW','ADVANCEDDEPOSIT'], name, 'programCode')
|
1376
|
+
SchemaValidation.validate_size(this.roomRate, false, -999999999999, 999999999999, name, 'roomRate')
|
1377
|
+
SchemaValidation.validate_size(this.roomTax, false, -999999999999, 999999999999, name, 'roomTax')
|
1378
|
+
SchemaValidation.validate_size(this.numAdults, false, 0, 99, name, 'numAdults')
|
1379
|
+
SchemaValidation.validate_length(this.propertyLocalPhone, false, 1, 17, name, 'propertyLocalPhone')
|
1380
|
+
SchemaValidation.validate_boolean(this.fireSafetyIndicator, false, name, 'fireSafetyIndicator')
|
1381
|
+
this
|
1382
|
+
else
|
1383
|
+
nil
|
1384
|
+
end
|
1385
|
+
end
|
1386
|
+
end
|
1387
|
+
|
1388
|
+
class PreferredDebitNetworksType
|
1389
|
+
include XML::Mapping
|
1390
|
+
text_node :debitNetworkName, "debitNetworkName", :default_value=>nil
|
1391
|
+
def self.from_hash(hash, name='preferredDebitNetworks')
|
1392
|
+
base = hash[name]
|
1393
|
+
if(base)
|
1394
|
+
this = PreferredDebitNetworksType.new
|
1395
|
+
this.debitNetworkName = base['debitNetworkName']
|
1396
|
+
SchemaValidation.validate_length(this.debitNetworkName, true, 1, 25, name, 'debitNetworkName')
|
1397
|
+
this
|
1398
|
+
else
|
1399
|
+
nil
|
1400
|
+
end
|
1401
|
+
end
|
1402
|
+
end
|
1403
|
+
|
1404
|
+
class PinlessDebitRequestType
|
1405
|
+
include XML::Mapping
|
1406
|
+
text_node :routingPreference, "routingPreference", :default_value=>nil
|
1407
|
+
object_node :preferredDebitNetworks, "preferredDebitNetworks", :class=>PreferredDebitNetworksType,:default_value=>nil
|
1408
|
+
def self.from_hash(hash, name='pinlessDebitRequest')
|
1409
|
+
base = hash[name]
|
1410
|
+
if(base)
|
1411
|
+
this = PinlessDebitRequestType.new
|
1412
|
+
this.routingPreference = base['routingPreference']
|
1413
|
+
this.preferredDebitNetworks = PreferredDebitNetworksType.from_hash(base)
|
1414
|
+
SchemaValidation.validate_enum(this.routingPreference, false, ['pinlessDebitOnly','signatureOnly','regular'], name, 'routingPreference')
|
1415
|
+
this
|
1416
|
+
else
|
1417
|
+
nil
|
1418
|
+
end
|
1419
|
+
end
|
1420
|
+
end
|
1421
|
+
|
1422
|
+
|
1323
1423
|
class Activate
|
1324
1424
|
include XML::Mapping
|
1325
1425
|
root_element_name "activate"
|
@@ -1384,6 +1484,7 @@ module CnpOnline
|
|
1384
1484
|
include XML::Mapping
|
1385
1485
|
root_element_name "advancedFraudChecks"
|
1386
1486
|
text_node :threatMetrixSessionId, 'threatMetrixSessionId', :default_value=>nil
|
1487
|
+
text_node :webSessionId, 'webSessionId', :default_value=>nil
|
1387
1488
|
text_node :customAttribute1, 'customAttribute1', :default_value=>nil
|
1388
1489
|
text_node :customAttribute2, 'customAttribute2', :default_value=>nil
|
1389
1490
|
text_node :customAttribute3, 'customAttribute3', :default_value=>nil
|
@@ -1395,6 +1496,8 @@ module CnpOnline
|
|
1395
1496
|
this = AdvancedFraudChecks.new
|
1396
1497
|
this.threatMetrixSessionId = base['threatMetrixSessionId'] # /\A([A-Z,a-z,0-9, ,\*,,,\-,',#,&,.]){4,25}\Z/
|
1397
1498
|
#SchemaValidation.validate_regex(this.threatMetrixSessionId, true, '[-a-zA-Z0-9_]{1,128}', name, 'threatMetrixSessionId')
|
1499
|
+
this.webSessionId = base['webSessionId']
|
1500
|
+
#SchemaValidation.validate_regex(this.webSessionId, true, '[-a-zA-Z0-9_]{1,128}', name, 'webSessionId')
|
1398
1501
|
this.customAttribute1 = base['customAttribute1']
|
1399
1502
|
SchemaValidation.validate_length(this.customAttribute1,false,1,200,name,"customAttribute1")
|
1400
1503
|
this.customAttribute2 = base['customAttribute2']
|
@@ -1420,6 +1523,10 @@ module CnpOnline
|
|
1420
1523
|
object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
|
1421
1524
|
object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
|
1422
1525
|
text_node :amount, "amount", :default_value=>nil
|
1526
|
+
text_node :eventType, "eventType", :default_value=>nil
|
1527
|
+
text_node :accountLogin, "accountLogin", :default_value=>nil
|
1528
|
+
text_node :accountPasshash, "accountPasshash", :default_value=>nil
|
1529
|
+
|
1423
1530
|
end
|
1424
1531
|
|
1425
1532
|
class Authorization
|
@@ -1467,6 +1574,8 @@ module CnpOnline
|
|
1467
1574
|
text_node :processingType,"processingType", :default_value=>nil
|
1468
1575
|
text_node :originalNetworkTransactionId,"originalNetworkTransactionId", :default_value=>nil
|
1469
1576
|
text_node :originalTransactionAmount,"originalTransactionAmount", :default_value=>nil
|
1577
|
+
#SDK XML 12
|
1578
|
+
object_node :lodgingInfo, "lodgingInfo", :class=>LodgingInfo, :default_value=>nil
|
1470
1579
|
end
|
1471
1580
|
|
1472
1581
|
class Sale
|
@@ -1520,7 +1629,8 @@ module CnpOnline
|
|
1520
1629
|
text_node :originalNetworkTransactionId,"originalNetworkTransactionId", :default_value=>nil
|
1521
1630
|
text_node :originalTransactionAmount,"originalTransactionAmount", :default_value=>nil
|
1522
1631
|
#SDK XML 12
|
1523
|
-
|
1632
|
+
object_node :lodgingInfo, "lodgingInfo", :class=>LodgingInfo, :default_value=>nil
|
1633
|
+
object_node :pinlessDebitRequest, "pinlessDebitRequest", :class=>PinlessDebitRequestType, :default_value=>nil
|
1524
1634
|
|
1525
1635
|
end
|
1526
1636
|
|
@@ -1555,7 +1665,9 @@ module CnpOnline
|
|
1555
1665
|
text_node :actionReason, "actionReason", :default_value=>nil
|
1556
1666
|
#SDK XML 11
|
1557
1667
|
text_node :pin, "pin", :default_value=>nil
|
1558
|
-
|
1668
|
+
#SDK XML 12
|
1669
|
+
object_node :lodgingInfo, "lodgingInfo", :class=>LodgingInfo, :default_value=>nil
|
1670
|
+
|
1559
1671
|
end
|
1560
1672
|
|
1561
1673
|
class RegisterTokenRequest
|
@@ -1603,7 +1715,9 @@ module CnpOnline
|
|
1603
1715
|
#SDK XML 11
|
1604
1716
|
text_node :processingType,"processingType", :default_value=>nil
|
1605
1717
|
text_node :originalNetworkTransactionId,"originalNetworkTransactionId", :default_value=>nil
|
1606
|
-
text_node :originalTransactionAmount,"originalTransactionAmount", :default_value=>nil
|
1718
|
+
text_node :originalTransactionAmount,"originalTransactionAmount", :default_value=>nil
|
1719
|
+
#SDK XML 12
|
1720
|
+
object_node :lodgingInfo, "lodgingInfo", :class=>LodgingInfo, :default_value=>nil
|
1607
1721
|
end
|
1608
1722
|
|
1609
1723
|
class ForceCapture
|
@@ -1633,6 +1747,9 @@ module CnpOnline
|
|
1633
1747
|
text_node :debtRepayment,"debtRepayment", :default_value=>nil
|
1634
1748
|
#SDK XML 11
|
1635
1749
|
text_node :processingType,"processingType", :default_value=>nil
|
1750
|
+
#SDK XML 12
|
1751
|
+
object_node :lodgingInfo, "lodgingInfo", :class=>LodgingInfo, :default_value=>nil
|
1752
|
+
|
1636
1753
|
end
|
1637
1754
|
|
1638
1755
|
class AuthReversal
|
@@ -1668,6 +1785,8 @@ module CnpOnline
|
|
1668
1785
|
#SDK XML 11
|
1669
1786
|
object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
|
1670
1787
|
text_node :pin, "pin", :default_value=>nil
|
1788
|
+
#SDK XML 12
|
1789
|
+
object_node :lodgingInfo, "lodgingInfo", :class=>LodgingInfo, :default_value=>nil
|
1671
1790
|
end
|
1672
1791
|
|
1673
1792
|
class Void
|
@@ -2136,11 +2255,6 @@ module CnpOnline
|
|
2136
2255
|
text_node :cnpTxnId, "cnpTxnId", :default_value=>nil
|
2137
2256
|
end
|
2138
2257
|
|
2139
|
-
# Adding the Funding Void Instruction Class
|
2140
|
-
# Date: 01-25-2016
|
2141
|
-
# Change Type: New
|
2142
|
-
# Desc: Change proposed as a part of XML 10 to incorporate the feature of voiding transactions
|
2143
|
-
# on request.
|
2144
2258
|
class FastAccessFunding
|
2145
2259
|
include XML::Mapping
|
2146
2260
|
root_element_name "fastAccessFunding"
|
@@ -2162,35 +2276,46 @@ module CnpOnline
|
|
2162
2276
|
# Change Type: New
|
2163
2277
|
# Desc: Change proposed as a part of XML 10 to incorporate the feature of querying transactions
|
2164
2278
|
# on request.
|
2165
|
-
class QueryTransaction
|
2166
|
-
|
2167
|
-
|
2168
|
-
|
2169
|
-
|
2170
|
-
|
2171
|
-
|
2172
|
-
|
2173
|
-
|
2174
|
-
|
2175
|
-
|
2176
|
-
|
2177
|
-
|
2178
|
-
|
2179
|
-
|
2180
|
-
|
2181
|
-
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2186
|
-
|
2187
|
-
|
2188
|
-
|
2189
|
-
|
2190
|
-
|
2191
|
-
|
2192
|
-
|
2193
|
-
end
|
2279
|
+
class QueryTransaction
|
2280
|
+
include XML::Mapping
|
2281
|
+
root_element_name "queryTransaction"
|
2282
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
2283
|
+
text_node :transactionId, "@id", :default_value=>nil
|
2284
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
2285
|
+
text_node :origId, "origId", :default_value=>nil
|
2286
|
+
text_node :origActionType, "origActionType", :default_value=>nil
|
2287
|
+
text_node :origCnpTxnId, "origCnpTxnId", :default_value=>nil
|
2288
|
+
text_node :showStatusOnly, "showStatusOnly", :default_value=>nil
|
2289
|
+
#text_node :origOrderId, "origOrderId", :default_value=>nil
|
2290
|
+
#text_node :origAccountNumber, "origAccountNumber", :default_value=>nil
|
2291
|
+
def self.from_hash(hash, name='queryTransaction')
|
2292
|
+
base = hash[name]
|
2293
|
+
if(base)
|
2294
|
+
this = QueryTransaction.new
|
2295
|
+
this.origId = base['origId']
|
2296
|
+
this.origActionType = base['origActionType']
|
2297
|
+
this.origCnpTxnId = base['origCnpTxnId']
|
2298
|
+
this.origOrderId = base['origOrderId']
|
2299
|
+
this.origAccountNumber = base['origAccountNumber']
|
2300
|
+
SchemaValidation.validate_enum(this.origActionType, false, ['','A','D','R','AR','G','I','J','L','LR','P','RR','S','T','UR','V','W','X'], name, 'origActionType')
|
2301
|
+
SchemaValidation.validate_enum(this.origActionType, false, ['Y','N'], name, 'showStatusOnly')
|
2302
|
+
this
|
2303
|
+
else
|
2304
|
+
nil
|
2305
|
+
end
|
2306
|
+
end
|
2307
|
+
end
|
2308
|
+
|
2309
|
+
class TranslateToLowValueTokenRequest
|
2310
|
+
include XML::Mapping
|
2311
|
+
root_element_name "translateToLowValueTokenRequest"
|
2312
|
+
text_node :reportGroup, "@reportGroup", :default_value=>nil
|
2313
|
+
text_node :transactionId, "@id", :default_value=>nil
|
2314
|
+
text_node :customerId, "@customerId", :default_value=>nil
|
2315
|
+
|
2316
|
+
text_node :orderId, "orderId", :default_value=>nil
|
2317
|
+
text_node :token, "token", :default_value=>nil
|
2318
|
+
end
|
2194
2319
|
|
2195
2320
|
class OnlineRequest
|
2196
2321
|
include XML::Mapping
|
@@ -2240,8 +2365,9 @@ end
|
|
2240
2365
|
:elsif, 'advancedFraudResults', :then, (object_node :advancedFraudResults,"advancedFraudResults", :class=>AdvancedFraudResults),
|
2241
2366
|
:elsif, 'queryTransaction', :then, (object_node :queryTransaction, "queryTransaction", :class=>QueryTransaction),
|
2242
2367
|
:elsif, 'fraudCheck', :then, (object_node :fraudCheck, "fraudCheck", :class=>FraudCheck),
|
2243
|
-
:elsif, 'fastAccessFunding', :then, (object_node :fastAccessFunding, "fastAccessFunding", :class=>FastAccessFunding)
|
2244
|
-
|
2368
|
+
:elsif, 'fastAccessFunding', :then, (object_node :fastAccessFunding, "fastAccessFunding", :class=>FastAccessFunding),
|
2369
|
+
:elsif, 'translateToLowValueTokenRequest', :then, (object_node :translateToLowValueTokenRequest, "translateToLowValueTokenRequest", :class=>TranslateToLowValueTokenRequest)
|
2370
|
+
def post_save(xml, options={:Mapping=>:_default})
|
2245
2371
|
xml.each_element() {|el|
|
2246
2372
|
if(el.name == 'captureTxn')
|
2247
2373
|
el.name = 'capture'
|
@@ -2333,6 +2459,7 @@ end
|
|
2333
2459
|
text_node :physicalCheckCreditAmount , "@physicalCheckCreditAmount", :default_value=>"0"
|
2334
2460
|
text_node :fastAccessFundingAmount , "@fastAccessFundingAmount", :default_value=>"0"
|
2335
2461
|
text_node :merchantId, "@merchantId", :default_value=>nil
|
2462
|
+
text_node :numTranslateToLowValueTokenRequests, "@numTranslateToLowValueTokenRequests", :default_value=>"0"
|
2336
2463
|
end
|
2337
2464
|
|
2338
2465
|
class CnpRequest
|