globalpayments-api 2.0.0 → 2.0.1
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/lib/src/Builders/AuthorizationBuilder.d.ts +325 -0
- package/lib/src/Builders/AuthorizationBuilder.js +601 -0
- package/lib/src/Builders/AuthorizationBuilder.js.map +1 -0
- package/lib/src/Builders/BaseBuilder/ValidationClause.d.ts +14 -0
- package/lib/src/Builders/BaseBuilder/ValidationClause.js +62 -0
- package/lib/src/Builders/BaseBuilder/ValidationClause.js.map +1 -0
- package/lib/src/Builders/BaseBuilder/ValidationTarget.d.ts +16 -0
- package/lib/src/Builders/BaseBuilder/ValidationTarget.js +29 -0
- package/lib/src/Builders/BaseBuilder/ValidationTarget.js.map +1 -0
- package/lib/src/Builders/BaseBuilder/Validations.d.ts +11 -0
- package/lib/src/Builders/BaseBuilder/Validations.js +57 -0
- package/lib/src/Builders/BaseBuilder/Validations.js.map +1 -0
- package/lib/src/Builders/BaseBuilder.d.ts +11 -0
- package/lib/src/Builders/BaseBuilder.js +17 -0
- package/lib/src/Builders/BaseBuilder.js.map +1 -0
- package/lib/src/Builders/ManagementBuilder.d.ts +103 -0
- package/lib/src/Builders/ManagementBuilder.js +228 -0
- package/lib/src/Builders/ManagementBuilder.js.map +1 -0
- package/lib/src/Builders/PayFacBuilder.d.ts +96 -0
- package/lib/src/Builders/PayFacBuilder.js +185 -0
- package/lib/src/Builders/PayFacBuilder.js.map +1 -0
- package/lib/src/Builders/RecurringBuilder.d.ts +13 -0
- package/lib/src/Builders/RecurringBuilder.js +48 -0
- package/lib/src/Builders/RecurringBuilder.js.map +1 -0
- package/lib/src/Builders/ReportBuilder.d.ts +8 -0
- package/lib/src/Builders/ReportBuilder.js +37 -0
- package/lib/src/Builders/ReportBuilder.js.map +1 -0
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.d.ts +22 -0
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js +160 -0
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js.map +1 -0
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.d.ts +6 -0
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js +24 -0
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js.map +1 -0
- package/lib/src/Builders/RequestBuilder/GpEcom/index.d.ts +2 -0
- package/lib/src/Builders/RequestBuilder/GpEcom/index.js +15 -0
- package/lib/src/Builders/RequestBuilder/GpEcom/index.js.map +1 -0
- package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.d.ts +6 -0
- package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js +30 -0
- package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js.map +1 -0
- package/lib/src/Builders/RequestBuilder/index.d.ts +2 -0
- package/lib/src/Builders/RequestBuilder/index.js +15 -0
- package/lib/src/Builders/RequestBuilder/index.js.map +1 -0
- package/lib/src/Builders/TransactionBuilder.d.ts +10 -0
- package/lib/src/Builders/TransactionBuilder.js +47 -0
- package/lib/src/Builders/TransactionBuilder.js.map +1 -0
- package/lib/src/Builders/TransactionReportBuilder.d.ts +15 -0
- package/lib/src/Builders/TransactionReportBuilder.js +80 -0
- package/lib/src/Builders/TransactionReportBuilder.js.map +1 -0
- package/lib/src/Builders/index.d.ts +8 -0
- package/lib/src/Builders/index.js +21 -0
- package/lib/src/Builders/index.js.map +1 -0
- package/lib/src/ConfiguredServices.d.ts +22 -0
- package/lib/src/ConfiguredServices.js +57 -0
- package/lib/src/ConfiguredServices.js.map +1 -0
- package/lib/src/Entities/Address.d.ts +13 -0
- package/lib/src/Entities/Address.js +20 -0
- package/lib/src/Entities/Address.js.map +1 -0
- package/lib/src/Entities/BatchSummary.d.ts +6 -0
- package/lib/src/Entities/BatchSummary.js +10 -0
- package/lib/src/Entities/BatchSummary.js.map +1 -0
- package/lib/src/Entities/Customer.d.ts +64 -0
- package/lib/src/Entities/Customer.js +48 -0
- package/lib/src/Entities/Customer.js.map +1 -0
- package/lib/src/Entities/DocumentUploadData.d.ts +13 -0
- package/lib/src/Entities/DocumentUploadData.js +49 -0
- package/lib/src/Entities/DocumentUploadData.js.map +1 -0
- package/lib/src/Entities/EcommerceInfo.d.ts +12 -0
- package/lib/src/Entities/EcommerceInfo.js +15 -0
- package/lib/src/Entities/EcommerceInfo.js.map +1 -0
- package/lib/src/Entities/EncryptionData.d.ts +6 -0
- package/lib/src/Entities/EncryptionData.js +10 -0
- package/lib/src/Entities/EncryptionData.js.map +1 -0
- package/lib/src/Entities/Enums.d.ts +373 -0
- package/lib/src/Entities/Enums.js +498 -0
- package/lib/src/Entities/Enums.js.map +1 -0
- package/lib/src/Entities/Errors.d.ts +23 -0
- package/lib/src/Entities/Errors.js +107 -0
- package/lib/src/Entities/Errors.js.map +1 -0
- package/lib/src/Entities/HostedPaymentData.d.ts +10 -0
- package/lib/src/Entities/HostedPaymentData.js +11 -0
- package/lib/src/Entities/HostedPaymentData.js.map +1 -0
- package/lib/src/Entities/IRequestBuilder.d.ts +7 -0
- package/lib/src/Entities/IRequestBuilder.js +3 -0
- package/lib/src/Entities/IRequestBuilder.js.map +1 -0
- package/lib/src/Entities/ProFac/AccountBalanceResponseData.d.ts +7 -0
- package/lib/src/Entities/ProFac/AccountBalanceResponseData.js +10 -0
- package/lib/src/Entities/ProFac/AccountBalanceResponseData.js.map +1 -0
- package/lib/src/Entities/ProFac/AccountPermissions.d.ts +15 -0
- package/lib/src/Entities/ProFac/AccountPermissions.js +10 -0
- package/lib/src/Entities/ProFac/AccountPermissions.js.map +1 -0
- package/lib/src/Entities/ProFac/BankAccountData.d.ts +10 -0
- package/lib/src/Entities/ProFac/BankAccountData.js +10 -0
- package/lib/src/Entities/ProFac/BankAccountData.js.map +1 -0
- package/lib/src/Entities/ProFac/BankAccountOwnershipData.d.ts +8 -0
- package/lib/src/Entities/ProFac/BankAccountOwnershipData.js +12 -0
- package/lib/src/Entities/ProFac/BankAccountOwnershipData.js.map +1 -0
- package/lib/src/Entities/ProFac/BeneficialOwnerData.d.ts +6 -0
- package/lib/src/Entities/ProFac/BeneficialOwnerData.js +11 -0
- package/lib/src/Entities/ProFac/BeneficialOwnerData.js.map +1 -0
- package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.d.ts +5 -0
- package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js +10 -0
- package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js.map +1 -0
- package/lib/src/Entities/ProFac/BusinessData.d.ts +14 -0
- package/lib/src/Entities/ProFac/BusinessData.js +12 -0
- package/lib/src/Entities/ProFac/BusinessData.js.map +1 -0
- package/lib/src/Entities/ProFac/DeviceAttributeInfo.d.ts +4 -0
- package/lib/src/Entities/ProFac/DeviceAttributeInfo.js +10 -0
- package/lib/src/Entities/ProFac/DeviceAttributeInfo.js.map +1 -0
- package/lib/src/Entities/ProFac/DeviceData.d.ts +5 -0
- package/lib/src/Entities/ProFac/DeviceData.js +11 -0
- package/lib/src/Entities/ProFac/DeviceData.js.map +1 -0
- package/lib/src/Entities/ProFac/DeviceInfo.d.ts +6 -0
- package/lib/src/Entities/ProFac/DeviceInfo.js +10 -0
- package/lib/src/Entities/ProFac/DeviceInfo.js.map +1 -0
- package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.d.ts +7 -0
- package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js +14 -0
- package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js.map +1 -0
- package/lib/src/Entities/ProFac/GrossBillingInformation.d.ts +8 -0
- package/lib/src/Entities/ProFac/GrossBillingInformation.js +10 -0
- package/lib/src/Entities/ProFac/GrossBillingInformation.js.map +1 -0
- package/lib/src/Entities/ProFac/OrderDevice.d.ts +18 -0
- package/lib/src/Entities/ProFac/OrderDevice.js +10 -0
- package/lib/src/Entities/ProFac/OrderDevice.js.map +1 -0
- package/lib/src/Entities/ProFac/OwnersData.d.ts +12 -0
- package/lib/src/Entities/ProFac/OwnersData.js +12 -0
- package/lib/src/Entities/ProFac/OwnersData.js.map +1 -0
- package/lib/src/Entities/ProFac/PayFacResponseData.d.ts +55 -0
- package/lib/src/Entities/ProFac/PayFacResponseData.js +10 -0
- package/lib/src/Entities/ProFac/PayFacResponseData.js.map +1 -0
- package/lib/src/Entities/ProFac/RenewAccountData.d.ts +10 -0
- package/lib/src/Entities/ProFac/RenewAccountData.js +12 -0
- package/lib/src/Entities/ProFac/RenewAccountData.js.map +1 -0
- package/lib/src/Entities/ProFac/SignificantOwnerData.d.ts +8 -0
- package/lib/src/Entities/ProFac/SignificantOwnerData.js +12 -0
- package/lib/src/Entities/ProFac/SignificantOwnerData.js.map +1 -0
- package/lib/src/Entities/ProFac/ThreatRiskData.d.ts +5 -0
- package/lib/src/Entities/ProFac/ThreatRiskData.js +10 -0
- package/lib/src/Entities/ProFac/ThreatRiskData.js.map +1 -0
- package/lib/src/Entities/ProFac/UserPersonalData.d.ts +26 -0
- package/lib/src/Entities/ProFac/UserPersonalData.js +15 -0
- package/lib/src/Entities/ProFac/UserPersonalData.js.map +1 -0
- package/lib/src/Entities/RecurringEntity.d.ts +14 -0
- package/lib/src/Entities/RecurringEntity.js +87 -0
- package/lib/src/Entities/RecurringEntity.js.map +1 -0
- package/lib/src/Entities/Request.d.ts +9 -0
- package/lib/src/Entities/Request.js +15 -0
- package/lib/src/Entities/Request.js.map +1 -0
- package/lib/src/Entities/SSORequestData.d.ts +5 -0
- package/lib/src/Entities/SSORequestData.js +10 -0
- package/lib/src/Entities/SSORequestData.js.map +1 -0
- package/lib/src/Entities/Schedule.d.ts +47 -0
- package/lib/src/Entities/Schedule.js +254 -0
- package/lib/src/Entities/Schedule.js.map +1 -0
- package/lib/src/Entities/ServiceEndpoints.d.ts +4 -0
- package/lib/src/Entities/ServiceEndpoints.js +9 -0
- package/lib/src/Entities/ServiceEndpoints.js.map +1 -0
- package/lib/src/Entities/Transaction.d.ts +78 -0
- package/lib/src/Entities/Transaction.js +109 -0
- package/lib/src/Entities/Transaction.js.map +1 -0
- package/lib/src/Entities/TransactionSummary.d.ts +61 -0
- package/lib/src/Entities/TransactionSummary.js +10 -0
- package/lib/src/Entities/TransactionSummary.js.map +1 -0
- package/lib/src/Entities/index.d.ts +15 -0
- package/lib/src/Entities/index.js +28 -0
- package/lib/src/Entities/index.js.map +1 -0
- package/lib/src/Gateways/Gateway.d.ts +10 -0
- package/lib/src/Gateways/Gateway.js +43 -0
- package/lib/src/Gateways/Gateway.js.map +1 -0
- package/lib/src/Gateways/GpEcomConnector.d.ts +36 -0
- package/lib/src/Gateways/GpEcomConnector.js +557 -0
- package/lib/src/Gateways/GpEcomConnector.js.map +1 -0
- package/lib/src/Gateways/IPayFacProvider.d.ts +5 -0
- package/lib/src/Gateways/IPayFacProvider.js +3 -0
- package/lib/src/Gateways/IPayFacProvider.js.map +1 -0
- package/lib/src/Gateways/IPaymentGateway.d.ts +8 -0
- package/lib/src/Gateways/IPaymentGateway.js +3 -0
- package/lib/src/Gateways/IPaymentGateway.js.map +1 -0
- package/lib/src/Gateways/IRecurringService.d.ts +6 -0
- package/lib/src/Gateways/IRecurringService.js +3 -0
- package/lib/src/Gateways/IRecurringService.js.map +1 -0
- package/lib/src/Gateways/PayPlanConnector.d.ts +42 -0
- package/lib/src/Gateways/PayPlanConnector.js +553 -0
- package/lib/src/Gateways/PayPlanConnector.js.map +1 -0
- package/lib/src/Gateways/PorticoConnector.d.ts +44 -0
- package/lib/src/Gateways/PorticoConnector.js +1018 -0
- package/lib/src/Gateways/PorticoConnector.js.map +1 -0
- package/lib/src/Gateways/ProPayConnector.d.ts +41 -0
- package/lib/src/Gateways/ProPayConnector.js +695 -0
- package/lib/src/Gateways/ProPayConnector.js.map +1 -0
- package/lib/src/Gateways/RealexConnector.d.ts +30 -0
- package/lib/src/Gateways/RealexConnector.js +524 -0
- package/lib/src/Gateways/RealexConnector.js.map +1 -0
- package/lib/src/Gateways/RestGateway.d.ts +6 -0
- package/lib/src/Gateways/RestGateway.js +32 -0
- package/lib/src/Gateways/RestGateway.js.map +1 -0
- package/lib/src/Gateways/XmlGateway.d.ts +6 -0
- package/lib/src/Gateways/XmlGateway.js +38 -0
- package/lib/src/Gateways/XmlGateway.js.map +1 -0
- package/lib/src/Gateways/https-wrapper.d.ts +3 -0
- package/lib/src/Gateways/https-wrapper.js +36 -0
- package/lib/src/Gateways/https-wrapper.js.map +1 -0
- package/lib/src/Gateways/index.d.ts +8 -0
- package/lib/src/Gateways/index.js +21 -0
- package/lib/src/Gateways/index.js.map +1 -0
- package/lib/src/HostedPaymentConfig.d.ts +12 -0
- package/lib/src/HostedPaymentConfig.js +10 -0
- package/lib/src/HostedPaymentConfig.js.map +1 -0
- package/lib/src/Mapping/GpEcomMapping.d.ts +9 -0
- package/lib/src/Mapping/GpEcomMapping.js +74 -0
- package/lib/src/Mapping/GpEcomMapping.js.map +1 -0
- package/lib/src/Mapping/index.d.ts +1 -0
- package/lib/src/Mapping/index.js +14 -0
- package/lib/src/Mapping/index.js.map +1 -0
- package/lib/src/PaymentMethods/Cash.d.ts +8 -0
- package/lib/src/PaymentMethods/Cash.js +37 -0
- package/lib/src/PaymentMethods/Cash.js.map +1 -0
- package/lib/src/PaymentMethods/Credit.d.ts +85 -0
- package/lib/src/PaymentMethods/Credit.js +107 -0
- package/lib/src/PaymentMethods/Credit.js.map +1 -0
- package/lib/src/PaymentMethods/CreditCardData.d.ts +20 -0
- package/lib/src/PaymentMethods/CreditCardData.js +58 -0
- package/lib/src/PaymentMethods/CreditCardData.js.map +1 -0
- package/lib/src/PaymentMethods/CreditTrackData.d.ts +7 -0
- package/lib/src/PaymentMethods/CreditTrackData.js +28 -0
- package/lib/src/PaymentMethods/CreditTrackData.js.map +1 -0
- package/lib/src/PaymentMethods/Debit.d.ts +40 -0
- package/lib/src/PaymentMethods/Debit.js +71 -0
- package/lib/src/PaymentMethods/Debit.js.map +1 -0
- package/lib/src/PaymentMethods/DebitTrackData.d.ts +7 -0
- package/lib/src/PaymentMethods/DebitTrackData.js +28 -0
- package/lib/src/PaymentMethods/DebitTrackData.js.map +1 -0
- package/lib/src/PaymentMethods/EBT.d.ts +48 -0
- package/lib/src/PaymentMethods/EBT.js +89 -0
- package/lib/src/PaymentMethods/EBT.js.map +1 -0
- package/lib/src/PaymentMethods/EBTCardData.d.ts +16 -0
- package/lib/src/PaymentMethods/EBTCardData.js +33 -0
- package/lib/src/PaymentMethods/EBTCardData.js.map +1 -0
- package/lib/src/PaymentMethods/EBTTrackData.d.ts +8 -0
- package/lib/src/PaymentMethods/EBTTrackData.js +28 -0
- package/lib/src/PaymentMethods/EBTTrackData.js.map +1 -0
- package/lib/src/PaymentMethods/ECheck.d.ts +32 -0
- package/lib/src/PaymentMethods/ECheck.js +41 -0
- package/lib/src/PaymentMethods/ECheck.js.map +1 -0
- package/lib/src/PaymentMethods/GiftCard.d.ts +131 -0
- package/lib/src/PaymentMethods/GiftCard.js +206 -0
- package/lib/src/PaymentMethods/GiftCard.js.map +1 -0
- package/lib/src/PaymentMethods/Interfaces.d.ts +55 -0
- package/lib/src/PaymentMethods/Interfaces.js +3 -0
- package/lib/src/PaymentMethods/Interfaces.js.map +1 -0
- package/lib/src/PaymentMethods/PaymentMethod.d.ts +19 -0
- package/lib/src/PaymentMethods/PaymentMethod.js +115 -0
- package/lib/src/PaymentMethods/PaymentMethod.js.map +1 -0
- package/lib/src/PaymentMethods/RecurringPaymentMethod.d.ts +23 -0
- package/lib/src/PaymentMethods/RecurringPaymentMethod.js +78 -0
- package/lib/src/PaymentMethods/RecurringPaymentMethod.js.map +1 -0
- package/lib/src/PaymentMethods/TransactionReference.d.ts +10 -0
- package/lib/src/PaymentMethods/TransactionReference.js +13 -0
- package/lib/src/PaymentMethods/TransactionReference.js.map +1 -0
- package/lib/src/PaymentMethods/index.d.ts +15 -0
- package/lib/src/PaymentMethods/index.js +28 -0
- package/lib/src/PaymentMethods/index.js.map +1 -0
- package/lib/src/ServiceConfigs/AcceptorConfig.d.ts +41 -0
- package/lib/src/ServiceConfigs/AcceptorConfig.js +30 -0
- package/lib/src/ServiceConfigs/AcceptorConfig.js.map +1 -0
- package/lib/src/ServiceConfigs/Configuration.d.ts +15 -0
- package/lib/src/ServiceConfigs/Configuration.js +16 -0
- package/lib/src/ServiceConfigs/Configuration.js.map +1 -0
- package/lib/src/ServiceConfigs/Gateways/GatewayConfig.d.ts +14 -0
- package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js +46 -0
- package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js.map +1 -0
- package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.d.ts +27 -0
- package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js +61 -0
- package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js.map +1 -0
- package/lib/src/ServiceConfigs/Gateways/index.d.ts +2 -0
- package/lib/src/ServiceConfigs/Gateways/index.js +15 -0
- package/lib/src/ServiceConfigs/Gateways/index.js.map +1 -0
- package/lib/src/ServiceConfigs/ServicesConfig.d.ts +27 -0
- package/lib/src/ServiceConfigs/ServicesConfig.js +51 -0
- package/lib/src/ServiceConfigs/ServicesConfig.js.map +1 -0
- package/lib/src/ServiceConfigs/ServicesConfigsAdded.d.ts +10 -0
- package/lib/src/ServiceConfigs/ServicesConfigsAdded.js +27 -0
- package/lib/src/ServiceConfigs/ServicesConfigsAdded.js.map +1 -0
- package/lib/src/ServiceConfigs/index.d.ts +5 -0
- package/lib/src/ServiceConfigs/index.js +18 -0
- package/lib/src/ServiceConfigs/index.js.map +1 -0
- package/lib/src/Services/BatchService.d.ts +4 -0
- package/lib/src/Services/BatchService.js +18 -0
- package/lib/src/Services/BatchService.js.map +1 -0
- package/lib/src/Services/CheckService.d.ts +6 -0
- package/lib/src/Services/CheckService.js +21 -0
- package/lib/src/Services/CheckService.js.map +1 -0
- package/lib/src/Services/CreditService.d.ts +12 -0
- package/lib/src/Services/CreditService.js +55 -0
- package/lib/src/Services/CreditService.js.map +1 -0
- package/lib/src/Services/DebitService.d.ts +7 -0
- package/lib/src/Services/DebitService.js +29 -0
- package/lib/src/Services/DebitService.js.map +1 -0
- package/lib/src/Services/EBTService.d.ts +8 -0
- package/lib/src/Services/EBTService.js +33 -0
- package/lib/src/Services/EBTService.js.map +1 -0
- package/lib/src/Services/GiftService.d.ts +16 -0
- package/lib/src/Services/GiftService.js +55 -0
- package/lib/src/Services/GiftService.js.map +1 -0
- package/lib/src/Services/HostedService.d.ts +9 -0
- package/lib/src/Services/HostedService.js +60 -0
- package/lib/src/Services/HostedService.js.map +1 -0
- package/lib/src/Services/PayFacService.d.ts +26 -0
- package/lib/src/Services/PayFacService.js +78 -0
- package/lib/src/Services/PayFacService.js.map +1 -0
- package/lib/src/Services/RecurringService.d.ts +8 -0
- package/lib/src/Services/RecurringService.js +28 -0
- package/lib/src/Services/RecurringService.js.map +1 -0
- package/lib/src/Services/ReportingService.d.ts +6 -0
- package/lib/src/Services/ReportingService.js +20 -0
- package/lib/src/Services/ReportingService.js.map +1 -0
- package/lib/src/Services/index.d.ts +9 -0
- package/lib/src/Services/index.js +22 -0
- package/lib/src/Services/index.js.map +1 -0
- package/lib/src/ServicesConfig.d.ts +27 -0
- package/lib/src/ServicesConfig.js +51 -0
- package/lib/src/ServicesConfig.js.map +1 -0
- package/lib/src/ServicesContainer.d.ts +26 -0
- package/lib/src/ServicesContainer.js +140 -0
- package/lib/src/ServicesContainer.js.map +1 -0
- package/lib/src/Utils/GenerationUtils.d.ts +5 -0
- package/lib/src/Utils/GenerationUtils.js +37 -0
- package/lib/src/Utils/GenerationUtils.js.map +1 -0
- package/lib/src/Utils/InputValidation.d.ts +12 -0
- package/lib/src/Utils/InputValidation.js +73 -0
- package/lib/src/Utils/InputValidation.js.map +1 -0
- package/lib/src/Utils/Sha1.d.ts +6 -0
- package/lib/src/Utils/Sha1.js +226 -0
- package/lib/src/Utils/Sha1.js.map +1 -0
- package/lib/src/Utils/StringUtils.d.ts +6 -0
- package/lib/src/Utils/StringUtils.js +54 -0
- package/lib/src/Utils/StringUtils.js.map +1 -0
- package/lib/src/Utils/index.d.ts +2 -0
- package/lib/src/Utils/index.js +15 -0
- package/lib/src/Utils/index.js.map +1 -0
- package/lib/src/index.d.ts +12 -0
- package/lib/src/index.js +29 -0
- package/lib/src/index.js.map +1 -0
- package/lib/test/Data/TestCards.d.ts +24 -0
- package/lib/test/Data/TestCards.js +233 -0
- package/lib/test/Data/TestCards.js.map +1 -0
- package/lib/test/Data/TestChecks.d.ts +4 -0
- package/lib/test/Data/TestChecks.js +33 -0
- package/lib/test/Data/TestChecks.js.map +1 -0
- package/lib/test/Data/index.d.ts +2 -0
- package/lib/test/Data/index.js +15 -0
- package/lib/test/Data/index.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +113 -0
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +484 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +84 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +1721 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +84 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +1758 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +683 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +2219 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +708 -0
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +152 -0
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +172 -0
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +193 -0
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +378 -0
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +197 -0
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +48 -0
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js +101 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js +353 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js +124 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js +143 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +39 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +372 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js +101 -0
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js +536 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js +125 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js +145 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.d.ts +33 -0
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +269 -0
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +4 -0
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +31 -0
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js +4374 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js +759 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js +2400 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js +1657 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js +5651 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js +1986 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js +2370 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js +1704 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js +2054 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js +2470 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js +3117 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js +2032 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/CreditTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js +323 -0
- package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/HppTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/HppTest.js +99 -0
- package/lib/test/Integration/Gateways/RealexConnector/HppTest.js.map +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js +264 -0
- package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js.map +1 -0
- package/lib/test/Integration/Services/CheckServiceTest.d.ts +1 -0
- package/lib/test/Integration/Services/CheckServiceTest.js +99 -0
- package/lib/test/Integration/Services/CheckServiceTest.js.map +1 -0
- package/lib/test/Integration/Services/CreditServiceTest.d.ts +1 -0
- package/lib/test/Integration/Services/CreditServiceTest.js +314 -0
- package/lib/test/Integration/Services/CreditServiceTest.js.map +1 -0
- package/lib/test/Integration/Services/DebitServiceTest.d.ts +1 -0
- package/lib/test/Integration/Services/DebitServiceTest.js +155 -0
- package/lib/test/Integration/Services/DebitServiceTest.js.map +1 -0
- package/lib/test/Integration/Services/EBTServiceTest.d.ts +1 -0
- package/lib/test/Integration/Services/EBTServiceTest.js +136 -0
- package/lib/test/Integration/Services/EBTServiceTest.js.map +1 -0
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +1 -0
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +162 -0
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +1 -0
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +1 -0
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +140 -0
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +1 -0
- package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.d.ts +1 -0
- package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js +73 -0
- package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +1 -0
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +203 -0
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +1 -0
- package/lib/test/Unit/Gateways/RealexConnector/CreditTest.d.ts +1 -0
- package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js +71 -0
- package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { AuthorizationBuilder, InquiryType, PaymentMethodType } from "../";
|
|
2
|
+
import { IBalanceable, IChargable, IPrePayable, IReversable } from "./Interfaces";
|
|
3
|
+
import { PaymentMethod } from "./PaymentMethod";
|
|
4
|
+
export declare class GiftCard extends PaymentMethod implements IPrePayable, IBalanceable, IReversable, IChargable {
|
|
5
|
+
/**
|
|
6
|
+
* Payment method value types
|
|
7
|
+
*
|
|
8
|
+
* @var string[]
|
|
9
|
+
*/
|
|
10
|
+
protected static valueTypes: string[];
|
|
11
|
+
/**
|
|
12
|
+
* Payment method type
|
|
13
|
+
*
|
|
14
|
+
* @var PaymentMethodType
|
|
15
|
+
*/
|
|
16
|
+
paymentMethodType: PaymentMethodType;
|
|
17
|
+
/**
|
|
18
|
+
* Payment method PIN
|
|
19
|
+
*
|
|
20
|
+
* @var string
|
|
21
|
+
*/
|
|
22
|
+
pin: string;
|
|
23
|
+
/**
|
|
24
|
+
* Payment method value
|
|
25
|
+
*
|
|
26
|
+
* @internal
|
|
27
|
+
* @var string
|
|
28
|
+
*/
|
|
29
|
+
value: string;
|
|
30
|
+
/**
|
|
31
|
+
* Payment method value type
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
* @var string
|
|
35
|
+
*/
|
|
36
|
+
valueType: string;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new payment method
|
|
39
|
+
*
|
|
40
|
+
* @param string alias Alias to use
|
|
41
|
+
*
|
|
42
|
+
* @return GiftCard
|
|
43
|
+
*/
|
|
44
|
+
static create(alias?: string): Promise<GiftCard>;
|
|
45
|
+
/**
|
|
46
|
+
* Adds an alias to the payment method
|
|
47
|
+
*
|
|
48
|
+
* @param string alias Alias to add
|
|
49
|
+
*
|
|
50
|
+
* @return AuthorizationBuilder
|
|
51
|
+
*/
|
|
52
|
+
addAlias(alias?: string): AuthorizationBuilder;
|
|
53
|
+
/**
|
|
54
|
+
* Activates the payment method with the given amount
|
|
55
|
+
*
|
|
56
|
+
* @param string|number amount Amount to add
|
|
57
|
+
*
|
|
58
|
+
* @return AuthorizationBuilder
|
|
59
|
+
*/
|
|
60
|
+
activate(amount?: string | number): AuthorizationBuilder;
|
|
61
|
+
/**
|
|
62
|
+
* Adds value to the payment method
|
|
63
|
+
*
|
|
64
|
+
* @param string|number amount Amount to add
|
|
65
|
+
*
|
|
66
|
+
* @return AuthorizationBuilder
|
|
67
|
+
*/
|
|
68
|
+
addValue(amount?: string | number): AuthorizationBuilder;
|
|
69
|
+
/**
|
|
70
|
+
* Inquires the balance of the payment method
|
|
71
|
+
*
|
|
72
|
+
* @param InquiryType inquiry Type of inquiry
|
|
73
|
+
*
|
|
74
|
+
* @return AuthorizationBuilder
|
|
75
|
+
*/
|
|
76
|
+
balanceInquiry(inquiry?: InquiryType): AuthorizationBuilder;
|
|
77
|
+
/**
|
|
78
|
+
* Authorizes the payment method and captures the entire authorized amount
|
|
79
|
+
*
|
|
80
|
+
* @param string|number amount Amount to authorize
|
|
81
|
+
*
|
|
82
|
+
* @return AuthorizationBuilder
|
|
83
|
+
*/
|
|
84
|
+
charge(amount?: string | number): AuthorizationBuilder;
|
|
85
|
+
/**
|
|
86
|
+
* Deactivates the payment method
|
|
87
|
+
*
|
|
88
|
+
* @return AuthorizationBuilder
|
|
89
|
+
*/
|
|
90
|
+
deactivate(): AuthorizationBuilder;
|
|
91
|
+
/**
|
|
92
|
+
* Removes an alias to the payment method
|
|
93
|
+
*
|
|
94
|
+
* @param string alias Alias to remove
|
|
95
|
+
*
|
|
96
|
+
* @return AuthorizationBuilder
|
|
97
|
+
*/
|
|
98
|
+
removeAlias(alias?: string): AuthorizationBuilder;
|
|
99
|
+
/**
|
|
100
|
+
* Replaces the payment method with the given one
|
|
101
|
+
*
|
|
102
|
+
* @param GiftCard newCard Replacement gift card
|
|
103
|
+
*
|
|
104
|
+
* @return AuthorizationBuilder
|
|
105
|
+
*/
|
|
106
|
+
replaceWith(newCard?: GiftCard): AuthorizationBuilder;
|
|
107
|
+
/**
|
|
108
|
+
* Reverses the payment method
|
|
109
|
+
*
|
|
110
|
+
* @param string|number amount Amount to reverse
|
|
111
|
+
*
|
|
112
|
+
* @return AuthorizationBuilder
|
|
113
|
+
*/
|
|
114
|
+
reverse(amount?: string | number): AuthorizationBuilder;
|
|
115
|
+
/**
|
|
116
|
+
* Rewards the payment method
|
|
117
|
+
*
|
|
118
|
+
* @param string|number amount Amount to reward
|
|
119
|
+
*
|
|
120
|
+
* @return AuthorizationBuilder
|
|
121
|
+
*/
|
|
122
|
+
rewards(amount?: string | number): AuthorizationBuilder;
|
|
123
|
+
get alias(): string;
|
|
124
|
+
set alias(value: string);
|
|
125
|
+
get number(): string;
|
|
126
|
+
set number(value: string);
|
|
127
|
+
get token(): string;
|
|
128
|
+
set token(value: string);
|
|
129
|
+
get trackData(): string;
|
|
130
|
+
set trackData(value: string);
|
|
131
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.GiftCard = void 0;
|
|
19
|
+
var __1 = require("../");
|
|
20
|
+
var PaymentMethod_1 = require("./PaymentMethod");
|
|
21
|
+
var GiftCard = /** @class */ (function (_super) {
|
|
22
|
+
__extends(GiftCard, _super);
|
|
23
|
+
function GiftCard() {
|
|
24
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
+
/**
|
|
26
|
+
* Payment method type
|
|
27
|
+
*
|
|
28
|
+
* @var PaymentMethodType
|
|
29
|
+
*/
|
|
30
|
+
_this.paymentMethodType = __1.PaymentMethodType.Gift;
|
|
31
|
+
return _this;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new payment method
|
|
35
|
+
*
|
|
36
|
+
* @param string alias Alias to use
|
|
37
|
+
*
|
|
38
|
+
* @return GiftCard
|
|
39
|
+
*/
|
|
40
|
+
GiftCard.create = function (alias) {
|
|
41
|
+
var card = new GiftCard();
|
|
42
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Alias, card)
|
|
43
|
+
.withAlias(__1.AliasAction.Create, alias)
|
|
44
|
+
.execute()
|
|
45
|
+
.then(function (response) {
|
|
46
|
+
if (response.responseCode === "00") {
|
|
47
|
+
return response.giftCard;
|
|
48
|
+
}
|
|
49
|
+
throw new __1.ApiError(response.responseMessage);
|
|
50
|
+
})
|
|
51
|
+
.catch(function () {
|
|
52
|
+
throw new __1.ApiError("Unable to create gift card alias");
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Adds an alias to the payment method
|
|
57
|
+
*
|
|
58
|
+
* @param string alias Alias to add
|
|
59
|
+
*
|
|
60
|
+
* @return AuthorizationBuilder
|
|
61
|
+
*/
|
|
62
|
+
GiftCard.prototype.addAlias = function (alias) {
|
|
63
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Alias, this).withAlias(__1.AliasAction.Add, alias);
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Activates the payment method with the given amount
|
|
67
|
+
*
|
|
68
|
+
* @param string|number amount Amount to add
|
|
69
|
+
*
|
|
70
|
+
* @return AuthorizationBuilder
|
|
71
|
+
*/
|
|
72
|
+
GiftCard.prototype.activate = function (amount) {
|
|
73
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Activate, this).withAmount(amount);
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Adds value to the payment method
|
|
77
|
+
*
|
|
78
|
+
* @param string|number amount Amount to add
|
|
79
|
+
*
|
|
80
|
+
* @return AuthorizationBuilder
|
|
81
|
+
*/
|
|
82
|
+
GiftCard.prototype.addValue = function (amount) {
|
|
83
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.AddValue, this).withAmount(amount);
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Inquires the balance of the payment method
|
|
87
|
+
*
|
|
88
|
+
* @param InquiryType inquiry Type of inquiry
|
|
89
|
+
*
|
|
90
|
+
* @return AuthorizationBuilder
|
|
91
|
+
*/
|
|
92
|
+
GiftCard.prototype.balanceInquiry = function (inquiry) {
|
|
93
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Balance, this).withBalanceInquiryType(inquiry);
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Authorizes the payment method and captures the entire authorized amount
|
|
97
|
+
*
|
|
98
|
+
* @param string|number amount Amount to authorize
|
|
99
|
+
*
|
|
100
|
+
* @return AuthorizationBuilder
|
|
101
|
+
*/
|
|
102
|
+
GiftCard.prototype.charge = function (amount) {
|
|
103
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Sale, this).withAmount(amount);
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Deactivates the payment method
|
|
107
|
+
*
|
|
108
|
+
* @return AuthorizationBuilder
|
|
109
|
+
*/
|
|
110
|
+
GiftCard.prototype.deactivate = function () {
|
|
111
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Deactivate, this);
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Removes an alias to the payment method
|
|
115
|
+
*
|
|
116
|
+
* @param string alias Alias to remove
|
|
117
|
+
*
|
|
118
|
+
* @return AuthorizationBuilder
|
|
119
|
+
*/
|
|
120
|
+
GiftCard.prototype.removeAlias = function (alias) {
|
|
121
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Alias, this).withAlias(__1.AliasAction.Delete, alias);
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Replaces the payment method with the given one
|
|
125
|
+
*
|
|
126
|
+
* @param GiftCard newCard Replacement gift card
|
|
127
|
+
*
|
|
128
|
+
* @return AuthorizationBuilder
|
|
129
|
+
*/
|
|
130
|
+
GiftCard.prototype.replaceWith = function (newCard) {
|
|
131
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Replace, this).withReplacementCard(newCard);
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Reverses the payment method
|
|
135
|
+
*
|
|
136
|
+
* @param string|number amount Amount to reverse
|
|
137
|
+
*
|
|
138
|
+
* @return AuthorizationBuilder
|
|
139
|
+
*/
|
|
140
|
+
GiftCard.prototype.reverse = function (amount) {
|
|
141
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Reversal, this).withAmount(amount);
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Rewards the payment method
|
|
145
|
+
*
|
|
146
|
+
* @param string|number amount Amount to reward
|
|
147
|
+
*
|
|
148
|
+
* @return AuthorizationBuilder
|
|
149
|
+
*/
|
|
150
|
+
GiftCard.prototype.rewards = function (amount) {
|
|
151
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Reward, this).withAmount(amount);
|
|
152
|
+
};
|
|
153
|
+
Object.defineProperty(GiftCard.prototype, "alias", {
|
|
154
|
+
get: function () {
|
|
155
|
+
return this.value;
|
|
156
|
+
},
|
|
157
|
+
set: function (value) {
|
|
158
|
+
this.value = value;
|
|
159
|
+
this.valueType = "Alias";
|
|
160
|
+
},
|
|
161
|
+
enumerable: false,
|
|
162
|
+
configurable: true
|
|
163
|
+
});
|
|
164
|
+
Object.defineProperty(GiftCard.prototype, "number", {
|
|
165
|
+
get: function () {
|
|
166
|
+
return this.value;
|
|
167
|
+
},
|
|
168
|
+
set: function (value) {
|
|
169
|
+
this.value = value;
|
|
170
|
+
this.valueType = "CardNbr";
|
|
171
|
+
},
|
|
172
|
+
enumerable: false,
|
|
173
|
+
configurable: true
|
|
174
|
+
});
|
|
175
|
+
Object.defineProperty(GiftCard.prototype, "token", {
|
|
176
|
+
get: function () {
|
|
177
|
+
return this.value;
|
|
178
|
+
},
|
|
179
|
+
set: function (value) {
|
|
180
|
+
this.value = value;
|
|
181
|
+
this.valueType = "TokenValue";
|
|
182
|
+
},
|
|
183
|
+
enumerable: false,
|
|
184
|
+
configurable: true
|
|
185
|
+
});
|
|
186
|
+
Object.defineProperty(GiftCard.prototype, "trackData", {
|
|
187
|
+
get: function () {
|
|
188
|
+
return this.value;
|
|
189
|
+
},
|
|
190
|
+
set: function (value) {
|
|
191
|
+
this.value = value;
|
|
192
|
+
this.valueType = "TrackData";
|
|
193
|
+
},
|
|
194
|
+
enumerable: false,
|
|
195
|
+
configurable: true
|
|
196
|
+
});
|
|
197
|
+
/**
|
|
198
|
+
* Payment method value types
|
|
199
|
+
*
|
|
200
|
+
* @var string[]
|
|
201
|
+
*/
|
|
202
|
+
GiftCard.valueTypes = ["alias", "number", "token", "trackData"];
|
|
203
|
+
return GiftCard;
|
|
204
|
+
}(PaymentMethod_1.PaymentMethod));
|
|
205
|
+
exports.GiftCard = GiftCard;
|
|
206
|
+
//# sourceMappingURL=GiftCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GiftCard.js","sourceRoot":"","sources":["../../../src/PaymentMethods/GiftCard.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { AuthorizationBuilder, CvnPresenceIndicator, EncryptionData, EntryMethod, InquiryType, ManagementBuilder, PaymentMethodType } from "../";
|
|
2
|
+
export interface IAuthable {
|
|
3
|
+
authorize(amount?: string | number): AuthorizationBuilder;
|
|
4
|
+
}
|
|
5
|
+
export interface IBalanceable {
|
|
6
|
+
balanceInquiry(inquiry?: InquiryType): AuthorizationBuilder;
|
|
7
|
+
}
|
|
8
|
+
export interface ICardData {
|
|
9
|
+
number: string;
|
|
10
|
+
expMonth: string;
|
|
11
|
+
expYear: string;
|
|
12
|
+
cvn: string;
|
|
13
|
+
cvnPresenceIndicator: CvnPresenceIndicator;
|
|
14
|
+
cardHolderName: string;
|
|
15
|
+
cardPresent: boolean;
|
|
16
|
+
readerPresent: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface IChargable {
|
|
19
|
+
charge(amount?: string | number): AuthorizationBuilder;
|
|
20
|
+
}
|
|
21
|
+
export interface IEditable {
|
|
22
|
+
edit(amount?: string | number): AuthorizationBuilder;
|
|
23
|
+
}
|
|
24
|
+
export interface IEncryptable {
|
|
25
|
+
encryptionData: EncryptionData;
|
|
26
|
+
}
|
|
27
|
+
export interface IPaymentMethod {
|
|
28
|
+
paymentMethodType: PaymentMethodType;
|
|
29
|
+
}
|
|
30
|
+
export interface IPinProtected {
|
|
31
|
+
pinBlock: string;
|
|
32
|
+
}
|
|
33
|
+
export interface IPrePayable {
|
|
34
|
+
addValue(amount?: string | number): AuthorizationBuilder;
|
|
35
|
+
}
|
|
36
|
+
export interface IRefundable {
|
|
37
|
+
refund(amount?: string | number): AuthorizationBuilder;
|
|
38
|
+
}
|
|
39
|
+
export interface IReversable {
|
|
40
|
+
reverse(amount?: string | number): AuthorizationBuilder;
|
|
41
|
+
}
|
|
42
|
+
export interface ITokenizable {
|
|
43
|
+
token: string;
|
|
44
|
+
tokenize(): AuthorizationBuilder;
|
|
45
|
+
}
|
|
46
|
+
export interface ITrackData {
|
|
47
|
+
value: string;
|
|
48
|
+
entryMethod: EntryMethod;
|
|
49
|
+
}
|
|
50
|
+
export interface IVerifyable {
|
|
51
|
+
verify(): AuthorizationBuilder;
|
|
52
|
+
}
|
|
53
|
+
export interface IVoidable {
|
|
54
|
+
void(): ManagementBuilder;
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../../src/PaymentMethods/Interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IPaymentMethod, PaymentMethodType } from "../";
|
|
2
|
+
export declare abstract class PaymentMethod implements IPaymentMethod {
|
|
3
|
+
paymentMethodType: PaymentMethodType;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
get isAuthable(): boolean;
|
|
6
|
+
get isBalanceable(): boolean;
|
|
7
|
+
get isCardData(): boolean;
|
|
8
|
+
get isChargable(): boolean;
|
|
9
|
+
get isEditable(): boolean;
|
|
10
|
+
get isEncryptable(): boolean;
|
|
11
|
+
get isPinProtected(): boolean;
|
|
12
|
+
get isPrePayable(): boolean;
|
|
13
|
+
get isRefundable(): boolean;
|
|
14
|
+
get isReversable(): boolean;
|
|
15
|
+
get isTokenizable(): boolean;
|
|
16
|
+
get isTrackData(): boolean;
|
|
17
|
+
get isVerifyable(): boolean;
|
|
18
|
+
get isVoidable(): boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaymentMethod = void 0;
|
|
4
|
+
var __1 = require("../");
|
|
5
|
+
var PaymentMethod = /** @class */ (function () {
|
|
6
|
+
function PaymentMethod() {
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(PaymentMethod.prototype, "isAuthable", {
|
|
9
|
+
get: function () {
|
|
10
|
+
return this.authorize !== undefined;
|
|
11
|
+
},
|
|
12
|
+
enumerable: false,
|
|
13
|
+
configurable: true
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(PaymentMethod.prototype, "isBalanceable", {
|
|
16
|
+
get: function () {
|
|
17
|
+
return this.balanceInquiry !== undefined;
|
|
18
|
+
},
|
|
19
|
+
enumerable: false,
|
|
20
|
+
configurable: true
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(PaymentMethod.prototype, "isCardData", {
|
|
23
|
+
get: function () {
|
|
24
|
+
return (((this.isTokenizable &&
|
|
25
|
+
this.token !== undefined) ||
|
|
26
|
+
this.number !== undefined) &&
|
|
27
|
+
this.paymentMethodType !== __1.PaymentMethodType.Gift);
|
|
28
|
+
},
|
|
29
|
+
enumerable: false,
|
|
30
|
+
configurable: true
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(PaymentMethod.prototype, "isChargable", {
|
|
33
|
+
get: function () {
|
|
34
|
+
return this.charge !== undefined;
|
|
35
|
+
},
|
|
36
|
+
enumerable: false,
|
|
37
|
+
configurable: true
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(PaymentMethod.prototype, "isEditable", {
|
|
40
|
+
get: function () {
|
|
41
|
+
return this.edit !== undefined;
|
|
42
|
+
},
|
|
43
|
+
enumerable: false,
|
|
44
|
+
configurable: true
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(PaymentMethod.prototype, "isEncryptable", {
|
|
47
|
+
get: function () {
|
|
48
|
+
return this.encryptionData !== undefined;
|
|
49
|
+
},
|
|
50
|
+
enumerable: false,
|
|
51
|
+
configurable: true
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(PaymentMethod.prototype, "isPinProtected", {
|
|
54
|
+
get: function () {
|
|
55
|
+
return this.pinBlock !== undefined;
|
|
56
|
+
},
|
|
57
|
+
enumerable: false,
|
|
58
|
+
configurable: true
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(PaymentMethod.prototype, "isPrePayable", {
|
|
61
|
+
get: function () {
|
|
62
|
+
return this.addValue !== undefined;
|
|
63
|
+
},
|
|
64
|
+
enumerable: false,
|
|
65
|
+
configurable: true
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(PaymentMethod.prototype, "isRefundable", {
|
|
68
|
+
get: function () {
|
|
69
|
+
return this.refund !== undefined;
|
|
70
|
+
},
|
|
71
|
+
enumerable: false,
|
|
72
|
+
configurable: true
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(PaymentMethod.prototype, "isReversable", {
|
|
75
|
+
get: function () {
|
|
76
|
+
return this.reverse !== undefined;
|
|
77
|
+
},
|
|
78
|
+
enumerable: false,
|
|
79
|
+
configurable: true
|
|
80
|
+
});
|
|
81
|
+
Object.defineProperty(PaymentMethod.prototype, "isTokenizable", {
|
|
82
|
+
get: function () {
|
|
83
|
+
return this.tokenize !== undefined;
|
|
84
|
+
},
|
|
85
|
+
enumerable: false,
|
|
86
|
+
configurable: true
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(PaymentMethod.prototype, "isTrackData", {
|
|
89
|
+
get: function () {
|
|
90
|
+
return (this.value !== undefined &&
|
|
91
|
+
(this.entryMethod !== undefined ||
|
|
92
|
+
this.pinBlock !== undefined ||
|
|
93
|
+
this.encryptionData !== undefined));
|
|
94
|
+
},
|
|
95
|
+
enumerable: false,
|
|
96
|
+
configurable: true
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(PaymentMethod.prototype, "isVerifyable", {
|
|
99
|
+
get: function () {
|
|
100
|
+
return this.verify !== undefined;
|
|
101
|
+
},
|
|
102
|
+
enumerable: false,
|
|
103
|
+
configurable: true
|
|
104
|
+
});
|
|
105
|
+
Object.defineProperty(PaymentMethod.prototype, "isVoidable", {
|
|
106
|
+
get: function () {
|
|
107
|
+
return this.void !== undefined;
|
|
108
|
+
},
|
|
109
|
+
enumerable: false,
|
|
110
|
+
configurable: true
|
|
111
|
+
});
|
|
112
|
+
return PaymentMethod;
|
|
113
|
+
}());
|
|
114
|
+
exports.PaymentMethod = PaymentMethod;
|
|
115
|
+
//# sourceMappingURL=PaymentMethod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentMethod.js","sourceRoot":"","sources":["../../../src/PaymentMethods/PaymentMethod.ts"],"names":[],"mappings":";;;AAAA,yBAiBa;AAEb;IAAA;IAqEA,CAAC;IAjEC,sBAAI,qCAAU;aAAd;YACE,OAAS,IAA6B,CAAC,SAAS,KAAK,SAAS,CAAC;QACjE,CAAC;;;OAAA;IAED,sBAAI,wCAAa;aAAjB;YACE,OAAS,IAAgC,CAAC,cAAc,KAAK,SAAS,CAAC;QACzE,CAAC;;;OAAA;IAED,sBAAI,qCAAU;aAAd;YACE,OAAO,CACL,CAAC,CAAC,IAAI,CAAC,aAAa;gBAChB,IAAgC,CAAC,KAAK,KAAK,SAAS,CAAC;gBACrD,IAA6B,CAAC,MAAM,KAAK,SAAS,CAAC;gBACvD,IAAI,CAAC,iBAAiB,KAAK,qBAAiB,CAAC,IAAI,CAClD,CAAC;QACJ,CAAC;;;OAAA;IAED,sBAAI,sCAAW;aAAf;YACE,OAAS,IAA8B,CAAC,MAAM,KAAK,SAAS,CAAC;QAC/D,CAAC;;;OAAA;IAED,sBAAI,qCAAU;aAAd;YACE,OAAS,IAA6B,CAAC,IAAI,KAAK,SAAS,CAAC;QAC5D,CAAC;;;OAAA;IAED,sBAAI,wCAAa;aAAjB;YACE,OAAS,IAAgC,CAAC,cAAc,KAAK,SAAS,CAAC;QACzE,CAAC;;;OAAA;IAED,sBAAI,yCAAc;aAAlB;YACE,OAAS,IAAiC,CAAC,QAAQ,KAAK,SAAS,CAAC;QACpE,CAAC;;;OAAA;IAED,sBAAI,uCAAY;aAAhB;YACE,OAAS,IAA+B,CAAC,QAAQ,KAAK,SAAS,CAAC;QAClE,CAAC;;;OAAA;IAED,sBAAI,uCAAY;aAAhB;YACE,OAAS,IAA+B,CAAC,MAAM,KAAK,SAAS,CAAC;QAChE,CAAC;;;OAAA;IAED,sBAAI,uCAAY;aAAhB;YACE,OAAS,IAA+B,CAAC,OAAO,KAAK,SAAS,CAAC;QACjE,CAAC;;;OAAA;IAED,sBAAI,wCAAa;aAAjB;YACE,OAAS,IAAgC,CAAC,QAAQ,KAAK,SAAS,CAAC;QACnE,CAAC;;;OAAA;IAED,sBAAI,sCAAW;aAAf;YACE,OAAO,CACH,IAA8B,CAAC,KAAK,KAAK,SAAS;gBACpD,CAAG,IAA8B,CAAC,WAAW,KAAK,SAAS;oBACvD,IAAiC,CAAC,QAAQ,KAAK,SAAS;oBACxD,IAAgC,CAAC,cAAc,KAAK,SAAS,CAAC,CACnE,CAAC;QACJ,CAAC;;;OAAA;IAED,sBAAI,uCAAY;aAAhB;YACE,OAAS,IAA+B,CAAC,MAAM,KAAK,SAAS,CAAC;QAChE,CAAC;;;OAAA;IAED,sBAAI,qCAAU;aAAd;YACE,OAAS,IAA6B,CAAC,IAAI,KAAK,SAAS,CAAC;QAC5D,CAAC;;;OAAA;IACH,oBAAC;AAAD,CAAC,AArED,IAqEC;AArEqB,sCAAa"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Address, AuthorizationBuilder, IPaymentMethod, PaymentMethodType, Schedule } from "../";
|
|
2
|
+
import { RecurringEntity } from "../Entities";
|
|
3
|
+
export declare class RecurringPaymentMethod extends RecurringEntity<RecurringPaymentMethod> {
|
|
4
|
+
address: Address;
|
|
5
|
+
commercialIndicator: string;
|
|
6
|
+
customerKey: string;
|
|
7
|
+
expirationDate: string;
|
|
8
|
+
nameOnAccount: string;
|
|
9
|
+
paymentMethodType: PaymentMethodType;
|
|
10
|
+
paymentType: string;
|
|
11
|
+
preferredPayment: boolean;
|
|
12
|
+
status: string;
|
|
13
|
+
taxType: string;
|
|
14
|
+
private _paymentMethod;
|
|
15
|
+
get paymentMethod(): IPaymentMethod;
|
|
16
|
+
set paymentMethod(value: IPaymentMethod);
|
|
17
|
+
constructor(customerIdOrPaymentMethod?: string | IPaymentMethod, paymentId?: string);
|
|
18
|
+
authorize(amount?: number | string): AuthorizationBuilder;
|
|
19
|
+
charge(amount?: number | string): AuthorizationBuilder;
|
|
20
|
+
refund(amount?: number | string): AuthorizationBuilder;
|
|
21
|
+
verify(): AuthorizationBuilder;
|
|
22
|
+
addSchedule(scheduleId: string): Schedule;
|
|
23
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.RecurringPaymentMethod = void 0;
|
|
19
|
+
var __1 = require("../");
|
|
20
|
+
var Entities_1 = require("../Entities");
|
|
21
|
+
var RecurringPaymentMethod = /** @class */ (function (_super) {
|
|
22
|
+
__extends(RecurringPaymentMethod, _super);
|
|
23
|
+
function RecurringPaymentMethod(customerIdOrPaymentMethod, paymentId) {
|
|
24
|
+
var _this = _super.call(this) || this;
|
|
25
|
+
_this.paymentMethodType = __1.PaymentMethodType.Recurring;
|
|
26
|
+
if (customerIdOrPaymentMethod &&
|
|
27
|
+
(typeof customerIdOrPaymentMethod === "string" ||
|
|
28
|
+
customerIdOrPaymentMethod instanceof String)) {
|
|
29
|
+
_this.paymentType = "Credit Card";
|
|
30
|
+
_this.customerKey = customerIdOrPaymentMethod;
|
|
31
|
+
if (paymentId) {
|
|
32
|
+
_this.key = paymentId;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else if (customerIdOrPaymentMethod) {
|
|
36
|
+
_this._paymentMethod = customerIdOrPaymentMethod;
|
|
37
|
+
}
|
|
38
|
+
return _this;
|
|
39
|
+
}
|
|
40
|
+
Object.defineProperty(RecurringPaymentMethod.prototype, "paymentMethod", {
|
|
41
|
+
get: function () {
|
|
42
|
+
return this._paymentMethod;
|
|
43
|
+
},
|
|
44
|
+
set: function (value) {
|
|
45
|
+
var client = __1.ServicesContainer.instance().getRecurringClient();
|
|
46
|
+
if (!client.supportsUpdatePaymentDetails) {
|
|
47
|
+
throw new __1.UnsupportedTransactionError();
|
|
48
|
+
}
|
|
49
|
+
this._paymentMethod = value;
|
|
50
|
+
},
|
|
51
|
+
enumerable: false,
|
|
52
|
+
configurable: true
|
|
53
|
+
});
|
|
54
|
+
RecurringPaymentMethod.prototype.authorize = function (amount) {
|
|
55
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Auth, this)
|
|
56
|
+
.withAmount(amount)
|
|
57
|
+
.withOneTimePayment(true);
|
|
58
|
+
};
|
|
59
|
+
RecurringPaymentMethod.prototype.charge = function (amount) {
|
|
60
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Sale, this)
|
|
61
|
+
.withAmount(amount)
|
|
62
|
+
.withOneTimePayment(true);
|
|
63
|
+
};
|
|
64
|
+
RecurringPaymentMethod.prototype.refund = function (amount) {
|
|
65
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Refund, this).withAmount(amount);
|
|
66
|
+
};
|
|
67
|
+
RecurringPaymentMethod.prototype.verify = function () {
|
|
68
|
+
return new __1.AuthorizationBuilder(__1.TransactionType.Verify, this);
|
|
69
|
+
};
|
|
70
|
+
RecurringPaymentMethod.prototype.addSchedule = function (scheduleId) {
|
|
71
|
+
var schedule = new __1.Schedule(this.customerKey, this.key);
|
|
72
|
+
schedule.id = scheduleId;
|
|
73
|
+
return schedule;
|
|
74
|
+
};
|
|
75
|
+
return RecurringPaymentMethod;
|
|
76
|
+
}(Entities_1.RecurringEntity));
|
|
77
|
+
exports.RecurringPaymentMethod = RecurringPaymentMethod;
|
|
78
|
+
//# sourceMappingURL=RecurringPaymentMethod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecurringPaymentMethod.js","sourceRoot":"","sources":["../../../src/PaymentMethods/RecurringPaymentMethod.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,yBASa;AACb,wCAA8C;AAE9C;IAA4C,0CAE3C;IAyBC,gCACE,yBAAmD,EACnD,SAAkB;QAFpB,YAIE,iBAAO,SAeR;QAtCM,uBAAiB,GAAG,qBAAiB,CAAC,SAAS,CAAC;QAyBrD,IACE,yBAAyB;YACvB,CAAC,OAAO,yBAAyB,KAAK,QAAQ;gBAChD,yBAAyB,YAAY,MAAM,CAAC,EAC5C;YACA,KAAI,CAAC,WAAW,GAAG,aAAa,CAAC;YACjC,KAAI,CAAC,WAAW,GAAG,yBAAmC,CAAC;YACvD,IAAI,SAAS,EAAE;gBACb,KAAI,CAAC,GAAG,GAAG,SAAS,CAAC;aACtB;SACF;aAAM,IAAI,yBAAyB,EAAE;YACpC,KAAI,CAAC,cAAc,GAAG,yBAA2C,CAAC;SACnE;;IACH,CAAC;IA/BD,sBAAW,iDAAa;aAAxB;YACE,OAAO,IAAI,CAAC,cAAc,CAAC;QAC7B,CAAC;aAED,UAAyB,KAAqB;YAC5C,IAAM,MAAM,GAAG,qBAAiB,CAAC,QAAQ,EAAE,CAAC,kBAAkB,EAAE,CAAC;YACjE,IAAI,CAAC,MAAM,CAAC,4BAA4B,EAAE;gBACxC,MAAM,IAAI,+BAA2B,EAAE,CAAC;aACzC;YACD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC9B,CAAC;;;OARA;IA+BM,0CAAS,GAAhB,UAAiB,MAAwB;QACvC,OAAO,IAAI,wBAAoB,CAAC,mBAAe,CAAC,IAAI,EAAE,IAAI,CAAC;aACxD,UAAU,CAAC,MAAM,CAAC;aAClB,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAEM,uCAAM,GAAb,UAAc,MAAwB;QACpC,OAAO,IAAI,wBAAoB,CAAC,mBAAe,CAAC,IAAI,EAAE,IAAI,CAAC;aACxD,UAAU,CAAC,MAAM,CAAC;aAClB,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAEM,uCAAM,GAAb,UAAc,MAAwB;QACpC,OAAO,IAAI,wBAAoB,CAAC,mBAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,UAAU,CACtE,MAAM,CACP,CAAC;IACJ,CAAC;IAEM,uCAAM,GAAb;QACE,OAAO,IAAI,wBAAoB,CAAC,mBAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;IAEM,4CAAW,GAAlB,UAAmB,UAAkB;QACnC,IAAM,QAAQ,GAAG,IAAI,YAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1D,QAAQ,CAAC,EAAE,GAAG,UAAU,CAAC;QACzB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACH,6BAAC;AAAD,CAAC,AA3ED,CAA4C,0BAAe,GA2E1D;AA3EY,wDAAsB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PaymentMethodType } from "../";
|
|
2
|
+
import { IPaymentMethod } from "./Interfaces";
|
|
3
|
+
export declare class TransactionReference implements IPaymentMethod {
|
|
4
|
+
authCode: string;
|
|
5
|
+
orderId: string;
|
|
6
|
+
transactionId: string;
|
|
7
|
+
paymentMethodType: PaymentMethodType;
|
|
8
|
+
clientTransactionId: string;
|
|
9
|
+
constructor(transactionId?: string);
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionReference = void 0;
|
|
4
|
+
var TransactionReference = /** @class */ (function () {
|
|
5
|
+
function TransactionReference(transactionId) {
|
|
6
|
+
if (transactionId) {
|
|
7
|
+
this.transactionId = transactionId;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return TransactionReference;
|
|
11
|
+
}());
|
|
12
|
+
exports.TransactionReference = TransactionReference;
|
|
13
|
+
//# sourceMappingURL=TransactionReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionReference.js","sourceRoot":"","sources":["../../../src/PaymentMethods/TransactionReference.ts"],"names":[],"mappings":";;;AAGA;IAOE,8BAAmB,aAAsB;QACvC,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;SACpC;IACH,CAAC;IACH,2BAAC;AAAD,CAAC,AAZD,IAYC;AAZY,oDAAoB"}
|