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
package/lib/src/Utils/Sha1.js
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* A TypeScript implementation of the Secure Hash Algorithm, SHA-1, as defined
|
|
4
|
-
* in FIPS PUB 180-1
|
|
5
|
-
*
|
|
6
|
-
* This file is derived from JavaScript MD5 project ( http://pajhome.org.uk/crypt/md5/ )
|
|
7
|
-
* and is modified for oauth-typescript project.
|
|
8
|
-
*
|
|
9
|
-
* Copyright 2000-2002 Paul Johnston.
|
|
10
|
-
* (Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet)
|
|
11
|
-
* Copyright 2015 NOBUOKA Yu.
|
|
12
|
-
*
|
|
13
|
-
* Licensed under the BSD License.
|
|
14
|
-
*
|
|
15
|
-
* 1. Redistributions of source code must retain the above copyright notice,
|
|
16
|
-
* this list of conditions and the following disclaimer.
|
|
17
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
18
|
-
* this list of conditions and the following disclaimer in the documentation
|
|
19
|
-
* and/or other materials provided with the distribution.
|
|
20
|
-
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
21
|
-
* may be used to endorse or promote products derived from this software
|
|
22
|
-
* without specific prior written permission.
|
|
23
|
-
*
|
|
24
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
25
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
26
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
27
|
-
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
28
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
29
|
-
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
30
|
-
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
31
|
-
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
32
|
-
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
33
|
-
* POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
-
*/
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.str_hmac_sha1 = exports.b64_hmac_sha1 = exports.hex_hmac_sha1 = exports.str_sha1 = exports.b64_sha1 = exports.hex_sha1 = void 0;
|
|
37
|
-
/*
|
|
38
|
-
* Configurable constiables. You may need to tweak these to be compatible with
|
|
39
|
-
* the server-side, but the defaults work in most cases.
|
|
40
|
-
*/
|
|
41
|
-
var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
|
|
42
|
-
var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
|
|
43
|
-
var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
|
|
44
|
-
/*
|
|
45
|
-
* These are the functions you'll usually want to call
|
|
46
|
-
* They take string arguments and return either hex or base-64 encoded strings
|
|
47
|
-
*/
|
|
48
|
-
function hex_sha1(s) {
|
|
49
|
-
return binb2hex(core_sha1(str2binb(s), s.length * chrsz));
|
|
50
|
-
}
|
|
51
|
-
exports.hex_sha1 = hex_sha1;
|
|
52
|
-
function b64_sha1(s) {
|
|
53
|
-
return binb2b64(core_sha1(str2binb(s), s.length * chrsz));
|
|
54
|
-
}
|
|
55
|
-
exports.b64_sha1 = b64_sha1;
|
|
56
|
-
function str_sha1(s) {
|
|
57
|
-
return binb2str(core_sha1(str2binb(s), s.length * chrsz));
|
|
58
|
-
}
|
|
59
|
-
exports.str_sha1 = str_sha1;
|
|
60
|
-
function hex_hmac_sha1(key, data) {
|
|
61
|
-
return binb2hex(core_hmac_sha1(key, data));
|
|
62
|
-
}
|
|
63
|
-
exports.hex_hmac_sha1 = hex_hmac_sha1;
|
|
64
|
-
function b64_hmac_sha1(key, data) {
|
|
65
|
-
return binb2b64(core_hmac_sha1(key, data));
|
|
66
|
-
}
|
|
67
|
-
exports.b64_hmac_sha1 = b64_hmac_sha1;
|
|
68
|
-
function str_hmac_sha1(key, data) {
|
|
69
|
-
return binb2str(core_hmac_sha1(key, data));
|
|
70
|
-
}
|
|
71
|
-
exports.str_hmac_sha1 = str_hmac_sha1;
|
|
72
|
-
/*
|
|
73
|
-
* Calculate the SHA-1 of an array of big-endian words, and a bit length
|
|
74
|
-
*/
|
|
75
|
-
function core_sha1(x, len) {
|
|
76
|
-
/* append padding */
|
|
77
|
-
x[len >> 5] |= 0x80 << (24 - len % 32);
|
|
78
|
-
x[(((len + 64) >> 9) << 4) + 15] = len;
|
|
79
|
-
var w = Array(80);
|
|
80
|
-
var a = 1732584193;
|
|
81
|
-
var b = -271733879;
|
|
82
|
-
var c = -1732584194;
|
|
83
|
-
var d = 271733878;
|
|
84
|
-
var e = -1009589776;
|
|
85
|
-
for (var i = 0; i < x.length; i += 16) {
|
|
86
|
-
var olda = a;
|
|
87
|
-
var oldb = b;
|
|
88
|
-
var oldc = c;
|
|
89
|
-
var oldd = d;
|
|
90
|
-
var olde = e;
|
|
91
|
-
for (var j = 0; j < 80; j++) {
|
|
92
|
-
if (j < 16) {
|
|
93
|
-
w[j] = x[i + j];
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
|
|
97
|
-
}
|
|
98
|
-
var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j)));
|
|
99
|
-
e = d;
|
|
100
|
-
d = c;
|
|
101
|
-
c = rol(b, 30);
|
|
102
|
-
b = a;
|
|
103
|
-
a = t;
|
|
104
|
-
}
|
|
105
|
-
a = safe_add(a, olda);
|
|
106
|
-
b = safe_add(b, oldb);
|
|
107
|
-
c = safe_add(c, oldc);
|
|
108
|
-
d = safe_add(d, oldd);
|
|
109
|
-
e = safe_add(e, olde);
|
|
110
|
-
}
|
|
111
|
-
return Array(a, b, c, d, e);
|
|
112
|
-
}
|
|
113
|
-
/*
|
|
114
|
-
* Perform the appropriate triplet combination function for the current
|
|
115
|
-
* iteration
|
|
116
|
-
*/
|
|
117
|
-
function sha1_ft(t, b, c, d) {
|
|
118
|
-
if (t < 20) {
|
|
119
|
-
return (b & c) | (~b & d);
|
|
120
|
-
}
|
|
121
|
-
if (t < 40) {
|
|
122
|
-
return b ^ c ^ d;
|
|
123
|
-
}
|
|
124
|
-
if (t < 60) {
|
|
125
|
-
return (b & c) | (b & d) | (c & d);
|
|
126
|
-
}
|
|
127
|
-
return b ^ c ^ d;
|
|
128
|
-
}
|
|
129
|
-
/*
|
|
130
|
-
* Determine the appropriate additive constant for the current iteration
|
|
131
|
-
*/
|
|
132
|
-
function sha1_kt(t) {
|
|
133
|
-
return t < 20
|
|
134
|
-
? 1518500249
|
|
135
|
-
: t < 40 ? 1859775393 : t < 60 ? -1894007588 : -899497514;
|
|
136
|
-
}
|
|
137
|
-
/*
|
|
138
|
-
* Calculate the HMAC-SHA1 of a key and some data
|
|
139
|
-
*/
|
|
140
|
-
function core_hmac_sha1(key, data) {
|
|
141
|
-
var bkey = str2binb(key);
|
|
142
|
-
if (bkey.length > 16) {
|
|
143
|
-
bkey = core_sha1(bkey, key.length * chrsz);
|
|
144
|
-
}
|
|
145
|
-
var ipad = Array(16);
|
|
146
|
-
var opad = Array(16);
|
|
147
|
-
for (var i = 0; i < 16; i++) {
|
|
148
|
-
ipad[i] = bkey[i] ^ 0x36363636;
|
|
149
|
-
opad[i] = bkey[i] ^ 0x5c5c5c5c;
|
|
150
|
-
}
|
|
151
|
-
var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz);
|
|
152
|
-
return core_sha1(opad.concat(hash), 512 + 160);
|
|
153
|
-
}
|
|
154
|
-
/*
|
|
155
|
-
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
|
|
156
|
-
* to work around bugs in some JS interpreters.
|
|
157
|
-
*/
|
|
158
|
-
function safe_add(x, y) {
|
|
159
|
-
var lsw = (x & 0xffff) + (y & 0xffff);
|
|
160
|
-
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
|
161
|
-
return (msw << 16) | (lsw & 0xffff);
|
|
162
|
-
}
|
|
163
|
-
/*
|
|
164
|
-
* Bitwise rotate a 32-bit number to the left.
|
|
165
|
-
*/
|
|
166
|
-
function rol(num, cnt) {
|
|
167
|
-
return (num << cnt) | (num >>> (32 - cnt));
|
|
168
|
-
}
|
|
169
|
-
/*
|
|
170
|
-
* Convert an 8-bit or 16-bit string to an array of big-endian words
|
|
171
|
-
* In 8-bit function, characters >255 have their hi-byte silently ignored.
|
|
172
|
-
*/
|
|
173
|
-
function str2binb(str) {
|
|
174
|
-
var bin = Array();
|
|
175
|
-
var mask = (1 << chrsz) - 1;
|
|
176
|
-
for (var i = 0; i < str.length * chrsz; i += chrsz) {
|
|
177
|
-
bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i % 32);
|
|
178
|
-
}
|
|
179
|
-
return bin;
|
|
180
|
-
}
|
|
181
|
-
/*
|
|
182
|
-
* Convert an array of big-endian words to a string
|
|
183
|
-
*/
|
|
184
|
-
function binb2str(bin) {
|
|
185
|
-
var str = "";
|
|
186
|
-
var mask = (1 << chrsz) - 1;
|
|
187
|
-
for (var i = 0; i < bin.length * 32; i += chrsz) {
|
|
188
|
-
str += String.fromCharCode((bin[i >> 5] >>> (32 - chrsz - i % 32)) & mask);
|
|
189
|
-
}
|
|
190
|
-
return str;
|
|
191
|
-
}
|
|
192
|
-
/*
|
|
193
|
-
* Convert an array of big-endian words to a hex string.
|
|
194
|
-
*/
|
|
195
|
-
function binb2hex(binarray) {
|
|
196
|
-
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
|
|
197
|
-
var str = "";
|
|
198
|
-
for (var i = 0; i < binarray.length * 4; i++) {
|
|
199
|
-
str +=
|
|
200
|
-
hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 + 4)) & 0xf) +
|
|
201
|
-
hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8)) & 0xf);
|
|
202
|
-
}
|
|
203
|
-
return str;
|
|
204
|
-
}
|
|
205
|
-
/*
|
|
206
|
-
* Convert an array of big-endian words to a base-64 string
|
|
207
|
-
*/
|
|
208
|
-
function binb2b64(binarray) {
|
|
209
|
-
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
210
|
-
var str = "";
|
|
211
|
-
for (var i = 0; i < binarray.length * 4; i += 3) {
|
|
212
|
-
var triplet = (((binarray[i >> 2] >> (8 * (3 - i % 4))) & 0xff) << 16) |
|
|
213
|
-
(((binarray[(i + 1) >> 2] >> (8 * (3 - (i + 1) % 4))) & 0xff) << 8) |
|
|
214
|
-
((binarray[(i + 2) >> 2] >> (8 * (3 - (i + 2) % 4))) & 0xff);
|
|
215
|
-
for (var j = 0; j < 4; j++) {
|
|
216
|
-
if (i * 8 + j * 6 > binarray.length * 32) {
|
|
217
|
-
str += b64pad;
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
str += tab.charAt((triplet >> (6 * (3 - j))) & 0x3f);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
return str;
|
|
225
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StringUtils = void 0;
|
|
4
|
-
var StringUtils = /** @class */ (function () {
|
|
5
|
-
function StringUtils() {
|
|
6
|
-
}
|
|
7
|
-
StringUtils.leftPad = function (source, length, padString) {
|
|
8
|
-
if (!source) {
|
|
9
|
-
return source;
|
|
10
|
-
}
|
|
11
|
-
var pad = padString.repeat(length);
|
|
12
|
-
return pad.substring(0, pad.length - source.length) + source;
|
|
13
|
-
};
|
|
14
|
-
StringUtils.uuid = function () {
|
|
15
|
-
//// return uuid of form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
|
|
16
|
-
var uuid = "";
|
|
17
|
-
var ii;
|
|
18
|
-
for (ii = 0; ii < 32; ii += 1) {
|
|
19
|
-
switch (ii) {
|
|
20
|
-
case 8:
|
|
21
|
-
case 20:
|
|
22
|
-
uuid += "-";
|
|
23
|
-
uuid += ((Math.random() * 16) | 0).toString(16);
|
|
24
|
-
break;
|
|
25
|
-
case 12:
|
|
26
|
-
uuid += "-";
|
|
27
|
-
uuid += "4";
|
|
28
|
-
break;
|
|
29
|
-
case 16:
|
|
30
|
-
uuid += "-";
|
|
31
|
-
uuid += ((Math.random() * 4) | 8).toString(16);
|
|
32
|
-
break;
|
|
33
|
-
default:
|
|
34
|
-
uuid += ((Math.random() * 16) | 0).toString(16);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return uuid;
|
|
38
|
-
};
|
|
39
|
-
StringUtils.btoa = function (t) {
|
|
40
|
-
if (Buffer.from) {
|
|
41
|
-
return Buffer.from(t, "ascii").toString("base64");
|
|
42
|
-
}
|
|
43
|
-
return new Buffer(t, "ascii").toString("base64");
|
|
44
|
-
};
|
|
45
|
-
StringUtils.atob = function (t) {
|
|
46
|
-
if (Buffer.from) {
|
|
47
|
-
return Buffer.from(t, "base64").toString("ascii");
|
|
48
|
-
}
|
|
49
|
-
return new Buffer(t, "base64").toString("ascii");
|
|
50
|
-
};
|
|
51
|
-
return StringUtils;
|
|
52
|
-
}());
|
|
53
|
-
exports.StringUtils = StringUtils;
|
package/lib/src/Utils/index.d.ts
DELETED
package/lib/src/Utils/index.js
DELETED
|
@@ -1,14 +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("./GenerationUtils"), exports);
|
|
14
|
-
__exportStar(require("./StringUtils"), exports);
|
package/lib/src/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "es6-promise/auto";
|
|
2
|
-
import "typedarray";
|
|
3
|
-
export * from "./HostedPaymentConfig";
|
|
4
|
-
export * from "./ServicesConfig";
|
|
5
|
-
export * from "./ServicesContainer";
|
|
6
|
-
export * from "./Builders";
|
|
7
|
-
export * from "./Entities";
|
|
8
|
-
export * from "./Gateways";
|
|
9
|
-
export * from "./PaymentMethods";
|
|
10
|
-
export * from "./Services";
|
|
11
|
-
export * from "./Utils";
|
package/lib/src/index.js
DELETED
|
@@ -1,27 +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
|
-
if (process.env.GP_NETSUITE_BUILD) {
|
|
14
|
-
// tslint:disable-next-line
|
|
15
|
-
require("../netsuite/set-timeout-polyfill");
|
|
16
|
-
}
|
|
17
|
-
require("es6-promise/auto");
|
|
18
|
-
require("typedarray");
|
|
19
|
-
__exportStar(require("./HostedPaymentConfig"), exports);
|
|
20
|
-
__exportStar(require("./ServicesConfig"), exports);
|
|
21
|
-
__exportStar(require("./ServicesContainer"), exports);
|
|
22
|
-
__exportStar(require("./Builders"), exports);
|
|
23
|
-
__exportStar(require("./Entities"), exports);
|
|
24
|
-
__exportStar(require("./Gateways"), exports);
|
|
25
|
-
__exportStar(require("./PaymentMethods"), exports);
|
|
26
|
-
__exportStar(require("./Services"), exports);
|
|
27
|
-
__exportStar(require("./Utils"), exports);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { CreditCardData, CreditTrackData, DebitTrackData, EBTCardData, EBTTrackData, EntryMethod, GiftCard } from "../../src";
|
|
2
|
-
export declare class TestCards {
|
|
3
|
-
static asDebit(card: CreditTrackData, pinBlock: string): DebitTrackData;
|
|
4
|
-
static asEBTTrack(card: CreditTrackData, pinBlock: string): EBTTrackData;
|
|
5
|
-
static asEBTManual(card: CreditCardData, pinBlock: string): EBTCardData;
|
|
6
|
-
static visaManual(cardPresent?: boolean, readerPresent?: boolean): CreditCardData;
|
|
7
|
-
static visaSwipe(entryMethod?: EntryMethod): CreditTrackData;
|
|
8
|
-
static visaSwipeEncrypted(entryMethod?: EntryMethod): CreditTrackData;
|
|
9
|
-
static masterCardManual(cardPresent?: boolean, readerPresent?: boolean): CreditCardData;
|
|
10
|
-
static masterCardSwipe(entryMethod?: EntryMethod): CreditTrackData;
|
|
11
|
-
static masterCard24Swipe(entryMethod?: EntryMethod): CreditTrackData;
|
|
12
|
-
static masterCard25Swipe(entryMethod?: EntryMethod): CreditTrackData;
|
|
13
|
-
static masterCardSwipeEncrypted(entryMethod?: EntryMethod): CreditTrackData;
|
|
14
|
-
static discoverManual(cardPresent?: boolean, readerPresent?: boolean): CreditCardData;
|
|
15
|
-
static discoverSwipe(entryMethod?: EntryMethod): CreditTrackData;
|
|
16
|
-
static discoverSwipeEncrypted(entryMethod?: EntryMethod): CreditTrackData;
|
|
17
|
-
static amexManual(cardPresent?: boolean, readerPresent?: boolean): CreditCardData;
|
|
18
|
-
static amexSwipe(entryMethod?: EntryMethod): CreditTrackData;
|
|
19
|
-
static jcbManual(cardPresent?: boolean, readerPresent?: boolean): CreditCardData;
|
|
20
|
-
static jcbSwipe(entryMethod?: EntryMethod): CreditTrackData;
|
|
21
|
-
static giftCard1Swipe(): GiftCard;
|
|
22
|
-
static giftCard2Manual(): GiftCard;
|
|
23
|
-
static gsbManual(): CreditCardData;
|
|
24
|
-
}
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestCards = void 0;
|
|
4
|
-
var src_1 = require("../../src");
|
|
5
|
-
var TestCards = /** @class */ (function () {
|
|
6
|
-
function TestCards() {
|
|
7
|
-
}
|
|
8
|
-
TestCards.asDebit = function (card, pinBlock) {
|
|
9
|
-
var data = new src_1.DebitTrackData();
|
|
10
|
-
data.value = card.value;
|
|
11
|
-
data.encryptionData = card.encryptionData;
|
|
12
|
-
data.pinBlock = pinBlock;
|
|
13
|
-
return data;
|
|
14
|
-
};
|
|
15
|
-
TestCards.asEBTTrack = function (card, pinBlock) {
|
|
16
|
-
var data = new src_1.EBTTrackData();
|
|
17
|
-
data.value = card.value;
|
|
18
|
-
data.entryMethod = card.entryMethod;
|
|
19
|
-
data.encryptionData = card.encryptionData;
|
|
20
|
-
data.pinBlock = pinBlock;
|
|
21
|
-
return data;
|
|
22
|
-
};
|
|
23
|
-
TestCards.asEBTManual = function (card, pinBlock) {
|
|
24
|
-
var data = new src_1.EBTCardData();
|
|
25
|
-
data.number = card.number;
|
|
26
|
-
data.expMonth = card.expMonth;
|
|
27
|
-
data.expYear = card.expYear;
|
|
28
|
-
data.pinBlock = pinBlock;
|
|
29
|
-
return data;
|
|
30
|
-
};
|
|
31
|
-
TestCards.visaManual = function (cardPresent, readerPresent) {
|
|
32
|
-
if (cardPresent === void 0) { cardPresent = false; }
|
|
33
|
-
if (readerPresent === void 0) { readerPresent = false; }
|
|
34
|
-
var data = new src_1.CreditCardData();
|
|
35
|
-
data.number = "4012002000060016";
|
|
36
|
-
data.expMonth = "12";
|
|
37
|
-
data.expYear = "2025";
|
|
38
|
-
data.cvn = "123";
|
|
39
|
-
data.cardPresent = cardPresent;
|
|
40
|
-
data.readerPresent = readerPresent;
|
|
41
|
-
return data;
|
|
42
|
-
};
|
|
43
|
-
TestCards.visaSwipe = function (entryMethod) {
|
|
44
|
-
if (!entryMethod) {
|
|
45
|
-
entryMethod = src_1.EntryMethod.Swipe;
|
|
46
|
-
}
|
|
47
|
-
var data = new src_1.CreditTrackData();
|
|
48
|
-
data.value =
|
|
49
|
-
"%B4012002000060016^VI TEST CREDIT^251210118039000000000396?;4012002000060016=25121011803939600000?";
|
|
50
|
-
data.entryMethod = entryMethod;
|
|
51
|
-
return data;
|
|
52
|
-
};
|
|
53
|
-
TestCards.visaSwipeEncrypted = function (entryMethod) {
|
|
54
|
-
if (!entryMethod) {
|
|
55
|
-
entryMethod = src_1.EntryMethod.Swipe;
|
|
56
|
-
}
|
|
57
|
-
var encryptionData = new src_1.EncryptionData();
|
|
58
|
-
encryptionData.version = "01";
|
|
59
|
-
var data = new src_1.CreditTrackData();
|
|
60
|
-
data.value =
|
|
61
|
-
"<E1050711%B4012001000000016^VI TEST CREDIT^251200000000000000000000?|LO04K0WFOmdkDz0um+GwUkILL8ZZOP6Z" +
|
|
62
|
-
"c4rCpZ9+kg2T3JBT4AEOilWTI|+++++++Dbbn04ekG|11;4012001000000016=25120000000000000000?|1u2F/aEhbdoPixyAPGyIDv3gB" +
|
|
63
|
-
"fF|+++++++Dbbn04ekG|00|||/wECAQECAoFGAgEH2wYcShV78RZwb3NAc2VjdXJlZXhjaGFuZ2UubmV0PX50qfj4dt0lu9oFBESQQNkpoxEVp" +
|
|
64
|
-
"CW3ZKmoIV3T93zphPS3XKP4+DiVlM8VIOOmAuRrpzxNi0TN/DWXWSjUC8m/PI2dACGdl/hVJ/imfqIs68wYDnp8j0ZfgvM26MlnDbTVRrSx68N" +
|
|
65
|
-
"zj2QAgpBCHcaBb/FZm9T7pfMr2Mlh2YcAt6gGG1i2bJgiEJn8IiSDX5M2ybzqRT86PCbKle/XCTwFFe1X|>;";
|
|
66
|
-
data.entryMethod = entryMethod;
|
|
67
|
-
data.encryptionData = encryptionData;
|
|
68
|
-
return data;
|
|
69
|
-
};
|
|
70
|
-
TestCards.masterCardManual = function (cardPresent, readerPresent) {
|
|
71
|
-
if (cardPresent === void 0) { cardPresent = false; }
|
|
72
|
-
if (readerPresent === void 0) { readerPresent = false; }
|
|
73
|
-
var data = new src_1.CreditCardData();
|
|
74
|
-
data.number = "5473500000000014";
|
|
75
|
-
data.expMonth = "12";
|
|
76
|
-
data.expYear = "2025";
|
|
77
|
-
data.cvn = "123";
|
|
78
|
-
data.cardPresent = cardPresent;
|
|
79
|
-
data.readerPresent = readerPresent;
|
|
80
|
-
return data;
|
|
81
|
-
};
|
|
82
|
-
TestCards.masterCardSwipe = function (entryMethod) {
|
|
83
|
-
if (!entryMethod) {
|
|
84
|
-
entryMethod = src_1.EntryMethod.Swipe;
|
|
85
|
-
}
|
|
86
|
-
var data = new src_1.CreditTrackData();
|
|
87
|
-
data.value =
|
|
88
|
-
"%B5473500000000014^MC TEST CARD^251210199998888777766665555444433332?;5473500000000014=25121019999888877776?";
|
|
89
|
-
data.entryMethod = entryMethod;
|
|
90
|
-
return data;
|
|
91
|
-
};
|
|
92
|
-
TestCards.masterCard24Swipe = function (entryMethod) {
|
|
93
|
-
if (!entryMethod) {
|
|
94
|
-
entryMethod = src_1.EntryMethod.Swipe;
|
|
95
|
-
}
|
|
96
|
-
var data = new src_1.CreditTrackData();
|
|
97
|
-
data.value =
|
|
98
|
-
"%B2223000010005780^TEST CARD/EMV BIN-2^19121010000000009210?;2223000010005780=19121010000000009210?";
|
|
99
|
-
data.entryMethod = entryMethod;
|
|
100
|
-
return data;
|
|
101
|
-
};
|
|
102
|
-
TestCards.masterCard25Swipe = function (entryMethod) {
|
|
103
|
-
if (!entryMethod) {
|
|
104
|
-
entryMethod = src_1.EntryMethod.Swipe;
|
|
105
|
-
}
|
|
106
|
-
var data = new src_1.CreditTrackData();
|
|
107
|
-
data.value =
|
|
108
|
-
"%B2223000010005798^TEST CARD/EMV BIN-2^19121010000000003840?;2223000010005798=19121010000000003840?";
|
|
109
|
-
data.entryMethod = entryMethod;
|
|
110
|
-
return data;
|
|
111
|
-
};
|
|
112
|
-
TestCards.masterCardSwipeEncrypted = function (entryMethod) {
|
|
113
|
-
if (!entryMethod) {
|
|
114
|
-
entryMethod = src_1.EntryMethod.Swipe;
|
|
115
|
-
}
|
|
116
|
-
var encryptionData = new src_1.EncryptionData();
|
|
117
|
-
encryptionData.version = "01";
|
|
118
|
-
var data = new src_1.CreditTrackData();
|
|
119
|
-
data.value =
|
|
120
|
-
"<E1052711%B5473501000000014^MC TEST CARD^251200000000000000000000000000000000?|GVEY/MKaKXuqqjKRRue" +
|
|
121
|
-
"IdCHPPoj1gMccgNOtHC41ymz7bIvyJJVdD3LW8BbwvwoenI+|+++++++C4cI2zjMp|11;5473501000000014=25120000000000000000?" +
|
|
122
|
-
"|8XqYkQGMdGeiIsgM0pzdCbEGUDP|+++++++C4cI2zjMp|00|||/wECAQECAoFGAgEH2wYcShV78RZwb3NAc2VjdXJlZXhjaGFuZ2UubmV0" +
|
|
123
|
-
"PX50qfj4dt0lu9oFBESQQNkpoxEVpCW3ZKmoIV3T93zphPS3XKP4+DiVlM8VIOOmAuRrpzxNi0TN/DWXWSjUC8m/PI2dACGdl/hVJ/imfqI" +
|
|
124
|
-
"s68wYDnp8j0ZfgvM26MlnDbTVRrSx68Nzj2QAgpBCHcaBb/FZm9T7pfMr2Mlh2YcAt6gGG1i2bJgiEJn8IiSDX5M2ybzqRT86PCbKle/XCTwFFe1X|>";
|
|
125
|
-
data.entryMethod = entryMethod;
|
|
126
|
-
data.encryptionData = encryptionData;
|
|
127
|
-
return data;
|
|
128
|
-
};
|
|
129
|
-
TestCards.discoverManual = function (cardPresent, readerPresent) {
|
|
130
|
-
if (cardPresent === void 0) { cardPresent = false; }
|
|
131
|
-
if (readerPresent === void 0) { readerPresent = false; }
|
|
132
|
-
var data = new src_1.CreditCardData();
|
|
133
|
-
data.number = "6011000990156527";
|
|
134
|
-
data.expMonth = "12";
|
|
135
|
-
data.expYear = "2025";
|
|
136
|
-
data.cvn = "123";
|
|
137
|
-
data.cardPresent = cardPresent;
|
|
138
|
-
data.readerPresent = readerPresent;
|
|
139
|
-
return data;
|
|
140
|
-
};
|
|
141
|
-
TestCards.discoverSwipe = function (entryMethod) {
|
|
142
|
-
if (!entryMethod) {
|
|
143
|
-
entryMethod = src_1.EntryMethod.Swipe;
|
|
144
|
-
}
|
|
145
|
-
var data = new src_1.CreditTrackData();
|
|
146
|
-
data.value =
|
|
147
|
-
"%B6011000990156527^DIS TEST CARD^25121011000062111401?;6011000990156527=25121011000062111401?";
|
|
148
|
-
data.entryMethod = entryMethod;
|
|
149
|
-
return data;
|
|
150
|
-
};
|
|
151
|
-
TestCards.discoverSwipeEncrypted = function (entryMethod) {
|
|
152
|
-
if (!entryMethod) {
|
|
153
|
-
entryMethod = src_1.EntryMethod.Swipe;
|
|
154
|
-
}
|
|
155
|
-
var encryptionData = new src_1.EncryptionData();
|
|
156
|
-
encryptionData.version = "01";
|
|
157
|
-
var data = new src_1.CreditTrackData();
|
|
158
|
-
data.value =
|
|
159
|
-
"<E1049711%B6011000000006527^DIS TEST CARD^25120000000000000000?|nqtDvLuS4VHJd1FymxBxihO5g/ZDqlHyTf8fQpjBwkk95cc6PG9V|" +
|
|
160
|
-
"+++++++C+LdWXLpP|11;6011000000006527=25120000000000000000?|8VfZvczP6iBqRis2XFypmktaipa|+++++++C+LdWXLpP|00|||" +
|
|
161
|
-
"/wECAQECAoFGAgEH2wYcShV78RZwb3NAc2VjdXJlZXhjaGFuZ2UubmV0PX50qfj4dt0lu9oFBESQQNkpoxEVpCW3ZKmoIV3T93zphPS3XKP4" +
|
|
162
|
-
"+DiVlM8VIOOmAuRrpzxNi0TN/DWXWSjUC8m/PI2dACGdl/hVJ/imfqIs68wYDnp8j0ZfgvM26MlnDbTVRrSx68Nzj2QAgpBCHcaBb/FZm9T7p" +
|
|
163
|
-
"fMr2Mlh2YcAt6gGG1i2bJgiEJn8IiSDX5M2ybzqRT86PCbKle/XCTwFFe1X|>";
|
|
164
|
-
data.entryMethod = entryMethod;
|
|
165
|
-
data.encryptionData = encryptionData;
|
|
166
|
-
return data;
|
|
167
|
-
};
|
|
168
|
-
TestCards.amexManual = function (cardPresent, readerPresent) {
|
|
169
|
-
if (cardPresent === void 0) { cardPresent = false; }
|
|
170
|
-
if (readerPresent === void 0) { readerPresent = false; }
|
|
171
|
-
var data = new src_1.CreditCardData();
|
|
172
|
-
data.number = "372700699251018";
|
|
173
|
-
data.expMonth = "12";
|
|
174
|
-
data.expYear = "2025";
|
|
175
|
-
data.cvn = "1234";
|
|
176
|
-
data.cardPresent = cardPresent;
|
|
177
|
-
data.readerPresent = readerPresent;
|
|
178
|
-
return data;
|
|
179
|
-
};
|
|
180
|
-
TestCards.amexSwipe = function (entryMethod) {
|
|
181
|
-
if (!entryMethod) {
|
|
182
|
-
entryMethod = src_1.EntryMethod.Swipe;
|
|
183
|
-
}
|
|
184
|
-
var data = new src_1.CreditTrackData();
|
|
185
|
-
data.value =
|
|
186
|
-
"%B3727 006992 51018^AMEX TEST CARD^2512990502700?;372700699251018=2512990502700?";
|
|
187
|
-
data.entryMethod = entryMethod;
|
|
188
|
-
return data;
|
|
189
|
-
};
|
|
190
|
-
TestCards.jcbManual = function (cardPresent, readerPresent) {
|
|
191
|
-
if (cardPresent === void 0) { cardPresent = false; }
|
|
192
|
-
if (readerPresent === void 0) { readerPresent = false; }
|
|
193
|
-
var data = new src_1.CreditCardData();
|
|
194
|
-
data.number = "3566007770007321";
|
|
195
|
-
data.expMonth = "12";
|
|
196
|
-
data.expYear = "2025";
|
|
197
|
-
data.cvn = "123";
|
|
198
|
-
data.cardPresent = cardPresent;
|
|
199
|
-
data.readerPresent = readerPresent;
|
|
200
|
-
return data;
|
|
201
|
-
};
|
|
202
|
-
TestCards.jcbSwipe = function (entryMethod) {
|
|
203
|
-
if (!entryMethod) {
|
|
204
|
-
entryMethod = src_1.EntryMethod.Swipe;
|
|
205
|
-
}
|
|
206
|
-
var data = new src_1.CreditTrackData();
|
|
207
|
-
data.value =
|
|
208
|
-
"%B3566007770007321^JCB TEST CARD^2512101100000000000000000064300000?;3566007770007321=25121011000000076435?";
|
|
209
|
-
data.entryMethod = entryMethod;
|
|
210
|
-
return data;
|
|
211
|
-
};
|
|
212
|
-
TestCards.giftCard1Swipe = function () {
|
|
213
|
-
var data = new src_1.GiftCard();
|
|
214
|
-
data.trackData =
|
|
215
|
-
"%B5022440000000000098^^391200081613?;5022440000000000098=391200081613?";
|
|
216
|
-
return data;
|
|
217
|
-
};
|
|
218
|
-
TestCards.giftCard2Manual = function () {
|
|
219
|
-
var data = new src_1.GiftCard();
|
|
220
|
-
data.number = "5022440000000000007";
|
|
221
|
-
return data;
|
|
222
|
-
};
|
|
223
|
-
TestCards.gsbManual = function () {
|
|
224
|
-
var data = new src_1.CreditCardData();
|
|
225
|
-
data.number = "6277220572999800";
|
|
226
|
-
data.expMonth = "12";
|
|
227
|
-
data.expYear = "2049";
|
|
228
|
-
return data;
|
|
229
|
-
};
|
|
230
|
-
return TestCards;
|
|
231
|
-
}());
|
|
232
|
-
exports.TestCards = TestCards;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestChecks = void 0;
|
|
4
|
-
var src_1 = require("../../src");
|
|
5
|
-
var TestChecks = /** @class */ (function () {
|
|
6
|
-
function TestChecks() {
|
|
7
|
-
}
|
|
8
|
-
TestChecks.certification = function (secCode, checkType, accountType, checkName) {
|
|
9
|
-
if (secCode === void 0) { secCode = src_1.SecCode.PPD; }
|
|
10
|
-
if (checkType === void 0) { checkType = src_1.CheckType.Personal; }
|
|
11
|
-
if (accountType === void 0) { accountType = src_1.AccountType.Checking; }
|
|
12
|
-
var check = new src_1.ECheck();
|
|
13
|
-
check.accountNumber = "24413815";
|
|
14
|
-
check.routingNumber = "490000018";
|
|
15
|
-
check.checkType = checkType;
|
|
16
|
-
check.accountType = accountType;
|
|
17
|
-
check.secCode = secCode;
|
|
18
|
-
check.entryMode = src_1.EntryMethod.Manual;
|
|
19
|
-
check.checkHolderName = "John Doe";
|
|
20
|
-
check.driversLicenseNumber = "09876543210";
|
|
21
|
-
check.driversLicenseState = "TX";
|
|
22
|
-
check.phoneNumber = "8003214567";
|
|
23
|
-
check.birthYear = "1997";
|
|
24
|
-
check.ssnLast4 = "4321";
|
|
25
|
-
if (checkName) {
|
|
26
|
-
check.checkName = checkName;
|
|
27
|
-
}
|
|
28
|
-
return check;
|
|
29
|
-
};
|
|
30
|
-
return TestChecks;
|
|
31
|
-
}());
|
|
32
|
-
exports.TestChecks = TestChecks;
|
package/lib/test/Data/index.d.ts
DELETED
package/lib/test/Data/index.js
DELETED
|
@@ -1,14 +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("./TestCards"), exports);
|
|
14
|
-
__exportStar(require("./TestChecks"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|