LitleOnline 9.12.0 → 10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +7 -16
  3. data/CONTRIBUTORS +0 -0
  4. data/DESCRIPTION +2 -2
  5. data/LICENSE +1 -1
  6. data/README.md +9 -9
  7. data/Rakefile +9 -8
  8. data/SETUP.md +3 -3
  9. data/bin/Setup.rb +4 -4
  10. data/bin/sample_batch_driver.rb +1 -1
  11. data/bin/sample_driver.rb +1 -1
  12. data/lib/Communications.rb +7 -7
  13. data/lib/Configuration.rb +1 -1
  14. data/lib/EnvironmentVariables.rb +0 -0
  15. data/lib/LitleBatchRequest.rb +22 -8
  16. data/lib/LitleListeners.rb +9 -9
  17. data/lib/LitleOnline.rb +2 -2
  18. data/lib/LitleOnlineRequest.rb +16 -10
  19. data/lib/LitleRequest.rb +10 -10
  20. data/lib/LitleTransaction.rb +66 -64
  21. data/lib/LitleXmlMapper.rb +4 -9
  22. data/lib/XMLFields.rb +129 -116
  23. data/lib/cacert.pem +0 -0
  24. data/samples/Auth/LitleAuthReversalTransaction.rb +2 -2
  25. data/samples/Auth/LitleAuthorizationTransaction.rb +1 -0
  26. data/samples/Auth/LitlePaymentFullLifeCycle.rb +12 -6
  27. data/samples/Batch/AccountUpdate.rb +1 -0
  28. data/samples/Batch/SampleBatchDriver.rb +2 -1
  29. data/samples/Capture/LitleCaptureGivenAuthTransaction.rb +2 -1
  30. data/samples/Capture/LitleCaptureTransaction.rb +2 -2
  31. data/samples/Capture/LitleForceCaptureTransaction.rb +2 -1
  32. data/samples/Capture/LitlePartialCapture.rb +3 -3
  33. data/samples/Credit/LitleCreditTransaction.rb +2 -2
  34. data/samples/Credit/LitleRefundTransaction.rb +2 -1
  35. data/samples/Other/LitleAvsTransaction.rb +2 -1
  36. data/samples/Other/LitleVoidTransaction.rb +2 -1
  37. data/samples/Paypage/FullPaypageLifeCycle.rb +7 -2
  38. data/samples/Run_all.rb +0 -0
  39. data/samples/Sale/LitleSaleTransaction.rb +2 -1
  40. data/samples/Sale/SampleSaleTransaction.rb +2 -1
  41. data/test/certification/certTest1_base.rb +53 -52
  42. data/test/certification/certTest2_authenhanced.rb +16 -15
  43. data/test/certification/certTest3_authreversal.rb +16 -15
  44. data/test/certification/certTest4_echeck.rb +11 -10
  45. data/test/certification/certTest5_token.rb +2 -1
  46. data/test/certification/certTest_batchAll.rb +40 -16
  47. data/test/certification/ts_all.rb +1 -1
  48. data/test/functional/test_activate.rb +8 -9
  49. data/test/functional/test_activateReversal.rb +4 -7
  50. data/test/functional/test_auth.rb +50 -113
  51. data/test/functional/test_authReversal.rb +6 -5
  52. data/test/functional/test_balanceInquiry.rb +5 -5
  53. data/test/functional/test_batch.rb +1 -1
  54. data/test/functional/test_batchStream.rb +3 -5
  55. data/test/functional/test_cancelSubscription.rb +3 -5
  56. data/test/functional/test_capture.rb +6 -34
  57. data/test/functional/test_captureGivenAuth.rb +13 -55
  58. data/test/functional/test_configuration.rb +1 -1
  59. data/test/functional/test_createPlan.rb +3 -5
  60. data/test/functional/test_credit.rb +10 -17
  61. data/test/functional/test_deactivate.rb +5 -5
  62. data/test/functional/test_deactivateReversal.rb +4 -5
  63. data/test/functional/test_depositReversal.rb +5 -5
  64. data/test/functional/test_echeckCredit.rb +17 -13
  65. data/test/functional/test_echeckRedeposit.rb +7 -5
  66. data/test/functional/test_echeckSale.rb +42 -21
  67. data/test/functional/test_echeckVerification.rb +19 -20
  68. data/test/functional/test_echeckVoid.rb +3 -2
  69. data/test/functional/test_forceCapture.rb +16 -30
  70. data/test/functional/test_litle_requests.rb +5 -9
  71. data/test/functional/test_load.rb +5 -5
  72. data/test/functional/test_loadReversal.rb +4 -5
  73. data/test/functional/test_override.rb +3 -0
  74. data/test/functional/test_queryTransaction.rb +146 -0
  75. data/test/functional/test_refundReversal.rb +4 -5
  76. data/test/functional/test_sale.rb +94 -170
  77. data/test/functional/test_token.rb +9 -18
  78. data/test/functional/test_unload.rb +5 -5
  79. data/test/functional/test_unloadReversal.rb +5 -6
  80. data/test/functional/test_updateCardValidationNumOnToken.rb +2 -1
  81. data/test/functional/test_updatePlan.rb +4 -5
  82. data/test/functional/test_updateSubscription.rb +5 -5
  83. data/test/functional/test_wallet.rb +74 -0
  84. data/test/functional/test_xmlfields.rb +25 -10
  85. data/test/functional/ts_all.rb +4 -2
  86. data/test/unit/test_LitleAUBatch.rb +1 -1
  87. data/test/unit/test_LitleBatchRequest.rb +4 -4
  88. data/test/unit/test_LitleOnlineRequest.rb +54 -37
  89. data/test/unit/test_LitleRequest.rb +3 -4
  90. data/test/unit/test_LitleTransaction.rb +35 -6
  91. data/test/unit/test_activate.rb +21 -1
  92. data/test/unit/test_activateReversal.rb +1 -1
  93. data/test/unit/test_auth.rb +16 -55
  94. data/test/unit/test_authReversal.rb +1 -1
  95. data/test/unit/test_balanceInquiry.rb +1 -1
  96. data/test/unit/test_cancelSubscription.rb +1 -1
  97. data/test/unit/test_capture.rb +1 -27
  98. data/test/unit/test_captureGivenAuth.rb +18 -44
  99. data/test/unit/test_createPlan.rb +1 -1
  100. data/test/unit/test_credit.rb +3 -16
  101. data/test/unit/test_deactivate.rb +1 -1
  102. data/test/unit/test_deactivateReversal.rb +1 -1
  103. data/test/unit/test_depositReversal.rb +1 -1
  104. data/test/unit/test_echeckCredit.rb +1 -1
  105. data/test/unit/test_echeckRedeposit.rb +1 -1
  106. data/test/unit/test_echeckSale.rb +2 -2
  107. data/test/unit/test_echeckVerification.rb +1 -1
  108. data/test/unit/test_echeckVoid.rb +1 -1
  109. data/test/unit/test_forceCapture.rb +2 -20
  110. data/test/unit/test_load.rb +1 -1
  111. data/test/unit/test_loadReversal.rb +1 -1
  112. data/test/unit/test_queryTransaction.rb +122 -0
  113. data/test/unit/test_refundReversal.rb +1 -1
  114. data/test/unit/test_sale.rb +8 -73
  115. data/test/unit/test_token.rb +8 -15
  116. data/test/unit/test_unload.rb +1 -1
  117. data/test/unit/test_unloadReversal.rb +1 -1
  118. data/test/unit/test_updateCardValidationNumOnToken.rb +1 -1
  119. data/test/unit/test_updatePlan.rb +1 -1
  120. data/test/unit/test_updateSubscription.rb +1 -1
  121. data/test/unit/test_wallet.rb +262 -0
  122. data/test/unit/test_xmlfields.rb +1 -1
  123. data/test/unit/ts_unit.rb +3 -3
  124. metadata +15 -16
  125. data/temp.xml +0 -21
  126. data/test/functional/test_fraudCheck.rb +0 -77
  127. data/test/functional/test_utf8.rb +0 -44
  128. data/test/unit/test_LitleXmlMapper.rb +0 -136
  129. data/test/unit/test_fraudCheck.rb +0 -45
@@ -1,6 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
3
-
2
+ Copyright (c) 2011 Litle & Co.
4
3
  Permission is hereby granted, free of charge, to any person
5
4
  obtaining a copy of this software and associated documentation
6
5
  files (the "Software"), to deal in the Software without
@@ -9,10 +8,8 @@ copy, modify, merge, publish, distribute, sublicense, and/or sell
9
8
  copies of the Software, and to permit persons to whom the
10
9
  Software is furnished to do so, subject to the following
11
10
  conditions:
12
-
13
11
  The above copyright notice and this permission notice shall be
14
12
  included in all copies or substantial portions of the Software.
15
-
16
13
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
14
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
15
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -25,7 +22,7 @@ OTHER DEALINGS IN THE SOFTWARE.
25
22
  require_relative 'Configuration'
26
23
 
27
24
  #
28
- # This class does all the heavy lifting of mapping the Ruby hash into Vantiv eCommerce XML format
25
+ # This class does all the heavy lifting of mapping the Ruby hash into Litle XML format
29
26
  # It also handles validation looking for missing or incorrect fields
30
27
  # contains the methods to properly create each transaction type
31
28
  #
@@ -36,14 +33,10 @@ module LitleOnline
36
33
  transaction.secondaryAmount = options['secondaryAmount']
37
34
  transaction.surchargeAmount = options['surchargeAmount']
38
35
  transaction.recurringRequest = RecurringRequest.from_hash(options,'recurringRequest')
39
- transaction.debtRepayment = options['debtRepayment']
40
- transaction.advancedFraudChecks = AdvancedFraudChecks.from_hash(options, 'advancedFraudChecks')
36
+ transaction.debtRepayment = options['debtRepayment']
37
+ transaction.advancedFraudChecks= AdvancedFraudChecks.from_hash(options, 'advancedFraudChecks')
41
38
  add_transaction_info(transaction, options)
42
- #9.10
43
- transaction.wallet = Wallet.from_hash(options, 'wallet')
44
- transaction.processingType = options['processingType']
45
- transaction.originalNetworkTransactionId = options['originalNetworkTransactionId']
46
- transaction.originalTransactionAmount = options['originalTransactionAmount']
39
+
47
40
  return transaction
48
41
  end
49
42
 
@@ -196,23 +189,16 @@ module LitleOnline
196
189
  def sale(options)
197
190
  transaction = Sale.new
198
191
  add_transaction_info(transaction, options)
199
- transaction.secondaryAmount = options['secondaryAmount']
200
- transaction.surchargeAmount = options['surchargeAmount']
201
- transaction.fraudCheck = FraudCheck.from_hash(options,'fraudCheck')
202
- transaction.payPalOrderComplete = options['payPalOrderComplete']
203
- transaction.payPalNotes = options['payPalNotes']
204
- transaction.recurringRequest = RecurringRequest.from_hash(options,'recurringRequest')
205
- transaction.litleInternalRecurringRequest = LitleInternalRecurringRequest.from_hash(options,'litleInternalRecurringRequest')
206
- transaction.debtRepayment = options['debtRepayment']
207
- transaction.advancedFraudChecks = AdvancedFraudChecks.from_hash(options, 'advancedFraudChecks')
208
- #9.10
209
- transaction.wallet = Wallet.from_hash(options, 'wallet')
210
- transaction.processingType = options['processingType']
211
- transaction.originalNetworkTransactionId = options['originalNetworkTransactionId']
212
- transaction.originalTransactionAmount = options['originalTransactionAmount']
213
- #9.12
214
- transaction.sepaDirectDebit = SepaDirectDebitType.from_hash(options,'sepaDirectDebit')
215
- transaction.ideal = IdealType.from_hash(options,'ideal')
192
+ transaction.secondaryAmount = options['secondaryAmount']
193
+ transaction.surchargeAmount = options['surchargeAmount']
194
+ transaction.fraudCheck = FraudCheck.from_hash(options,'fraudCheck')
195
+ transaction.payPalOrderComplete = options['payPalOrderComplete']
196
+ transaction.payPalNotes = options['payPalNotes']
197
+ transaction.recurringRequest = RecurringRequest.from_hash(options,'recurringRequest')
198
+ transaction.litleInternalRecurringRequest = LitleInternalRecurringRequest.from_hash(options,'litleInternalRecurringRequest')
199
+ transaction.debtRepayment = options['debtRepayment']
200
+ transaction.advancedFraudChecks = AdvancedFraudChecks.from_hash(options, 'advancedFraudChecks')
201
+
216
202
  return transaction
217
203
  end
218
204
 
@@ -237,9 +223,6 @@ module LitleOnline
237
223
  transaction.enhancedData = EnhancedData.from_hash(options)
238
224
  transaction.processingInstructions = ProcessingInstructions.from_hash(options)
239
225
  transaction.pos = Pos.from_hash(options)
240
- #9.10
241
- transaction.pin = options['pin']
242
- #9.10 end
243
226
  transaction.billMeLaterRequest = BillMeLaterRequest.from_hash(options)
244
227
  transaction.payPalNotes = options['payPalNotes']
245
228
  transaction.actionReason = options['actionReason']
@@ -290,12 +273,10 @@ module LitleOnline
290
273
 
291
274
  def force_capture(options)
292
275
  transaction = ForceCapture.new
293
- transaction.secondaryAmount = options['secondaryAmount']
276
+ transaction.secondaryAmount = options['secondaryAmount']
294
277
  transaction.surchargeAmount = options['surchargeAmount']
295
278
  transaction.customBilling = CustomBilling.from_hash(options)
296
- transaction.debtRepayment = options['debtRepayment']
297
- #9.10
298
- transaction.processingType = options['processingType']
279
+ transaction.debtRepayment = options['debtRepayment']
299
280
  add_order_info(transaction, options)
300
281
 
301
282
  return transaction
@@ -312,10 +293,7 @@ module LitleOnline
312
293
  transaction.processingInstructions = ProcessingInstructions.from_hash(options)
313
294
  transaction.payPalOrderComplete = options['payPalOrderComplete']
314
295
  transaction.payPalNotes = options['payPalNotes']
315
- #9.10
316
- transaction.customBilling = CustomBilling.from_hash(options)
317
- transaction.pin = options['pin']
318
-
296
+
319
297
  add_account_info(transaction, options)
320
298
  return transaction
321
299
  end
@@ -323,17 +301,13 @@ module LitleOnline
323
301
  def capture_given_auth(options)
324
302
  transaction = CaptureGivenAuth.new
325
303
  add_order_info(transaction, options)
326
- transaction.secondaryAmount = options['secondaryAmount']
327
- transaction.surchargeAmount = options['surchargeAmount']
328
- transaction.authInformation = AuthInformation.from_hash(options)
329
- transaction.shipToAddress = Contact.from_hash(options,'shipToAddress')
330
- transaction.customBilling = CustomBilling.from_hash(options)
331
- transaction.billMeLaterRequest = BillMeLaterRequest.from_hash(options)
332
- transaction.debtRepayment = options['debtRepayment']
333
- #9.10
334
- transaction.processingType = options['processingType']
335
- transaction.originalNetworkTransactionId = options['originalNetworkTransactionId']
336
- transaction.originalTransactionAmount = options['originalTransactionAmount']
304
+ transaction.secondaryAmount = options['secondaryAmount']
305
+ transaction.surchargeAmount = options['surchargeAmount']
306
+ transaction.authInformation = AuthInformation.from_hash(options)
307
+ transaction.shipToAddress = Contact.from_hash(options,'shipToAddress')
308
+ transaction.customBilling = CustomBilling.from_hash(options)
309
+ transaction.billMeLaterRequest = BillMeLaterRequest.from_hash(options)
310
+ transaction.debtRepayment = options['debtRepayment']
337
311
  return transaction
338
312
  end
339
313
 
@@ -434,6 +408,30 @@ module LitleOnline
434
408
 
435
409
  return transaction
436
410
  end
411
+
412
+ #SDK XML 10
413
+
414
+ def funding_txn_void(options)
415
+ transaction = FundingInstructionVoid.new
416
+ transaction.litleTxnId = options['litleTxnId']
417
+ add_account_info(transaction, options)
418
+
419
+ return transaction
420
+ end
421
+
422
+ #SDK XML 10
423
+ def query_Transaction(options)
424
+ transaction = QueryTransaction.new
425
+ transaction.origId = options['origId']
426
+ transaction.origActionType = options['origActionType']
427
+ transaction.origLitleTxnId = options['origLitleTxnId']
428
+ transaction.origOrderId = options['origOrderId']
429
+ transaction.origAccountNumber = options['origAccountNumber']
430
+ add_account_info(transaction, options)
431
+
432
+ return transaction
433
+ end
434
+
437
435
 
438
436
  def submerchant_debit(options)
439
437
  transaction = SubmerchantDebit.new
@@ -539,16 +537,18 @@ module LitleOnline
539
537
 
540
538
  return transaction
541
539
  end
542
-
543
- def fraud_check_request(options)
544
- transaction = FraudCheckRequest.new
545
- transaction.advancedFraudChecks = AdvancedFraudChecks.from_hash(options,'advancedFraudChecks')
546
- transaction.transactionId = options["id"]
547
-
548
- add_account_info(transaction, options)
549
-
550
- return transaction
551
- end
540
+ #
541
+ # def fraud_check_request(options)
542
+ # transaction = FraudCheckRequest.new
543
+ # transaction.advancedFraudChecks = AdvancedFraudChecks.from_hash(options,'advancedFraudChecks')
544
+ # transaction.billToAddress = Contact.from_hash(options,'billToAddress')
545
+ # transaction.shipToAddress = Contact.from_hash(options,'shipToAddress')
546
+ # transaction.amount = options['amount']
547
+ #
548
+ # add_account_info(transaction, options)
549
+ #
550
+ # return transaction
551
+ # end
552
552
 
553
553
  private
554
554
 
@@ -573,9 +573,11 @@ module LitleOnline
573
573
  transaction.customBilling = CustomBilling.from_hash(options)
574
574
  transaction.paypal = PayPal.from_hash(options,'paypal')
575
575
  transaction.applepay = Applepay.from_hash(options,'applepay')
576
-
576
+ #SDK Ruby XML 10
577
+ transaction.wallet = Wallet.from_hash(options, 'wallet')
578
+
577
579
  add_order_info(transaction, options)
578
- end
580
+ end
579
581
 
580
582
  def add_order_info(transaction, options)
581
583
  transaction.amount = options['amount']
@@ -614,4 +616,4 @@ module LitleOnline
614
616
  options['reportGroup']
615
617
  end
616
618
  end
617
- end
619
+ end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
2
+ Copyright (c) 2011 Litle & Co.
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
@@ -27,7 +27,7 @@ require 'logger'
27
27
 
28
28
  #
29
29
  # Handles round trip of transactions
30
- # Maps the request to Vantiv eCommerce XML -> Sends XML payload to Vantiv eCommerce via HTTP(S) -> formats XML response into a Ruby hash and returns it
30
+ # Maps the request to Litle XML -> Sends XML payload to Litle via HTTP(S) -> formats XML response into a Ruby hash and returns it
31
31
  #
32
32
  module LitleOnline
33
33
  class LitleXmlMapper
@@ -35,19 +35,14 @@ module LitleOnline
35
35
  logger = initialize_logger(config_hash)
36
36
 
37
37
  logger.debug request_xml
38
- # get the Vantiv eCommerce Online Response from the API server over HTTP
38
+ # get the Litle Online Response from the API server over HTTP
39
39
  response_xml = Communications.http_post(request_xml,config_hash)
40
40
  logger.debug response_xml
41
41
 
42
42
  # create response object from xml returned form the Litle API
43
43
  response_object = XMLObject.new(response_xml)
44
44
 
45
- # Check if the response xml is valid.
46
- if (response_object.response == "0")
47
- return response_object
48
- else
49
- raise("Error with http response, code: " + response_object.response + ", message: " + response_object.message)
50
- end
45
+ return response_object
51
46
  end
52
47
 
53
48
  private
@@ -1,6 +1,5 @@
1
1
  =begin
2
- Copyright (c) 2017 Vantiv eCommerce
3
-
2
+ Copyright (c) 2011 Litle & Co.
4
3
  Permission is hereby granted, free of charge, to any person
5
4
  obtaining a copy of this software and associated documentation
6
5
  files (the "Software"), to deal in the Software without
@@ -9,10 +8,8 @@ copy, modify, merge, publish, distribute, sublicense, and/or sell
9
8
  copies of the Software, and to permit persons to whom the
10
9
  Software is furnished to do so, subject to the following
11
10
  conditions:
12
-
13
11
  The above copyright notice and this permission notice shall be
14
12
  included in all copies or substantial portions of the Software.
15
-
16
13
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
14
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
15
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -299,6 +296,28 @@ module LitleOnline
299
296
  end
300
297
  end
301
298
 
299
+
300
+ #SDK XML 10
301
+ class Wallet
302
+ include XML::Mapping
303
+ text_node :walletSourceType, "walletSourceType", :default_value=>nil
304
+ text_node :walletSourceTypeId, "walletSourceTypeId", :default_value=>nil
305
+ def self.from_hash(hash, name='wallet')
306
+ base = hash[name]
307
+ if(base)
308
+ this = Wallet.new
309
+ this.walletSourceType = base['walletSourceType']
310
+ this.walletSourceTypeId = base['walletSourceTypeId']
311
+ SchemaValidation.validate_required(this.walletSourceType,true,name,'walletSourceType')
312
+ SchemaValidation.validate_required(this.walletSourceTypeId,true,name,'walletSourceTypeId')
313
+ SchemaValidation.validate_enum(this.walletSourceType, false, ['MasterPass','VisaCheckout'], name, 'walletSourceType')
314
+ this
315
+ else
316
+ nil
317
+ end
318
+ end
319
+ end
320
+
302
321
  class FraudCheck
303
322
  include XML::Mapping
304
323
  text_node :authenticationValue, "authenticationValue", :default_value=>nil
@@ -628,7 +647,6 @@ module LitleOnline
628
647
  text_node :number, "number", :default_value=>nil
629
648
  text_node :expDate, "expDate", :default_value=>nil
630
649
  text_node :cardValidationNum, "cardValidationNum", :default_value=>nil
631
- text_node :pin, "pin", :default_value=>nil
632
650
  def self.from_hash(hash, name='card')
633
651
  base = hash[name]
634
652
  if(base)
@@ -638,13 +656,11 @@ module LitleOnline
638
656
  this.number = base['number']
639
657
  this.expDate = base['expDate']
640
658
  this.cardValidationNum = base['cardValidationNum']
641
- this.pin = base['pin']
642
659
  SchemaValidation.validate_enum(this.mop, false, ['','MC','VI','AX','DC','DI','PP','JC','BL','EC','GC'], name, 'type')
643
660
  SchemaValidation.validate_length(this.track, false, 1, 256, name, 'track')
644
661
  SchemaValidation.validate_length(this.number, false, 13, 25, name, 'number')
645
662
  SchemaValidation.validate_length(this.expDate, false, 4, 4, name, 'expDate')
646
663
  SchemaValidation.validate_length(this.cardValidationNum, false, 1, 4, name, 'cardValidationNum')
647
- SchemaValidation.validate_length(this.pin, false, 4, 12, name, 'pin')
648
664
  this
649
665
  else
650
666
  nil
@@ -666,10 +682,16 @@ module LitleOnline
666
682
  this.ephemeralPublicKey = base['ephemeralPublicKey']
667
683
  this.publicKeyHash = base['publicKeyHash']
668
684
  this.transactionId = base['transactionId']
669
- SchemaValidation.validate_length(this.applicationData,true,0,10000,name,'applicationData')
670
- SchemaValidation.validate_length(this.ephemeralPublicKey,true,0,400,name,'ephemeralPublicKey')
671
- SchemaValidation.validate_length(this.publicKeyHash,true,0,200,name,'publicKeyHash')
672
- SchemaValidation.validate_length(this.transactionId,true,0,250,name,'transactionId')
685
+ SchemaValidation.validate_required(this.applicationData,true,name,'applicationData')
686
+ SchemaValidation.validate_required(this.ephemeralPublicKey,true,name,'ephemeralPublicKey')
687
+ SchemaValidation.validate_required(this.publicKeyHash,true,name,'publicKeyHash')
688
+ SchemaValidation.validate_required(this.transactionId,true,name,'transactionId')
689
+ #01.28.2016
690
+ SchemaValidation.validate_length(this.applicationData, true, 1, 10000 , name, 'applicationData')
691
+ SchemaValidation.validate_length(this.ephemeralPublicKey, true, 1, 400 , name, 'ephemeralPublicKey')
692
+ SchemaValidation.validate_length(this.publicKeyHash, true, 1, 200 , name, 'publicKeyHash')
693
+ SchemaValidation.validate_length(this.transactionId, true, 1, 250 , name, 'transactionId')
694
+ #01.28.2016
673
695
  this
674
696
  else
675
697
  nil
@@ -691,10 +713,15 @@ module LitleOnline
691
713
  this.header = ApplepayHeader.from_hash(base)
692
714
  this.signature = base['signature']
693
715
  this.version = base['version']
694
- SchemaValidation.validate_length(this.data,true,0,2000,name,'data')
716
+ SchemaValidation.validate_required(this.data,true,name,'data')
695
717
  SchemaValidation.validate_required(this.header,true,name,'header')
696
- SchemaValidation.validate_length(this.signature,true,0,10000,name,'signature')
697
- SchemaValidation.validate_length(this.version,true,5,20,name,'version')
718
+ SchemaValidation.validate_required(this.signature,true,name,'signature')
719
+ SchemaValidation.validate_required(this.version,true,name,'version')
720
+ #01.28.2016
721
+ SchemaValidation.validate_length(this.data, true, 1, 2000 , name, 'data')
722
+ SchemaValidation.validate_length(this.signature, true, 1, 10000 , name, 'signature')
723
+ SchemaValidation.validate_length(this.version, true, 5, 20 , name, 'version')
724
+ #01.28.2016
698
725
  this
699
726
  else
700
727
  nil
@@ -1258,6 +1285,8 @@ module LitleOnline
1258
1285
  include XML::Mapping
1259
1286
  root_element_name "activate"
1260
1287
  text_node :reportGroup, "@reportGroup", :default_value=>nil
1288
+ #SDK XML 10
1289
+ text_node :transactionId, "@id", :default_value=>nil
1261
1290
  text_node :orderId,'orderId', :default_value=>nil
1262
1291
  text_node :amount, "amount", :default_value=>nil
1263
1292
  text_node :orderSource, "orderSource", :default_value=>nil
@@ -1270,6 +1299,8 @@ module LitleOnline
1270
1299
  include XML::Mapping
1271
1300
  root_element_name "deactivate"
1272
1301
  text_node :reportGroup, "@reportGroup", :default_value=>nil
1302
+ #SDK XML 10
1303
+ text_node :transactionId, "@id", :default_value=>nil
1273
1304
  text_node :orderId,'orderId', :default_value=>nil
1274
1305
  text_node :orderSource, "orderSource", :default_value=>nil
1275
1306
  object_node :card,'card',:class=>Card, :default_value=>nil
@@ -1279,6 +1310,8 @@ module LitleOnline
1279
1310
  include XML::Mapping
1280
1311
  root_element_name "load"
1281
1312
  text_node :reportGroup, "@reportGroup", :default_value=>nil
1313
+ #SDK XML 10
1314
+ text_node :transactionId, "@id", :default_value=>nil
1282
1315
  text_node :orderId,'orderId', :default_value=>nil
1283
1316
  text_node :amount, "amount", :default_value=>nil
1284
1317
  text_node :orderSource, "orderSource", :default_value=>nil
@@ -1289,6 +1322,8 @@ module LitleOnline
1289
1322
  include XML::Mapping
1290
1323
  root_element_name "unload"
1291
1324
  text_node :reportGroup, "@reportGroup", :default_value=>nil
1325
+ #SDK XML 10
1326
+ text_node :transactionId, "@id", :default_value=>nil
1292
1327
  text_node :orderId,'orderId', :default_value=>nil
1293
1328
  text_node :amount, "amount", :default_value=>nil
1294
1329
  text_node :orderSource, "orderSource", :default_value=>nil
@@ -1299,6 +1334,8 @@ module LitleOnline
1299
1334
  include XML::Mapping
1300
1335
  root_element_name "balanceInquiry"
1301
1336
  text_node :reportGroup, "@reportGroup", :default_value=>nil
1337
+ #SDK XML 10
1338
+ text_node :transactionId, "@id", :default_value=>nil
1302
1339
  text_node :orderId,'orderId', :default_value=>nil
1303
1340
  text_node :orderSource, "orderSource", :default_value=>nil
1304
1341
  object_node :card,'card',:class=>Card, :default_value=>nil
@@ -1333,82 +1370,19 @@ module LitleOnline
1333
1370
  end
1334
1371
  end
1335
1372
  end
1373
+ #
1374
+ # class FraudCheckRequest
1375
+ # include XML::Mapping
1376
+ # root_element_name "fraudCheck"
1377
+ # text_node :reportGroup, "@reportGroup", :default_value=>nil
1378
+ # text_node :transactionId, "@id", :default_value=>nil
1379
+ # text_node :customerId, "@customerId", :default_value=>nil
1380
+ # object_node :advancedFraudChecks, "advancedFraudChecks", :default_value=>nil
1381
+ # object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
1382
+ # object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
1383
+ # text_node :amount, "amount", :default_value=>nil
1384
+ # end
1336
1385
 
1337
- class FraudCheckRequest
1338
- include XML::Mapping
1339
- root_element_name "fraudCheck"
1340
- text_node :reportGroup, "@reportGroup", :default_value=>nil
1341
- text_node :transactionId, "@id", :default_value=>nil
1342
- text_node :customerId, "@customerId", :default_value=>nil
1343
- object_node :advancedFraudChecks, "advancedFraudChecks", :default_value=>nil
1344
- object_node :billToAddress, "billToAddress", :class=>Contact, :default_value=>nil
1345
- object_node :shipToAddress, "shipToAddress", :class=>Contact, :default_value=>nil
1346
- text_node :amount, "amount", :default_value=>nil
1347
- end
1348
-
1349
- class Wallet
1350
- include XML::Mapping
1351
- text_node :walletSourceType, "walletSourceType", :default_value=>nil
1352
- text_node :walletSourceTypeId, "walletSourceTypeId", :default_value=>nil
1353
- def self.from_hash(hash, name='wallet')
1354
- base = hash[name]
1355
- if(base)
1356
- this = Wallet.new
1357
- this.walletSourceType = base['walletSourceType']
1358
- this.walletSourceTypeId = base['walletSourceTypeId']
1359
- SchemaValidation.validate_enum(this.walletSourceType, false, ['MasterPass','VisaCheckout'], name, 'walletSourceType')
1360
- SchemaValidation.validate_required(this.walletSourceTypeId,true,name,'walletSourceTypeId')
1361
- this
1362
- else
1363
- nil
1364
- end
1365
- end
1366
- end
1367
-
1368
- class SepaDirectDebitType
1369
- include XML::Mapping
1370
- root_element_name "sepaDirectDebit"
1371
- text_node :mandateProvider, "mandateProvider", :default_value=>nil
1372
- text_node :sequenceType, "sequenceType", :default_value=>nil
1373
- text_node :mandateReference, "mandateReference", :default_value=>nil
1374
- text_node :mandateUrl, "mandateUrl", :default_value=>nil
1375
- text_node :mandateSignatureDate, "mandateSignatureDate", :default_value=>nil
1376
- text_node :iban, "iban", :default_value=>nil
1377
- text_node :preferredLanguage, "preferredLanguage", :default_value=>nil
1378
- def self.from_hash(hash, name='sepaDirectDebit')
1379
- base = hash[name]
1380
- if(base)
1381
- this = SepaDirectDebitType.new
1382
- this.mandateProvider = base['mandateProvider']
1383
- this.sequenceType = base['sequenceType']
1384
- this.mandateReference = base['mandateReference']
1385
- this.mandateUrl = base['mandateUrl']
1386
- this.mandateSignatureDate = base['mandateSignatureDate']
1387
- this.iban = base['iban']
1388
- this.preferredLanguage = base['preferredLanguage']
1389
- this
1390
- else
1391
- nil
1392
- end
1393
- end
1394
- end
1395
-
1396
- class IdealType
1397
- include XML::Mapping
1398
- root_element_name "ideal"
1399
- text_node :preferredLanguage, "preferredLanguage", :default_value=>nil
1400
- def self.from_hash(hash, name='ideal')
1401
- base = hash[name]
1402
- if(base)
1403
- this = IdealType.new
1404
- this.preferredLanguage = base['preferredLanguage']
1405
- this
1406
- else
1407
- nil
1408
- end
1409
- end
1410
- end
1411
-
1412
1386
  class Authorization
1413
1387
  include XML::Mapping
1414
1388
  root_element_name "authorization"
@@ -1448,11 +1422,8 @@ module LitleOnline
1448
1422
  object_node :recurringRequest,"recurringRequest", :class=>RecurringRequest, :default_value=>nil
1449
1423
  text_node :debtRepayment,"debtRepayment", :default_value=>nil
1450
1424
  object_node :advancedFraudChecks, "advancedFraudChecks",:class=>AdvancedFraudChecks, :default_value=>nil
1451
- #9.10
1452
- object_node :wallet,"wallet", :class=>Wallet, :default_value=>nil
1453
- text_node :processingType,"processingType", :default_value=>nil
1454
- text_node :originalNetworkTransactionId,"originalNetworkTransactionId", :default_value=>nil
1455
- text_node :originalTransactionAmount,"originalTransactionAmount", :default_value=>nil
1425
+ #SDK XML 10
1426
+ object_node :wallet, "wallet", :class=>Wallet, :default_value=>nil
1456
1427
  end
1457
1428
 
1458
1429
  class Sale
@@ -1476,9 +1447,7 @@ module LitleOnline
1476
1447
  :elsif, 'token', :then, (object_node :token, "token", :class=>CardToken),
1477
1448
  :elsif, 'paypage', :then, (object_node :paypage, "paypage", :class=>CardPaypage),
1478
1449
  :elsif, 'mpos', :then, (object_node :mpos, "mpos", :class=>Mpos),
1479
- :elsif, 'applepay', :then, (object_node :applepay, "applepay", :class=>Applepay),
1480
- :elsif, 'sepaDirectDebit', :then, (object_node :sepaDirectDebit, "sepaDirectDebit", :class=>SepaDirectDebitType),
1481
- :elsif, 'ideal', :then, (object_node :ideal, "ideal", :class=>IdealType)
1450
+ :elsif, 'applepay', :then, (object_node :applepay, "applepay", :class=>Applepay)
1482
1451
  object_node :billMeLaterRequest, "billMeLaterRequest", :class=>BillMeLaterRequest, :default_value=>nil
1483
1452
  optional_choice_node :if, 'fraudCheck', :then, (object_node :fraudCheck, "fraudCheck", :class=>FraudCheck, :default_value=>nil),
1484
1453
  :elsif, 'cardholderAuthentication', :then, (object_node :cardholderAuthentication, "cardholderAuthentication", :class=>FraudCheck, :default_value=>nil)
@@ -1500,11 +1469,8 @@ module LitleOnline
1500
1469
  object_node :litleInternalRecurringRequest, "litleInternalRecurringRequest", :class=>LitleInternalRecurringRequest, :default_value=>nil
1501
1470
  text_node :debtRepayment,"debtRepayment", :default_value=>nil
1502
1471
  object_node :advancedFraudChecks, "advancedFraudChecks",:class=>AdvancedFraudChecks, :default_value=>nil
1503
- #9.10
1504
- object_node :wallet,"wallet", :class=>Wallet, :default_value=>nil
1505
- text_node :processingType,"processingType", :default_value=>nil
1506
- text_node :originalNetworkTransactionId,"originalNetworkTransactionId", :default_value=>nil
1507
- text_node :originalTransactionAmount,"originalTransactionAmount", :default_value=>nil
1472
+ #SDK XML 10
1473
+ object_node :wallet, "wallet", :class=>Wallet, :default_value=>nil
1508
1474
  end
1509
1475
 
1510
1476
  class Credit
@@ -1532,9 +1498,6 @@ module LitleOnline
1532
1498
  object_node :enhancedData, "enhancedData", :class=>EnhancedData, :default_value=>nil
1533
1499
  object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
1534
1500
  object_node :pos, "pos", :class=>Pos, :default_value=>nil
1535
- #9.10
1536
- text_node :pin, "pin", :default_value=>nil
1537
- #9.10 end
1538
1501
  object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
1539
1502
  object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1540
1503
  text_node :payPalNotes, "payPalNotes", :default_value=>nil
@@ -1583,10 +1546,6 @@ module LitleOnline
1583
1546
  object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
1584
1547
  object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1585
1548
  text_node :debtRepayment,"debtRepayment", :default_value=>nil
1586
- #9.10
1587
- text_node :processingType,"processingType", :default_value=>nil
1588
- text_node :originalNetworkTransactionId,"originalNetworkTransactionId", :default_value=>nil
1589
- text_node :originalTransactionAmount,"originalTransactionAmount", :default_value=>nil
1590
1549
  end
1591
1550
 
1592
1551
  class ForceCapture
@@ -1614,8 +1573,6 @@ module LitleOnline
1614
1573
  object_node :amexAggregatorData, "amexAggregatorData", :class=>AmexAggregatorData, :default_value=>nil
1615
1574
  object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
1616
1575
  text_node :debtRepayment,"debtRepayment", :default_value=>nil
1617
- #9.10
1618
- text_node :processingType,"processingType", :default_value=>nil
1619
1576
  end
1620
1577
 
1621
1578
  class AuthReversal
@@ -1648,9 +1605,6 @@ module LitleOnline
1648
1605
  object_node :processingInstructions, "processingInstructions", :class=>ProcessingInstructions, :default_value=>nil
1649
1606
  text_node :payPalOrderComplete, "payPalOrderComplete", :default_value=>nil
1650
1607
  text_node :payPalNotes, "payPalNotes", :default_value=>nil
1651
- #9.10
1652
- object_node :customBilling, "customBilling", :class=>CustomBilling, :default_value=>nil
1653
- text_node :pin, "pin", :default_value=>nil
1654
1608
  end
1655
1609
 
1656
1610
  class Void
@@ -1846,7 +1800,7 @@ module LitleOnline
1846
1800
  text_node :amount, "amount", :default_value=>nil
1847
1801
  object_node :accountInfo, "accountInfo", :class=>Echeck, :default_value=>nil
1848
1802
  end
1849
-
1803
+
1850
1804
  class PayFacCredit
1851
1805
  include XML::Mapping
1852
1806
  root_element_name "payFacCredit"
@@ -1985,10 +1939,58 @@ module LitleOnline
1985
1939
  :elsif, 'token', :then, (object_node :token, "token", :class=>CardToken)
1986
1940
  end
1987
1941
 
1942
+ # Adding the Funding Void Instruction Class
1943
+ # Date: 01-25-2016
1944
+ # Change Type: New
1945
+ # Desc: Change proposed as a part of XML 10 to incorporate the feature of voiding transactions
1946
+ # on request.
1947
+ class FundingInstructionVoid
1948
+ include XML::Mapping
1949
+ root_element_name "fundingInstructionVoid"
1950
+ text_node :litleTxnId, "litleTxnId", :default_value=>nil
1951
+ end
1952
+
1953
+ # Adding the queryTransaction Class
1954
+ # Date: 01-27-2016
1955
+ # Change Type: New
1956
+ # Desc: Change proposed as a part of XML 10 to incorporate the feature of querying transactions
1957
+ # on request.
1958
+ class QueryTransaction
1959
+ include XML::Mapping
1960
+ root_element_name "queryTransaction"
1961
+ text_node :reportGroup, "@reportGroup", :default_value=>nil
1962
+ text_node :transactionId, "@id", :default_value=>nil
1963
+ text_node :customerId, "@customerId", :default_value=>nil
1964
+ text_node :origId, "origId", :default_value=>nil
1965
+ text_node :origActionType, "origActionType", :default_value=>nil
1966
+ text_node :origLitleTxnId, "origLitleTxnId", :default_value=>nil
1967
+ text_node :origOrderId, "origOrderId", :default_value=>nil
1968
+ text_node :origAccountNumber, "origAccountNumber", :default_value=>nil
1969
+ def self.from_hash(hash, name='queryTransaction')
1970
+ base = hash[name]
1971
+ if(base)
1972
+ this = QueryTransaction.new
1973
+ this.origId = base['origId']
1974
+ this.origActionType = base['origActionType']
1975
+ this.origLitleTxnId = base['origLitleTxnId']
1976
+ this.origOrderId = base['origOrderId']
1977
+ this.origAccountNumber = base['origAccountNumber']
1978
+ SchemaValidation.validate_required(this.origId,true,name,'origId')
1979
+ SchemaValidation.validate_required(this.origActionType,true,name,'origActionType')
1980
+ 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')
1981
+ this
1982
+ else
1983
+ nil
1984
+ end
1985
+ end
1986
+ end
1987
+
1988
1988
  class OnlineRequest
1989
1989
  include XML::Mapping
1990
1990
  root_element_name "litleOnlineRequest"
1991
1991
  text_node :merchantId, "@merchantId", :default_value=>nil
1992
+ #SDK XML 10
1993
+ text_node :id, "@id", :default_value=>nil
1992
1994
  text_node :version, "@version", :default_value=>nil
1993
1995
  text_node :xmlns, "@xmlns", :default_value=>nil
1994
1996
  text_node :merchantSdk, "@merchantSdk", :default_value=>nil
@@ -2026,7 +2028,8 @@ module LitleOnline
2026
2028
  :elsif, 'loadReversal', :then, (object_node :loadReversal,"loadReversal", :class=>LoadReversal),
2027
2029
  :elsif, 'unloadReversal', :then, (object_node :unloadReversal,"unloadReversal", :class=>UnloadReversal),
2028
2030
  :elsif, 'advancedFraudResults', :then, (object_node :advancedFraudResults,"advancedFraudResults", :class=>AdvancedFraudResults),
2029
- :elsif, 'fraudCheck', :then, (object_node :fraudCheck, "fraudCheck", :class=>FraudCheck)
2031
+ #SDK XML 10
2032
+ :elsif, 'queryTransaction', :then, (object_node :queryTransaction, "queryTransaction", :class=>QueryTransaction)
2030
2033
  def post_save(xml, options={:Mapping=>:_default})
2031
2034
  xml.each_element() {|el|
2032
2035
  if(el.name == 'captureTxn')
@@ -2102,10 +2105,17 @@ module LitleOnline
2102
2105
  text_node :unloadAmount,"@unloadAmount",:default_value=>"0"
2103
2106
  text_node :numBalanceInquirys,"@numBalanceInquirys",:default_value=>"0"
2104
2107
  text_node :merchantSdk,"merchantSdk",:default_value=>"0"
2108
+ # SDK XML 10
2109
+ text_node :numFundingInstructionVoid, "@numFundingInstructionVoid", :default_value=>"0"
2105
2110
  end
2106
2111
 
2107
2112
  class LitleRequest
2108
2113
  include XML::Mapping
2114
+ # version="6.0" xmlns="http://www.litle.com/schema" numBatchRequests = "1">
2115
+ # <authentication>
2116
+ # <user>XMLTESTV6ORG14</user>
2117
+ # <password>password</password>
2118
+ # </authentication>
2109
2119
  root_element_name "litleRequest"
2110
2120
 
2111
2121
  text_node :version, "@version", :default_value=>"0"
@@ -2140,7 +2150,10 @@ module LitleOnline
2140
2150
  object_node :authentication, "authentication", :class=>Authentication
2141
2151
  object_node :rfrRequest, 'RFRRequest', :class=>LitleRFRRequest
2142
2152
  end
2153
+
2143
2154
 
2155
+
2156
+
2144
2157
  # begin
2145
2158
  # class LitleOnlineResponse
2146
2159
  # attr_accessor :message