globalpayments-api 1.4.9 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -3
- package/package.json +3 -4
- package/lib/src/Builders/AuthorizationBuilder.d.ts +0 -325
- package/lib/src/Builders/AuthorizationBuilder.js +0 -599
- package/lib/src/Builders/BaseBuilder/ValidationClause.d.ts +0 -14
- package/lib/src/Builders/BaseBuilder/ValidationClause.js +0 -61
- package/lib/src/Builders/BaseBuilder/ValidationTarget.d.ts +0 -16
- package/lib/src/Builders/BaseBuilder/ValidationTarget.js +0 -28
- package/lib/src/Builders/BaseBuilder/Validations.d.ts +0 -11
- package/lib/src/Builders/BaseBuilder/Validations.js +0 -56
- package/lib/src/Builders/BaseBuilder.d.ts +0 -11
- package/lib/src/Builders/BaseBuilder.js +0 -16
- package/lib/src/Builders/ManagementBuilder.d.ts +0 -103
- package/lib/src/Builders/ManagementBuilder.js +0 -227
- package/lib/src/Builders/PayFacBuilder.d.ts +0 -96
- package/lib/src/Builders/PayFacBuilder.js +0 -184
- package/lib/src/Builders/RecurringBuilder.d.ts +0 -13
- package/lib/src/Builders/RecurringBuilder.js +0 -47
- package/lib/src/Builders/ReportBuilder.d.ts +0 -8
- package/lib/src/Builders/ReportBuilder.js +0 -36
- package/lib/src/Builders/TransactionBuilder.d.ts +0 -10
- package/lib/src/Builders/TransactionBuilder.js +0 -46
- package/lib/src/Builders/TransactionReportBuilder.d.ts +0 -15
- package/lib/src/Builders/TransactionReportBuilder.js +0 -79
- package/lib/src/Builders/index.d.ts +0 -7
- package/lib/src/Builders/index.js +0 -19
- package/lib/src/Entities/Address.d.ts +0 -13
- package/lib/src/Entities/Address.js +0 -19
- package/lib/src/Entities/BatchSummary.d.ts +0 -6
- package/lib/src/Entities/BatchSummary.js +0 -9
- package/lib/src/Entities/Customer.d.ts +0 -64
- package/lib/src/Entities/Customer.js +0 -47
- package/lib/src/Entities/DocumentUploadData.d.ts +0 -13
- package/lib/src/Entities/DocumentUploadData.js +0 -48
- package/lib/src/Entities/EcommerceInfo.d.ts +0 -12
- package/lib/src/Entities/EcommerceInfo.js +0 -14
- package/lib/src/Entities/EncryptionData.d.ts +0 -6
- package/lib/src/Entities/EncryptionData.js +0 -9
- package/lib/src/Entities/Enums.d.ts +0 -273
- package/lib/src/Entities/Enums.js +0 -385
- package/lib/src/Entities/Errors.d.ts +0 -23
- package/lib/src/Entities/Errors.js +0 -106
- package/lib/src/Entities/HostedPaymentData.d.ts +0 -10
- package/lib/src/Entities/HostedPaymentData.js +0 -10
- package/lib/src/Entities/ProFac/AccountBalanceResponseData.d.ts +0 -7
- package/lib/src/Entities/ProFac/AccountBalanceResponseData.js +0 -9
- package/lib/src/Entities/ProFac/AccountPermissions.d.ts +0 -15
- package/lib/src/Entities/ProFac/AccountPermissions.js +0 -9
- package/lib/src/Entities/ProFac/BankAccountData.d.ts +0 -10
- package/lib/src/Entities/ProFac/BankAccountData.js +0 -9
- package/lib/src/Entities/ProFac/BankAccountOwnershipData.d.ts +0 -8
- package/lib/src/Entities/ProFac/BankAccountOwnershipData.js +0 -11
- package/lib/src/Entities/ProFac/BeneficialOwnerData.d.ts +0 -6
- package/lib/src/Entities/ProFac/BeneficialOwnerData.js +0 -10
- package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.d.ts +0 -5
- package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js +0 -9
- package/lib/src/Entities/ProFac/BusinessData.d.ts +0 -14
- package/lib/src/Entities/ProFac/BusinessData.js +0 -11
- package/lib/src/Entities/ProFac/DeviceAttributeInfo.d.ts +0 -4
- package/lib/src/Entities/ProFac/DeviceAttributeInfo.js +0 -9
- package/lib/src/Entities/ProFac/DeviceData.d.ts +0 -5
- package/lib/src/Entities/ProFac/DeviceData.js +0 -10
- package/lib/src/Entities/ProFac/DeviceInfo.d.ts +0 -6
- package/lib/src/Entities/ProFac/DeviceInfo.js +0 -9
- package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.d.ts +0 -7
- package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js +0 -13
- package/lib/src/Entities/ProFac/GrossBillingInformation.d.ts +0 -8
- package/lib/src/Entities/ProFac/GrossBillingInformation.js +0 -9
- package/lib/src/Entities/ProFac/OrderDevice.d.ts +0 -18
- package/lib/src/Entities/ProFac/OrderDevice.js +0 -9
- package/lib/src/Entities/ProFac/OwnersData.d.ts +0 -12
- package/lib/src/Entities/ProFac/OwnersData.js +0 -11
- package/lib/src/Entities/ProFac/PayFacResponseData.d.ts +0 -55
- package/lib/src/Entities/ProFac/PayFacResponseData.js +0 -9
- package/lib/src/Entities/ProFac/RenewAccountData.d.ts +0 -10
- package/lib/src/Entities/ProFac/RenewAccountData.js +0 -11
- package/lib/src/Entities/ProFac/SignificantOwnerData.d.ts +0 -8
- package/lib/src/Entities/ProFac/SignificantOwnerData.js +0 -11
- package/lib/src/Entities/ProFac/ThreatRiskData.d.ts +0 -5
- package/lib/src/Entities/ProFac/ThreatRiskData.js +0 -9
- package/lib/src/Entities/ProFac/UserPersonalData.d.ts +0 -26
- package/lib/src/Entities/ProFac/UserPersonalData.js +0 -14
- package/lib/src/Entities/RecurringEntity.d.ts +0 -14
- package/lib/src/Entities/RecurringEntity.js +0 -86
- package/lib/src/Entities/SSORequestData.d.ts +0 -5
- package/lib/src/Entities/SSORequestData.js +0 -9
- package/lib/src/Entities/Schedule.d.ts +0 -47
- package/lib/src/Entities/Schedule.js +0 -253
- package/lib/src/Entities/Transaction.d.ts +0 -78
- package/lib/src/Entities/Transaction.js +0 -108
- package/lib/src/Entities/TransactionSummary.d.ts +0 -61
- package/lib/src/Entities/TransactionSummary.js +0 -9
- package/lib/src/Entities/index.d.ts +0 -12
- package/lib/src/Entities/index.js +0 -24
- package/lib/src/Gateways/Gateway.d.ts +0 -10
- package/lib/src/Gateways/Gateway.js +0 -42
- package/lib/src/Gateways/IPayFacProvider.d.ts +0 -5
- package/lib/src/Gateways/IPayFacProvider.js +0 -2
- package/lib/src/Gateways/IPaymentGateway.d.ts +0 -8
- package/lib/src/Gateways/IPaymentGateway.js +0 -2
- package/lib/src/Gateways/IRecurringService.d.ts +0 -6
- package/lib/src/Gateways/IRecurringService.js +0 -2
- package/lib/src/Gateways/PayPlanConnector.d.ts +0 -43
- package/lib/src/Gateways/PayPlanConnector.js +0 -564
- package/lib/src/Gateways/PorticoConnector.d.ts +0 -44
- package/lib/src/Gateways/PorticoConnector.js +0 -1017
- package/lib/src/Gateways/ProPayConnector.d.ts +0 -41
- package/lib/src/Gateways/ProPayConnector.js +0 -698
- package/lib/src/Gateways/RealexConnector.d.ts +0 -30
- package/lib/src/Gateways/RealexConnector.js +0 -523
- package/lib/src/Gateways/RestGateway.d.ts +0 -6
- package/lib/src/Gateways/RestGateway.js +0 -31
- package/lib/src/Gateways/XmlGateway.d.ts +0 -6
- package/lib/src/Gateways/XmlGateway.js +0 -39
- package/lib/src/Gateways/https-wrapper.d.ts +0 -3
- package/lib/src/Gateways/https-wrapper.js +0 -35
- package/lib/src/Gateways/index.d.ts +0 -7
- package/lib/src/Gateways/index.js +0 -19
- package/lib/src/HostedPaymentConfig.d.ts +0 -12
- package/lib/src/HostedPaymentConfig.js +0 -9
- package/lib/src/PaymentMethods/Cash.d.ts +0 -8
- package/lib/src/PaymentMethods/Cash.js +0 -36
- package/lib/src/PaymentMethods/Credit.d.ts +0 -85
- package/lib/src/PaymentMethods/Credit.js +0 -106
- package/lib/src/PaymentMethods/CreditCardData.d.ts +0 -20
- package/lib/src/PaymentMethods/CreditCardData.js +0 -57
- package/lib/src/PaymentMethods/CreditTrackData.d.ts +0 -7
- package/lib/src/PaymentMethods/CreditTrackData.js +0 -27
- package/lib/src/PaymentMethods/Debit.d.ts +0 -40
- package/lib/src/PaymentMethods/Debit.js +0 -70
- package/lib/src/PaymentMethods/DebitTrackData.d.ts +0 -7
- package/lib/src/PaymentMethods/DebitTrackData.js +0 -27
- package/lib/src/PaymentMethods/EBT.d.ts +0 -48
- package/lib/src/PaymentMethods/EBT.js +0 -88
- package/lib/src/PaymentMethods/EBTCardData.d.ts +0 -16
- package/lib/src/PaymentMethods/EBTCardData.js +0 -32
- package/lib/src/PaymentMethods/EBTTrackData.d.ts +0 -8
- package/lib/src/PaymentMethods/EBTTrackData.js +0 -27
- package/lib/src/PaymentMethods/ECheck.d.ts +0 -32
- package/lib/src/PaymentMethods/ECheck.js +0 -40
- package/lib/src/PaymentMethods/GiftCard.d.ts +0 -131
- package/lib/src/PaymentMethods/GiftCard.js +0 -205
- package/lib/src/PaymentMethods/Interfaces.d.ts +0 -55
- package/lib/src/PaymentMethods/Interfaces.js +0 -2
- package/lib/src/PaymentMethods/PaymentMethod.d.ts +0 -19
- package/lib/src/PaymentMethods/PaymentMethod.js +0 -114
- package/lib/src/PaymentMethods/RecurringPaymentMethod.d.ts +0 -23
- package/lib/src/PaymentMethods/RecurringPaymentMethod.js +0 -77
- package/lib/src/PaymentMethods/TransactionReference.d.ts +0 -10
- package/lib/src/PaymentMethods/TransactionReference.js +0 -12
- package/lib/src/PaymentMethods/index.d.ts +0 -15
- package/lib/src/PaymentMethods/index.js +0 -27
- package/lib/src/Services/BatchService.d.ts +0 -4
- package/lib/src/Services/BatchService.js +0 -17
- package/lib/src/Services/CheckService.d.ts +0 -6
- package/lib/src/Services/CheckService.js +0 -20
- package/lib/src/Services/CreditService.d.ts +0 -12
- package/lib/src/Services/CreditService.js +0 -54
- package/lib/src/Services/DebitService.d.ts +0 -7
- package/lib/src/Services/DebitService.js +0 -28
- package/lib/src/Services/EBTService.d.ts +0 -8
- package/lib/src/Services/EBTService.js +0 -32
- package/lib/src/Services/GiftService.d.ts +0 -16
- package/lib/src/Services/GiftService.js +0 -54
- package/lib/src/Services/HostedService.d.ts +0 -9
- package/lib/src/Services/HostedService.js +0 -59
- package/lib/src/Services/PayFacService.d.ts +0 -26
- package/lib/src/Services/PayFacService.js +0 -77
- package/lib/src/Services/RecurringService.d.ts +0 -8
- package/lib/src/Services/RecurringService.js +0 -27
- package/lib/src/Services/ReportingService.d.ts +0 -6
- package/lib/src/Services/ReportingService.js +0 -19
- package/lib/src/Services/index.d.ts +0 -9
- package/lib/src/Services/index.js +0 -21
- package/lib/src/ServicesConfig.d.ts +0 -27
- package/lib/src/ServicesConfig.js +0 -50
- package/lib/src/ServicesContainer.d.ts +0 -14
- package/lib/src/ServicesContainer.js +0 -87
- package/lib/src/Utils/GenerationUtils.d.ts +0 -5
- package/lib/src/Utils/GenerationUtils.js +0 -36
- package/lib/src/Utils/InputValidation.d.ts +0 -12
- package/lib/src/Utils/InputValidation.js +0 -72
- package/lib/src/Utils/Sha1.d.ts +0 -6
- package/lib/src/Utils/Sha1.js +0 -225
- package/lib/src/Utils/StringUtils.d.ts +0 -6
- package/lib/src/Utils/StringUtils.js +0 -53
- package/lib/src/Utils/index.d.ts +0 -2
- package/lib/src/Utils/index.js +0 -14
- package/lib/src/index.d.ts +0 -11
- package/lib/src/index.js +0 -27
- package/lib/test/Data/TestCards.d.ts +0 -24
- package/lib/test/Data/TestCards.js +0 -232
- package/lib/test/Data/TestChecks.d.ts +0 -4
- package/lib/test/Data/TestChecks.js +0 -32
- package/lib/test/Data/index.d.ts +0 -2
- package/lib/test/Data/index.js +0 -14
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +0 -112
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +0 -483
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +0 -83
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +0 -1720
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +0 -83
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +0 -1757
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +0 -682
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +0 -2218
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +0 -707
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +0 -151
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +0 -171
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +0 -192
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +0 -377
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +0 -196
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +0 -47
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js +0 -100
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js +0 -352
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js +0 -123
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js +0 -146
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +0 -39
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +0 -371
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js +0 -100
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js +0 -535
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js +0 -124
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js +0 -144
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.d.ts +0 -33
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +0 -268
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +0 -4
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +0 -30
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js +0 -4373
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js +0 -758
- package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js +0 -2399
- package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js +0 -1656
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js +0 -5650
- package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js +0 -1985
- package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js +0 -2369
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js +0 -1703
- package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js +0 -2053
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js +0 -2469
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js +0 -3116
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js +0 -2031
- package/lib/test/Integration/Gateways/RealexConnector/CreditTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js +0 -322
- package/lib/test/Integration/Gateways/RealexConnector/HppTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/HppTest.js +0 -98
- package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js +0 -263
- package/lib/test/Integration/Services/CheckServiceTest.d.ts +0 -1
- package/lib/test/Integration/Services/CheckServiceTest.js +0 -98
- package/lib/test/Integration/Services/CreditServiceTest.d.ts +0 -1
- package/lib/test/Integration/Services/CreditServiceTest.js +0 -313
- package/lib/test/Integration/Services/DebitServiceTest.d.ts +0 -1
- package/lib/test/Integration/Services/DebitServiceTest.js +0 -154
- package/lib/test/Integration/Services/EBTServiceTest.d.ts +0 -1
- package/lib/test/Integration/Services/EBTServiceTest.js +0 -135
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +0 -1
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +0 -161
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +0 -1
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +0 -139
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +0 -1
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +0 -202
- package/lib/test/Unit/Gateways/RealexConnector/CreditTest.d.ts +0 -1
- package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js +0 -29
- package/logger.txt +0 -483
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PayFacService = void 0;
|
|
4
|
-
var PayFacBuilder_1 = require("../Builders/PayFacBuilder");
|
|
5
|
-
var Enums_1 = require("../Entities/Enums");
|
|
6
|
-
var PayFacService = /** @class */ (function () {
|
|
7
|
-
function PayFacService() {
|
|
8
|
-
}
|
|
9
|
-
PayFacService.prototype.createAccount = function () {
|
|
10
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.CreateAccount);
|
|
11
|
-
};
|
|
12
|
-
PayFacService.prototype.editAccount = function () {
|
|
13
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.EditAccount);
|
|
14
|
-
};
|
|
15
|
-
PayFacService.prototype.resetPassword = function () {
|
|
16
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.ResetPassword);
|
|
17
|
-
};
|
|
18
|
-
PayFacService.prototype.renewAccount = function () {
|
|
19
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.RenewAccount);
|
|
20
|
-
};
|
|
21
|
-
PayFacService.prototype.updateBeneficialOwnershipInfo = function () {
|
|
22
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.UpdateBeneficialOwnership);
|
|
23
|
-
};
|
|
24
|
-
PayFacService.prototype.disownAccount = function () {
|
|
25
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.DisownAccount);
|
|
26
|
-
};
|
|
27
|
-
PayFacService.prototype.uploadDocumentChargeback = function () {
|
|
28
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.UploadDocumentChargeback);
|
|
29
|
-
};
|
|
30
|
-
PayFacService.prototype.uploadDocument = function () {
|
|
31
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.UploadDocument);
|
|
32
|
-
};
|
|
33
|
-
PayFacService.prototype.obtainSSOKey = function () {
|
|
34
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.ObtainSSOKey);
|
|
35
|
-
};
|
|
36
|
-
PayFacService.prototype.updateBankAccountOwnershipInfo = function () {
|
|
37
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.UpdateBankAccountOwnership);
|
|
38
|
-
};
|
|
39
|
-
PayFacService.prototype.addFunds = function () {
|
|
40
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.AddFunds);
|
|
41
|
-
};
|
|
42
|
-
PayFacService.prototype.sweepFunds = function () {
|
|
43
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.SweepFunds);
|
|
44
|
-
};
|
|
45
|
-
PayFacService.prototype.addCardFlashFunds = function () {
|
|
46
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.AddCardFlashFunds);
|
|
47
|
-
};
|
|
48
|
-
PayFacService.prototype.pushMoneyToFlashFundsCard = function () {
|
|
49
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.PushMoneyFlashFunds);
|
|
50
|
-
};
|
|
51
|
-
PayFacService.prototype.disburseFunds = function () {
|
|
52
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.DisburseFunds);
|
|
53
|
-
};
|
|
54
|
-
PayFacService.prototype.spendBack = function () {
|
|
55
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.SpendBack);
|
|
56
|
-
};
|
|
57
|
-
PayFacService.prototype.reverseSplitPay = function () {
|
|
58
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.ReverseSplitPay);
|
|
59
|
-
};
|
|
60
|
-
PayFacService.prototype.splitFunds = function () {
|
|
61
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.SplitFunds);
|
|
62
|
-
};
|
|
63
|
-
PayFacService.prototype.getAccountDetails = function () {
|
|
64
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.GetAccountDetails);
|
|
65
|
-
};
|
|
66
|
-
PayFacService.prototype.getAccountDetailsEnhanced = function () {
|
|
67
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.GetAccountDetails, Enums_1.TransactionModifier.Additional);
|
|
68
|
-
};
|
|
69
|
-
PayFacService.prototype.getAccountBalance = function () {
|
|
70
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.GetAccountBalance);
|
|
71
|
-
};
|
|
72
|
-
PayFacService.prototype.orderDevice = function () {
|
|
73
|
-
return new PayFacBuilder_1.PayFacBuilder(Enums_1.TransactionType.OrderDevice);
|
|
74
|
-
};
|
|
75
|
-
return PayFacService;
|
|
76
|
-
}());
|
|
77
|
-
exports.PayFacService = PayFacService;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IRecurringEntity, RecurringBuilder } from "../";
|
|
2
|
-
export declare class RecurringService {
|
|
3
|
-
static create<T extends IRecurringEntity>(entity: T): Promise<T>;
|
|
4
|
-
static delete<T extends IRecurringEntity>(entity: T, _force?: boolean): Promise<T>;
|
|
5
|
-
static edit<T extends IRecurringEntity>(entity: T): Promise<T>;
|
|
6
|
-
static get<T extends IRecurringEntity>(key: string): Promise<T>;
|
|
7
|
-
static search<T extends IRecurringEntity>(enity: IRecurringEntity | Function): RecurringBuilder<T>;
|
|
8
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RecurringService = void 0;
|
|
4
|
-
var __1 = require("../");
|
|
5
|
-
var RecurringService = /** @class */ (function () {
|
|
6
|
-
function RecurringService() {
|
|
7
|
-
}
|
|
8
|
-
RecurringService.create = function (entity) {
|
|
9
|
-
return new __1.RecurringBuilder(__1.TransactionType.Create, entity).execute();
|
|
10
|
-
};
|
|
11
|
-
RecurringService.delete = function (entity, _force) {
|
|
12
|
-
if (_force === void 0) { _force = false; }
|
|
13
|
-
return new __1.RecurringBuilder(__1.TransactionType.Delete, entity).execute();
|
|
14
|
-
};
|
|
15
|
-
RecurringService.edit = function (entity) {
|
|
16
|
-
return new __1.RecurringBuilder(__1.TransactionType.Edit, entity).execute();
|
|
17
|
-
};
|
|
18
|
-
RecurringService.get = function (key) {
|
|
19
|
-
var entity = key;
|
|
20
|
-
return new __1.RecurringBuilder(__1.TransactionType.Fetch, entity).execute();
|
|
21
|
-
};
|
|
22
|
-
RecurringService.search = function (enity) {
|
|
23
|
-
return new __1.RecurringBuilder(__1.TransactionType.Search, enity);
|
|
24
|
-
};
|
|
25
|
-
return RecurringService;
|
|
26
|
-
}());
|
|
27
|
-
exports.RecurringService = RecurringService;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { TransactionReportBuilder, TransactionSummary } from "../";
|
|
2
|
-
export declare class ReportingService {
|
|
3
|
-
static activity(): TransactionReportBuilder<TransactionSummary[]>;
|
|
4
|
-
static transactionDetail(transactionId?: string): TransactionReportBuilder<TransactionSummary>;
|
|
5
|
-
static findTransactions(): TransactionReportBuilder<TransactionSummary[]>;
|
|
6
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReportingService = void 0;
|
|
4
|
-
var __1 = require("../");
|
|
5
|
-
var ReportingService = /** @class */ (function () {
|
|
6
|
-
function ReportingService() {
|
|
7
|
-
}
|
|
8
|
-
ReportingService.activity = function () {
|
|
9
|
-
return new __1.TransactionReportBuilder(__1.ReportType.Activity);
|
|
10
|
-
};
|
|
11
|
-
ReportingService.transactionDetail = function (transactionId) {
|
|
12
|
-
return new __1.TransactionReportBuilder(__1.ReportType.TransactionDetail).withTransactionId(transactionId);
|
|
13
|
-
};
|
|
14
|
-
ReportingService.findTransactions = function () {
|
|
15
|
-
return new __1.TransactionReportBuilder(__1.ReportType.FindTransactions);
|
|
16
|
-
};
|
|
17
|
-
return ReportingService;
|
|
18
|
-
}());
|
|
19
|
-
exports.ReportingService = ReportingService;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from "./BatchService";
|
|
2
|
-
export * from "./CheckService";
|
|
3
|
-
export * from "./CreditService";
|
|
4
|
-
export * from "./DebitService";
|
|
5
|
-
export * from "./EBTService";
|
|
6
|
-
export * from "./GiftService";
|
|
7
|
-
export * from "./HostedService";
|
|
8
|
-
export * from "./RecurringService";
|
|
9
|
-
export * from "./ReportingService";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./BatchService"), exports);
|
|
14
|
-
__exportStar(require("./CheckService"), exports);
|
|
15
|
-
__exportStar(require("./CreditService"), exports);
|
|
16
|
-
__exportStar(require("./DebitService"), exports);
|
|
17
|
-
__exportStar(require("./EBTService"), exports);
|
|
18
|
-
__exportStar(require("./GiftService"), exports);
|
|
19
|
-
__exportStar(require("./HostedService"), exports);
|
|
20
|
-
__exportStar(require("./RecurringService"), exports);
|
|
21
|
-
__exportStar(require("./ReportingService"), exports);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { HostedPaymentConfig } from "./";
|
|
2
|
-
export declare class ServicesConfig {
|
|
3
|
-
siteId: string;
|
|
4
|
-
licenseId: string;
|
|
5
|
-
deviceId: string;
|
|
6
|
-
username: string;
|
|
7
|
-
password: string;
|
|
8
|
-
developerId: string;
|
|
9
|
-
versionNumber: string;
|
|
10
|
-
secretApiKey: string;
|
|
11
|
-
sdkNameVersion: string;
|
|
12
|
-
accountId: string;
|
|
13
|
-
merchantId: string;
|
|
14
|
-
sharedSecret: string;
|
|
15
|
-
channel: string;
|
|
16
|
-
rebatePassword: string;
|
|
17
|
-
refundPassword: string;
|
|
18
|
-
hostedPaymentConfig: HostedPaymentConfig;
|
|
19
|
-
certificationStr: string;
|
|
20
|
-
terminalID: string;
|
|
21
|
-
x509CertificateString: string;
|
|
22
|
-
x509CertificationPath: string;
|
|
23
|
-
serviceUrl: string;
|
|
24
|
-
timeout: number;
|
|
25
|
-
constructor();
|
|
26
|
-
validate(): void;
|
|
27
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServicesConfig = void 0;
|
|
4
|
-
var _1 = require("./");
|
|
5
|
-
var ServicesConfig = /** @class */ (function () {
|
|
6
|
-
function ServicesConfig() {
|
|
7
|
-
this.timeout = 65000;
|
|
8
|
-
}
|
|
9
|
-
ServicesConfig.prototype.validate = function () {
|
|
10
|
-
// portico api key
|
|
11
|
-
if (this.secretApiKey) {
|
|
12
|
-
if (this.siteId ||
|
|
13
|
-
this.licenseId ||
|
|
14
|
-
this.deviceId ||
|
|
15
|
-
this.username ||
|
|
16
|
-
this.password) {
|
|
17
|
-
throw new _1.ConfigurationError("Configuration contains both secret api key and legacy credentials. These are mutually exclusive.");
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
// portico legacy
|
|
21
|
-
if (this.siteId ||
|
|
22
|
-
this.licenseId ||
|
|
23
|
-
this.deviceId ||
|
|
24
|
-
this.username ||
|
|
25
|
-
this.password) {
|
|
26
|
-
if (!(this.siteId &&
|
|
27
|
-
this.licenseId &&
|
|
28
|
-
this.deviceId &&
|
|
29
|
-
this.username &&
|
|
30
|
-
this.password)) {
|
|
31
|
-
throw new _1.ConfigurationError("Site, License, Device, Username and Password should all have a values for this configuration.");
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
// realex
|
|
35
|
-
if (this.merchantId || this.sharedSecret) {
|
|
36
|
-
if (!this.merchantId) {
|
|
37
|
-
throw new _1.ConfigurationError("MerchantId is required for this configuration.");
|
|
38
|
-
}
|
|
39
|
-
if (!this.sharedSecret) {
|
|
40
|
-
throw new _1.ConfigurationError("SharedSecret is required for this configuration.");
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
// service url
|
|
44
|
-
if (!this.serviceUrl) {
|
|
45
|
-
throw new _1.ConfigurationError("Service URL could not be determined from the credentials provided. Please specify an endpoint.");
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
return ServicesConfig;
|
|
49
|
-
}());
|
|
50
|
-
exports.ServicesConfig = ServicesConfig;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IPaymentGateway, IRecurringService, ServicesConfig } from "./";
|
|
2
|
-
import { IPayFacProvider } from "./Gateways/IPayFacProvider";
|
|
3
|
-
export declare class ServicesContainer {
|
|
4
|
-
private static _instance;
|
|
5
|
-
private _gateway;
|
|
6
|
-
private _recurring;
|
|
7
|
-
private _xmlGateway;
|
|
8
|
-
static instance(): ServicesContainer;
|
|
9
|
-
static configure(config: ServicesConfig): void;
|
|
10
|
-
constructor(gateway?: IPaymentGateway, recurring?: IRecurringService, xmlGateway?: IPayFacProvider);
|
|
11
|
-
getClient(): IPaymentGateway;
|
|
12
|
-
getRecurringClient(): IRecurringService;
|
|
13
|
-
getXmlClient(): IPayFacProvider;
|
|
14
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServicesContainer = void 0;
|
|
4
|
-
var _1 = require("./");
|
|
5
|
-
var ProPayConnector_1 = require("./Gateways/ProPayConnector");
|
|
6
|
-
var ServicesContainer = /** @class */ (function () {
|
|
7
|
-
function ServicesContainer(gateway, recurring, xmlGateway) {
|
|
8
|
-
if (gateway) {
|
|
9
|
-
this._gateway = gateway;
|
|
10
|
-
}
|
|
11
|
-
if (recurring) {
|
|
12
|
-
this._recurring = recurring;
|
|
13
|
-
}
|
|
14
|
-
if (xmlGateway) {
|
|
15
|
-
this._xmlGateway = xmlGateway;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
ServicesContainer.instance = function () {
|
|
19
|
-
if (ServicesContainer._instance === null) {
|
|
20
|
-
throw new _1.ApiError("Services container not configured.");
|
|
21
|
-
}
|
|
22
|
-
return ServicesContainer._instance;
|
|
23
|
-
};
|
|
24
|
-
ServicesContainer.configure = function (config) {
|
|
25
|
-
config.validate();
|
|
26
|
-
if (config.merchantId && config.merchantId !== "") {
|
|
27
|
-
var gateway = new _1.RealexConnector();
|
|
28
|
-
gateway.merchantId = config.merchantId;
|
|
29
|
-
gateway.sharedSecret = config.sharedSecret;
|
|
30
|
-
gateway.accountId = config.accountId;
|
|
31
|
-
gateway.channel = config.channel;
|
|
32
|
-
gateway.rebatePassword = config.rebatePassword;
|
|
33
|
-
gateway.refundPassword = config.refundPassword;
|
|
34
|
-
gateway.timeout = config.timeout;
|
|
35
|
-
gateway.serviceUrl = config.serviceUrl;
|
|
36
|
-
gateway.hostedPaymentConfig = config.hostedPaymentConfig;
|
|
37
|
-
gateway.channel = config.channel;
|
|
38
|
-
ServicesContainer._instance = new ServicesContainer(gateway, gateway);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
var gateway = new _1.PorticoConnector();
|
|
42
|
-
gateway.siteId = config.siteId;
|
|
43
|
-
gateway.licenseId = config.licenseId;
|
|
44
|
-
gateway.deviceId = config.deviceId;
|
|
45
|
-
gateway.username = config.username;
|
|
46
|
-
gateway.password = config.password;
|
|
47
|
-
gateway.secretApiKey = config.secretApiKey;
|
|
48
|
-
gateway.developerId = config.developerId;
|
|
49
|
-
gateway.versionNumber = config.versionNumber;
|
|
50
|
-
gateway.sdkNameVersion = config.sdkNameVersion;
|
|
51
|
-
gateway.timeout = config.timeout;
|
|
52
|
-
gateway.serviceUrl =
|
|
53
|
-
config.serviceUrl + "/Hps.Exchange.PosGateway/PosGatewayService.asmx";
|
|
54
|
-
var payplan = new _1.PayPlanConnector();
|
|
55
|
-
payplan.siteId = config.siteId;
|
|
56
|
-
payplan.licenseId = config.licenseId;
|
|
57
|
-
payplan.deviceId = config.deviceId;
|
|
58
|
-
payplan.username = config.username;
|
|
59
|
-
payplan.password = config.password;
|
|
60
|
-
payplan.secretApiKey = config.secretApiKey;
|
|
61
|
-
payplan.developerId = config.developerId;
|
|
62
|
-
payplan.versionNumber = config.versionNumber;
|
|
63
|
-
payplan.timeout = config.timeout;
|
|
64
|
-
payplan.serviceUrl = config.serviceUrl
|
|
65
|
-
+ (config.serviceUrl.includes('cert.') ? "/Portico.PayPlan.v2/" : "/payplan.v2/");
|
|
66
|
-
var gatewayObj = new ProPayConnector_1.ProPayConnector();
|
|
67
|
-
gatewayObj.serviceUrl = config.serviceUrl;
|
|
68
|
-
gatewayObj.certStr = config.certificationStr;
|
|
69
|
-
gatewayObj.termID = config.terminalID;
|
|
70
|
-
gatewayObj.timeout = config.timeout;
|
|
71
|
-
gatewayObj.x509CertificatePath = config.x509CertificationPath;
|
|
72
|
-
gatewayObj.x509CertStr = config.x509CertificateString;
|
|
73
|
-
ServicesContainer._instance = new ServicesContainer(gateway, payplan, gatewayObj);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
ServicesContainer.prototype.getClient = function () {
|
|
77
|
-
return this._gateway;
|
|
78
|
-
};
|
|
79
|
-
ServicesContainer.prototype.getRecurringClient = function () {
|
|
80
|
-
return this._recurring;
|
|
81
|
-
};
|
|
82
|
-
ServicesContainer.prototype.getXmlClient = function () {
|
|
83
|
-
return this._xmlGateway;
|
|
84
|
-
};
|
|
85
|
-
return ServicesContainer;
|
|
86
|
-
}());
|
|
87
|
-
exports.ServicesContainer = ServicesContainer;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GenerationUtils = void 0;
|
|
4
|
-
var Sha1_1 = require("./Sha1");
|
|
5
|
-
var __1 = require("../");
|
|
6
|
-
var GenerationUtils = /** @class */ (function () {
|
|
7
|
-
function GenerationUtils() {
|
|
8
|
-
}
|
|
9
|
-
GenerationUtils.generateHash = function (toHash, secret) {
|
|
10
|
-
var toHashFirstPass = Sha1_1.hex_sha1(toHash);
|
|
11
|
-
if (!secret) {
|
|
12
|
-
return toHashFirstPass;
|
|
13
|
-
}
|
|
14
|
-
var toHashSecondPass = toHashFirstPass + "." + secret;
|
|
15
|
-
return Sha1_1.hex_sha1(toHashSecondPass);
|
|
16
|
-
};
|
|
17
|
-
GenerationUtils.generateTimestamp = function () {
|
|
18
|
-
var date = new Date();
|
|
19
|
-
return (date.getUTCFullYear().toString() +
|
|
20
|
-
__1.StringUtils.leftPad((date.getUTCMonth() + 1).toString(), 2, "0") +
|
|
21
|
-
__1.StringUtils.leftPad(date.getUTCDate().toString(), 2, "0") +
|
|
22
|
-
__1.StringUtils.leftPad(date.getUTCHours().toString(), 2, "0") +
|
|
23
|
-
__1.StringUtils.leftPad(date.getUTCMinutes().toString(), 2, "0") +
|
|
24
|
-
__1.StringUtils.leftPad(date.getUTCSeconds().toString(), 2, "0"));
|
|
25
|
-
};
|
|
26
|
-
GenerationUtils.generateOrderId = function () {
|
|
27
|
-
var id = __1.StringUtils.uuid();
|
|
28
|
-
return Buffer.from(id, "ascii")
|
|
29
|
-
.toString("base64")
|
|
30
|
-
.replace("=", "")
|
|
31
|
-
.replace("+", "-")
|
|
32
|
-
.replace("/", "_");
|
|
33
|
-
};
|
|
34
|
-
return GenerationUtils;
|
|
35
|
-
}());
|
|
36
|
-
exports.GenerationUtils = GenerationUtils;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface IInputTypeLengths {
|
|
2
|
-
city: number;
|
|
3
|
-
email: number;
|
|
4
|
-
firstName: number;
|
|
5
|
-
lastName: number;
|
|
6
|
-
phoneNumber: number;
|
|
7
|
-
postalCode: number;
|
|
8
|
-
province: number;
|
|
9
|
-
}
|
|
10
|
-
export declare type GatewayType = "portico" | "realex";
|
|
11
|
-
export declare function validateAmount(_gateway: GatewayType, amount: string | number, _impliedDecimal?: boolean): string;
|
|
12
|
-
export declare function validateInput(gateway: GatewayType, inputType: keyof IInputTypeLengths, input: string | undefined): string;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateInput = exports.validateAmount = void 0;
|
|
4
|
-
;
|
|
5
|
-
var inputFieldMaxLength = {
|
|
6
|
-
portico: {
|
|
7
|
-
city: 20,
|
|
8
|
-
email: 100,
|
|
9
|
-
firstName: 26,
|
|
10
|
-
lastName: 26,
|
|
11
|
-
phoneNumber: 20,
|
|
12
|
-
postalCode: 9,
|
|
13
|
-
province: 20,
|
|
14
|
-
},
|
|
15
|
-
// todo: Use actual values
|
|
16
|
-
realex: {
|
|
17
|
-
city: 0,
|
|
18
|
-
email: 0,
|
|
19
|
-
firstName: 0,
|
|
20
|
-
lastName: 0,
|
|
21
|
-
phoneNumber: 0,
|
|
22
|
-
postalCode: 0,
|
|
23
|
-
province: 0,
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
var inputLabels = {
|
|
27
|
-
city: "City",
|
|
28
|
-
email: "Email address",
|
|
29
|
-
firstName: "First name",
|
|
30
|
-
lastName: "Last name",
|
|
31
|
-
phoneNumber: "Phone number",
|
|
32
|
-
postalCode: "Zip/postal code",
|
|
33
|
-
province: "State/province",
|
|
34
|
-
};
|
|
35
|
-
var inputLengthErrorMessage = function (label) { return label + " length greater than the configured gateway's maximum length"; };
|
|
36
|
-
function validateAmount(_gateway, amount, _impliedDecimal) {
|
|
37
|
-
if (_impliedDecimal === void 0) { _impliedDecimal = false; }
|
|
38
|
-
if (!amount || amount < 0) {
|
|
39
|
-
throw new Error("Amount must be greater than or equal to 0");
|
|
40
|
-
}
|
|
41
|
-
return parseFloat((Math.round(amount * 100) / 100).toString()).toFixed(2);
|
|
42
|
-
}
|
|
43
|
-
exports.validateAmount = validateAmount;
|
|
44
|
-
function validateInput(gateway, inputType, input) {
|
|
45
|
-
if (!input) {
|
|
46
|
-
return "";
|
|
47
|
-
}
|
|
48
|
-
input = input.trim();
|
|
49
|
-
var label = inputLabels[inputType];
|
|
50
|
-
switch (inputType) {
|
|
51
|
-
case "email":
|
|
52
|
-
if (!/^[^\s@]+@[^\s@]+$/.test(input)) {
|
|
53
|
-
throw new Error(label + " is in wrong format");
|
|
54
|
-
}
|
|
55
|
-
break;
|
|
56
|
-
case "phoneNumber":
|
|
57
|
-
input = input.replace(/\D+/g, "");
|
|
58
|
-
break;
|
|
59
|
-
case "postalCode":
|
|
60
|
-
input = input.replace(/[^0-9A-Za-z]/g, "");
|
|
61
|
-
break;
|
|
62
|
-
default:
|
|
63
|
-
}
|
|
64
|
-
if (!label) {
|
|
65
|
-
label = "Input";
|
|
66
|
-
}
|
|
67
|
-
if (input.length > inputFieldMaxLength[gateway][inputType]) {
|
|
68
|
-
throw new Error(inputLengthErrorMessage(label));
|
|
69
|
-
}
|
|
70
|
-
return input;
|
|
71
|
-
}
|
|
72
|
-
exports.validateInput = validateInput;
|
package/lib/src/Utils/Sha1.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function hex_sha1(s: string): string;
|
|
2
|
-
export declare function b64_sha1(s: string): string;
|
|
3
|
-
export declare function str_sha1(s: string): string;
|
|
4
|
-
export declare function hex_hmac_sha1(key: string, data: string): string;
|
|
5
|
-
export declare function b64_hmac_sha1(key: string, data: string): string;
|
|
6
|
-
export declare function str_hmac_sha1(key: string, data: string): string;
|