globalpayments-api 3.7.0 → 3.8.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/CHANGELOG.md +17 -1
- package/LICENSE.md +257 -257
- package/README.md +141 -141
- package/lib/src/Builders/BaseBuilder/Validations.js +1 -1
- package/lib/src/Builders/BaseBuilder/Validations.js.map +1 -1
- package/lib/src/Builders/ManagementBuilder.d.ts +26 -6
- package/lib/src/Builders/ManagementBuilder.js +66 -34
- package/lib/src/Builders/ManagementBuilder.js.map +1 -1
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js +19 -0
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js.map +1 -1
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.d.ts +2 -0
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js +86 -0
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js.map +1 -1
- package/lib/src/Builders/TransactionReportBuilder.d.ts +5 -2
- package/lib/src/Builders/TransactionReportBuilder.js +19 -0
- package/lib/src/Builders/TransactionReportBuilder.js.map +1 -1
- package/lib/src/Entities/AdditionalTaxDetails.d.ts +5 -0
- package/lib/src/Entities/AdditionalTaxDetails.js +10 -0
- package/lib/src/Entities/AdditionalTaxDetails.js.map +1 -0
- package/lib/src/Entities/CommercialData.d.ts +26 -0
- package/lib/src/Entities/CommercialData.js +36 -0
- package/lib/src/Entities/CommercialData.js.map +1 -0
- package/lib/src/Entities/CommercialLineItem.d.ts +21 -0
- package/lib/src/Entities/CommercialLineItem.js +24 -0
- package/lib/src/Entities/CommercialLineItem.js.map +1 -0
- package/lib/src/Entities/DiscountDetails.d.ts +8 -0
- package/lib/src/Entities/DiscountDetails.js +13 -0
- package/lib/src/Entities/DiscountDetails.js.map +1 -0
- package/lib/src/Entities/DisputeDocument.d.ts +5 -0
- package/lib/src/Entities/DisputeDocument.js +10 -0
- package/lib/src/Entities/DisputeDocument.js.map +1 -0
- package/lib/src/Entities/Document.d.ts +10 -0
- package/lib/src/Entities/Document.js +13 -0
- package/lib/src/Entities/Document.js.map +1 -0
- package/lib/src/Entities/Enums/DisputeSortProperty.d.ts +12 -0
- package/lib/src/Entities/Enums/DisputeSortProperty.js +17 -0
- package/lib/src/Entities/Enums/DisputeSortProperty.js.map +1 -0
- package/lib/src/Entities/Enums/DisputeStage.d.ts +11 -0
- package/lib/src/Entities/Enums/DisputeStage.js +16 -0
- package/lib/src/Entities/Enums/DisputeStage.js.map +1 -0
- package/lib/src/Entities/Enums/DisputeStatus.d.ts +7 -0
- package/lib/src/Entities/Enums/DisputeStatus.js +12 -0
- package/lib/src/Entities/Enums/DisputeStatus.js.map +1 -0
- package/lib/src/Entities/Enums/DocumentCategory.d.ts +5 -0
- package/lib/src/Entities/Enums/DocumentCategory.js +10 -0
- package/lib/src/Entities/Enums/DocumentCategory.js.map +1 -0
- package/lib/src/Entities/Enums/FileType.d.ts +11 -0
- package/lib/src/Entities/Enums/FileType.js +16 -0
- package/lib/src/Entities/Enums/FileType.js.map +1 -0
- package/lib/src/Entities/Enums.d.ts +17 -1
- package/lib/src/Entities/Enums.js +20 -2
- package/lib/src/Entities/Enums.js.map +1 -1
- package/lib/src/Entities/HostedPaymentData.d.ts +3 -0
- package/lib/src/Entities/HostedPaymentData.js +3 -0
- package/lib/src/Entities/HostedPaymentData.js.map +1 -1
- package/lib/src/Entities/Reporting/DisputeSummary.d.ts +53 -0
- package/lib/src/Entities/Reporting/DisputeSummary.js +64 -0
- package/lib/src/Entities/Reporting/DisputeSummary.js.map +1 -0
- package/lib/src/Entities/Reporting/SearchCriteriaBuilder.d.ts +4 -2
- package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js +2 -0
- package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js.map +1 -1
- package/lib/src/Entities/Reporting/index.d.ts +1 -0
- package/lib/src/Entities/Reporting/index.js +1 -0
- package/lib/src/Entities/Reporting/index.js.map +1 -1
- package/lib/src/Entities/Transaction.js +3 -0
- package/lib/src/Entities/Transaction.js.map +1 -1
- package/lib/src/Entities/TransactionSummary.d.ts +1 -0
- package/lib/src/Entities/TransactionSummary.js +1 -0
- package/lib/src/Entities/TransactionSummary.js.map +1 -1
- package/lib/src/Entities/index.d.ts +7 -0
- package/lib/src/Entities/index.js +7 -0
- package/lib/src/Entities/index.js.map +1 -1
- package/lib/src/Gateways/GpApiConnector.js +3 -0
- package/lib/src/Gateways/GpApiConnector.js.map +1 -1
- package/lib/src/Gateways/GpEcomConnector.js +9 -0
- package/lib/src/Gateways/GpEcomConnector.js.map +1 -1
- package/lib/src/Gateways/PayPlanConnector.d.ts +1 -1
- package/lib/src/Gateways/PorticoConnector.d.ts +3 -3
- package/lib/src/Gateways/PorticoConnector.js +117 -4
- package/lib/src/Gateways/PorticoConnector.js.map +1 -1
- package/lib/src/Mapping/GpApiMapping.d.ts +2 -1
- package/lib/src/Mapping/GpApiMapping.js +75 -2
- package/lib/src/Mapping/GpApiMapping.js.map +1 -1
- package/lib/src/Services/ReportingService.d.ts +6 -1
- package/lib/src/Services/ReportingService.js +15 -0
- package/lib/src/Services/ReportingService.js.map +1 -1
- package/lib/test/Integration/Gateways/GpApiConnector/{3DS2Test.js → 3DS2.test.js} +338 -341
- package/lib/test/Integration/Gateways/GpApiConnector/3DS2.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{3DSecureTest.js → 3DSecure.test.js} +167 -173
- package/lib/test/Integration/Gateways/GpApiConnector/3DSecure.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/AccessToken.test.js +130 -0
- package/lib/test/Integration/Gateways/GpApiConnector/AccessToken.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresent.test.js +1070 -0
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresent.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{DebitCardTest.js → DebitCard.test.js} +27 -33
- package/lib/test/Integration/Gateways/GpApiConnector/DebitCard.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{GpApiCertificationTest.js → GpApiCertification.test.js} +211 -208
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertification.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagement.test.js +151 -0
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagement.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{ReportingDepositsTest.js → ReportingDeposits.test.js} +103 -103
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingDeposits.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingDisputes.test.js +571 -0
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingDisputes.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{ReportingSettlementTransactionsTest.js → ReportingSettlementTransactions.test.js} +104 -108
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactions.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{ReportingStoredPaymentMethodsTest.js → ReportingStoredPaymentMethods.test.js} +75 -76
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethods.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{ReportingTransactionsTest.js → ReportingTransactions.test.js} +97 -95
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactions.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AuthTest.js → Auth.test.js} +441 -461
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Auth.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AvsTest.js → Avs.test.js} +274 -218
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Avs.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{CreditTest.js → Credit.test.js} +317 -321
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Credit.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{HoldTest.js → Hold.test.js} +290 -257
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Hold.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/{CreditTest.js → Credit.test.js} +76 -84
- package/lib/test/Integration/Gateways/GpEcomConnector/Credit.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Hpp.test.js +137 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Hpp.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Recurring.test.js +124 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Recurring.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Ach.test.js +54 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Ach.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Check.test.js +357 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Check.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceTest.js → Ecommerce.test.js} +403 -459
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Ecommerce.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceCheckTest.js → EcommerceCheck.test.js} +17 -23
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheck.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoTest.js → Moto.test.js} +377 -650
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Moto.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoCheckTest.js → MotoCheck.test.js} +16 -22
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheck.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Recurring.test.js +393 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Recurring.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{RetailTest.js → Retail.test.js} +481 -600
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Retail.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Credit.test.js +433 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Credit.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/{DebitTest.js → Debit.test.js} +32 -37
- package/lib/test/Integration/Gateways/PorticoConnector/Debit.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/{EbtTest.js → Ebt.test.js} +30 -39
- package/lib/test/Integration/Gateways/PorticoConnector/Ebt.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/{EcommerceTest.js → Ecommerce.test.js} +38 -45
- package/lib/test/Integration/Gateways/PorticoConnector/Ecommerce.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Gift.test.js +121 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Gift.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/{PorticoManagementTokenTest.js → PorticoManagementToken.test.js} +8 -16
- package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementToken.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Recurring.test.js +87 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Recurring.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/{ReportingTest.js → Reporting.test.js} +12 -18
- package/lib/test/Integration/Gateways/PorticoConnector/Reporting.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{GetInformationCertificationTest.js → GetInformationCertification.test.js} +12 -18
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertification.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayAccountCertificationTest.js → ProPayAccountCertification.test.js} +49 -64
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertification.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayFundCertificationTest.js → ProPayFundCertification.test.js} +14 -22
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertification.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayInNetworkTransactionCertificationTest.js → ProPayInNetworkTransactionCertification.test.js} +18 -26
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertification.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/{GetInformationTest.js → GetInformation.test.js} +11 -18
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformation.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/{ProPayAccountTest.js → ProPayAccount.test.js} +63 -83
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccount.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/{ProPayFundsTest.js → ProPayFunds.test.js} +15 -22
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFunds.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/{ProPayInNetworkTransactionTest.js → ProPayInNetworkTransaction.test.js} +17 -25
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransaction.test.js.map +1 -0
- package/lib/test/Integration/Gateways/Terminals/UPA/UpaMic.test.js +165 -0
- package/lib/test/Integration/Gateways/Terminals/UPA/UpaMic.test.js.map +1 -0
- package/lib/test/Integration/Services/{CheckServiceTest.js → CheckService.test.js} +11 -18
- package/lib/test/Integration/Services/CheckService.test.js.map +1 -0
- package/lib/test/Integration/Services/{CreditServiceTest.js → CreditService.test.js} +48 -64
- package/lib/test/Integration/Services/CreditService.test.js.map +1 -0
- package/lib/test/Integration/Services/{DebitServiceTest.js → DebitService.test.js} +28 -32
- package/lib/test/Integration/Services/DebitService.test.js.map +1 -0
- package/lib/test/Integration/Services/{EBTServiceTest.js → EBTService.test.js} +16 -26
- package/lib/test/Integration/Services/EBTService.test.js.map +1 -0
- package/lib/test/Unit/Builders/AuthorizationBuilder/Validation.test.js +122 -0
- package/lib/test/Unit/Builders/AuthorizationBuilder/Validation.test.js.map +1 -0
- package/lib/test/Unit/Builders/ReportBuilder/Validation.test.js +66 -0
- package/lib/test/Unit/Builders/ReportBuilder/Validation.test.js.map +1 -0
- package/lib/test/Unit/Gateways/GpEcomConnector/{CreditTest.js → Credit.test.js} +13 -15
- package/lib/test/Unit/Gateways/GpEcomConnector/Credit.test.js.map +1 -0
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidation.test.js +128 -0
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidation.test.js.map +1 -0
- package/package.json +7 -17
- package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js +0 -109
- package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js +0 -1025
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js +0 -439
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagementTest.js +0 -149
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagementTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingDepositsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js +0 -99
- package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js +0 -133
- package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +0 -59
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +0 -378
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +0 -420
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +0 -392
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +0 -147
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementTokenTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +0 -101
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js.map +0 -1
- package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js +0 -149
- package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js.map +0 -1
- package/lib/test/Integration/Services/CheckServiceTest.js.map +0 -1
- package/lib/test/Integration/Services/CreditServiceTest.js.map +0 -1
- package/lib/test/Integration/Services/DebitServiceTest.js.map +0 -1
- package/lib/test/Integration/Services/EBTServiceTest.js.map +0 -1
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +0 -111
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +0 -1
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +0 -62
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +0 -1
- package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +0 -1
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +0 -125
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +0 -1
- /package/lib/test/Integration/Gateways/GpApiConnector/{3DS2Test.d.ts → 3DS2.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{3DSecureTest.d.ts → 3DSecure.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{AccessTokenTest.d.ts → AccessToken.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{CreditCardNotPresentTest.d.ts → CreditCardNotPresent.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{CreditCardPresentTest.d.ts → DebitCard.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{DebitCardTest.d.ts → GpApiCertification.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{GpApiCertificationTest.d.ts → GpApiTokenManagement.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{GpApiTokenManagementTest.d.ts → ReportingDeposits.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingDepositsTest.d.ts → ReportingDisputes.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingSettlementTransactionsTest.d.ts → ReportingSettlementTransactions.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingStoredPaymentMethodsTest.d.ts → ReportingStoredPaymentMethods.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingTransactionsTest.d.ts → ReportingTransactions.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AuthTest.d.ts → Auth.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AvsTest.d.ts → Avs.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{HoldTest.d.ts → Hold.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/{HppTest.d.ts → Hpp.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/{RecurringTest.d.ts → Recurring.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{AchTest.d.ts → Ach.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{CheckTest.d.ts → Check.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceCheckTest.d.ts → Ecommerce.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceTest.d.ts → EcommerceCheck.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoCheckTest.d.ts → Moto.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoTest.d.ts → MotoCheck.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{RecurringTest.d.ts → Recurring.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{RetailTest.d.ts → Retail.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{DebitTest.d.ts → Debit.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{EbtTest.d.ts → Ebt.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{EcommerceTest.d.ts → Ecommerce.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{GiftTest.d.ts → Gift.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{PorticoManagementTokenTest.d.ts → PorticoManagementToken.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{RecurringTest.d.ts → Recurring.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{ReportingTest.d.ts → Reporting.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{GetInformationCertificationTest.d.ts → GetInformationCertification.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayAccountCertificationTest.d.ts → ProPayAccountCertification.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayFundCertificationTest.d.ts → ProPayFundCertification.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayInNetworkTransactionCertificationTest.d.ts → ProPayInNetworkTransactionCertification.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/{GetInformationTest.d.ts → GetInformation.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/{ProPayAccountTest.d.ts → ProPayAccount.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/{ProPayFundsTest.d.ts → ProPayFunds.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/{ProPayInNetworkTransactionTest.d.ts → ProPayInNetworkTransaction.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/Terminals/UPA/{UpaMicTest.d.ts → UpaMic.test.d.ts} +0 -0
- /package/lib/test/Integration/Services/{CheckServiceTest.d.ts → CheckService.test.d.ts} +0 -0
- /package/lib/test/Integration/Services/{CreditServiceTest.d.ts → CreditService.test.d.ts} +0 -0
- /package/lib/test/Integration/Services/{DebitServiceTest.d.ts → DebitService.test.d.ts} +0 -0
- /package/lib/test/Integration/Services/{EBTServiceTest.d.ts → EBTService.test.d.ts} +0 -0
- /package/lib/test/Unit/Builders/AuthorizationBuilder/{ValidationTest.d.ts → Validation.test.d.ts} +0 -0
- /package/lib/test/Unit/Builders/ReportBuilder/{ValidationTest.d.ts → Validation.test.d.ts} +0 -0
- /package/lib/test/Unit/Gateways/GpEcomConnector/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
- /package/lib/test/Unit/Gateways/PorticoConnector/{InputValidationTest.d.ts → InputValidation.test.d.ts} +0 -0
|
@@ -1,37 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const Data_1 = require("../../../../Data/");
|
|
3
|
+
const src_1 = require("../../../../../src");
|
|
4
|
+
const Data_1 = require("../../../../Data");
|
|
9
5
|
const config = new src_1.PorticoConfig();
|
|
10
6
|
config.secretApiKey = "skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A";
|
|
11
7
|
const BATCH_NOT_OPEN = "Transaction was rejected because it requires a batch to be open.";
|
|
12
8
|
const BATCH_EMPTY = "Batch close was rejected because no transactions are associated with the currently open batch";
|
|
13
9
|
const useTokens = false;
|
|
14
10
|
const usePrepaid = false;
|
|
15
|
-
const test = useTokens ? ava_1.default.serial : ava_1.default;
|
|
16
11
|
let visaToken = "";
|
|
17
12
|
let mastercardToken = "";
|
|
18
13
|
let discoverToken = "";
|
|
19
14
|
let amexToken = "";
|
|
20
|
-
|
|
15
|
+
beforeAll(() => {
|
|
21
16
|
src_1.ServicesContainer.configureService(config);
|
|
22
17
|
});
|
|
23
|
-
|
|
24
|
-
t.plan(1);
|
|
18
|
+
beforeAll(() => {
|
|
25
19
|
return new Promise((resolve, reject) => {
|
|
26
20
|
src_1.BatchService.closeBatch()
|
|
27
21
|
.then((response) => {
|
|
28
|
-
|
|
22
|
+
expect(response).toBeTruthy();
|
|
29
23
|
resolve();
|
|
30
24
|
})
|
|
31
25
|
.catch((e) => {
|
|
32
26
|
if (e.message.indexOf(BATCH_NOT_OPEN) !== -1 ||
|
|
33
27
|
e.message.indexOf(BATCH_EMPTY) !== -1) {
|
|
34
|
-
t.pass();
|
|
35
28
|
resolve();
|
|
36
29
|
return;
|
|
37
30
|
}
|
|
@@ -41,8 +34,7 @@ test.before("000 - close batch", (t) => {
|
|
|
41
34
|
});
|
|
42
35
|
/// CARD VERIFY
|
|
43
36
|
/// Account verification
|
|
44
|
-
test("001 - verify visa", (
|
|
45
|
-
t.plan(2);
|
|
37
|
+
test("001 - verify visa", () => {
|
|
46
38
|
const card = Data_1.TestCards.visaManual();
|
|
47
39
|
return new Promise((resolve, reject) => {
|
|
48
40
|
card
|
|
@@ -51,15 +43,14 @@ test("001 - verify visa", (t) => {
|
|
|
51
43
|
.withAllowDuplicates(true)
|
|
52
44
|
.execute()
|
|
53
45
|
.then((response) => {
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
expect(response).toBeTruthy();
|
|
47
|
+
expect(response.responseCode).toBe("00");
|
|
56
48
|
resolve();
|
|
57
49
|
})
|
|
58
50
|
.catch(reject);
|
|
59
51
|
});
|
|
60
52
|
});
|
|
61
|
-
test("002 - verify mastercard", (
|
|
62
|
-
t.plan(2);
|
|
53
|
+
test("002 - verify mastercard", () => {
|
|
63
54
|
const card = Data_1.TestCards.masterCardManual();
|
|
64
55
|
return new Promise((resolve, reject) => {
|
|
65
56
|
card
|
|
@@ -68,15 +59,14 @@ test("002 - verify mastercard", (t) => {
|
|
|
68
59
|
.withAllowDuplicates(true)
|
|
69
60
|
.execute()
|
|
70
61
|
.then((response) => {
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
expect(response).toBeTruthy();
|
|
63
|
+
expect(response.responseCode).toBe("00");
|
|
73
64
|
resolve();
|
|
74
65
|
})
|
|
75
66
|
.catch(reject);
|
|
76
67
|
});
|
|
77
68
|
});
|
|
78
|
-
test("003 - verify discover", (
|
|
79
|
-
t.plan(2);
|
|
69
|
+
test("003 - verify discover", () => {
|
|
80
70
|
const card = Data_1.TestCards.discoverManual();
|
|
81
71
|
const address = new src_1.Address();
|
|
82
72
|
address.postalCode = "75024";
|
|
@@ -88,16 +78,15 @@ test("003 - verify discover", (t) => {
|
|
|
88
78
|
.withAllowDuplicates(true)
|
|
89
79
|
.execute()
|
|
90
80
|
.then((response) => {
|
|
91
|
-
|
|
92
|
-
|
|
81
|
+
expect(response).toBeTruthy();
|
|
82
|
+
expect(response.responseCode).toBe("00");
|
|
93
83
|
resolve();
|
|
94
84
|
})
|
|
95
85
|
.catch(reject);
|
|
96
86
|
});
|
|
97
87
|
});
|
|
98
88
|
/// Address verification
|
|
99
|
-
test("004 - verify amex", (
|
|
100
|
-
t.plan(2);
|
|
89
|
+
test("004 - verify amex", () => {
|
|
101
90
|
const card = Data_1.TestCards.amexManual();
|
|
102
91
|
const address = new src_1.Address();
|
|
103
92
|
address.postalCode = "75024";
|
|
@@ -109,32 +98,30 @@ test("004 - verify amex", (t) => {
|
|
|
109
98
|
.withAllowDuplicates(true)
|
|
110
99
|
.execute()
|
|
111
100
|
.then((response) => {
|
|
112
|
-
|
|
113
|
-
|
|
101
|
+
expect(response).toBeTruthy();
|
|
102
|
+
expect(response.responseCode).toBe("00");
|
|
114
103
|
resolve();
|
|
115
104
|
})
|
|
116
105
|
.catch(reject);
|
|
117
106
|
});
|
|
118
107
|
});
|
|
119
108
|
/// Balance Inquiry (for prepaid cards)
|
|
120
|
-
test("005 - balance inquiry visa", (
|
|
121
|
-
t.plan(2);
|
|
109
|
+
test("005 - balance inquiry visa", () => {
|
|
122
110
|
const card = Data_1.TestCards.visaSwipe();
|
|
123
111
|
return new Promise((resolve, reject) => {
|
|
124
112
|
card
|
|
125
113
|
.balanceInquiry()
|
|
126
114
|
.execute()
|
|
127
115
|
.then((response) => {
|
|
128
|
-
|
|
129
|
-
|
|
116
|
+
expect(response).toBeTruthy();
|
|
117
|
+
expect(response.responseCode).toBe("00");
|
|
130
118
|
resolve();
|
|
131
119
|
})
|
|
132
120
|
.catch(reject);
|
|
133
121
|
});
|
|
134
122
|
});
|
|
135
123
|
/// CREDIT SALE (for multi-use tokens only)
|
|
136
|
-
test("006 - charge visa token", (
|
|
137
|
-
t.plan(3);
|
|
124
|
+
test("006 - charge visa token", () => {
|
|
138
125
|
const card = Data_1.TestCards.visaManual();
|
|
139
126
|
const address = new src_1.Address();
|
|
140
127
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -149,17 +136,16 @@ test("006 - charge visa token", (t) => {
|
|
|
149
136
|
.withAllowDuplicates(true)
|
|
150
137
|
.execute()
|
|
151
138
|
.then((response) => {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
139
|
+
expect(response).toBeTruthy();
|
|
140
|
+
expect(response.responseCode).toBe("00");
|
|
141
|
+
expect(response.token).toBeTruthy();
|
|
155
142
|
visaToken = response.token;
|
|
156
143
|
resolve();
|
|
157
144
|
})
|
|
158
145
|
.catch(reject);
|
|
159
146
|
});
|
|
160
147
|
});
|
|
161
|
-
test("007 - charge mastercard token", (
|
|
162
|
-
t.plan(3);
|
|
148
|
+
test("007 - charge mastercard token", () => {
|
|
163
149
|
const card = Data_1.TestCards.masterCardManual();
|
|
164
150
|
const address = new src_1.Address();
|
|
165
151
|
address.streetAddress1 = "6860";
|
|
@@ -174,17 +160,16 @@ test("007 - charge mastercard token", (t) => {
|
|
|
174
160
|
.withAllowDuplicates(true)
|
|
175
161
|
.execute()
|
|
176
162
|
.then((response) => {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
163
|
+
expect(response).toBeTruthy();
|
|
164
|
+
expect(response.responseCode).toBe("00");
|
|
165
|
+
expect(response.token).toBeTruthy();
|
|
180
166
|
mastercardToken = response.token;
|
|
181
167
|
resolve();
|
|
182
168
|
})
|
|
183
169
|
.catch(reject);
|
|
184
170
|
});
|
|
185
171
|
});
|
|
186
|
-
test("008 - charge discover token", (
|
|
187
|
-
t.plan(3);
|
|
172
|
+
test("008 - charge discover token", () => {
|
|
188
173
|
const card = Data_1.TestCards.discoverManual();
|
|
189
174
|
const address = new src_1.Address();
|
|
190
175
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -199,17 +184,16 @@ test("008 - charge discover token", (t) => {
|
|
|
199
184
|
.withAllowDuplicates(true)
|
|
200
185
|
.execute()
|
|
201
186
|
.then((response) => {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
187
|
+
expect(response).toBeTruthy();
|
|
188
|
+
expect(response.responseCode).toBe("00");
|
|
189
|
+
expect(response.token).toBeTruthy();
|
|
205
190
|
discoverToken = response.token;
|
|
206
191
|
resolve();
|
|
207
192
|
})
|
|
208
193
|
.catch(reject);
|
|
209
194
|
});
|
|
210
195
|
});
|
|
211
|
-
test("009 - charge amex token", (
|
|
212
|
-
t.plan(3);
|
|
196
|
+
test("009 - charge amex token", () => {
|
|
213
197
|
const card = Data_1.TestCards.amexManual();
|
|
214
198
|
const address = new src_1.Address();
|
|
215
199
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -224,9 +208,9 @@ test("009 - charge amex token", (t) => {
|
|
|
224
208
|
.withAllowDuplicates(true)
|
|
225
209
|
.execute()
|
|
226
210
|
.then((response) => {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
211
|
+
expect(response).toBeTruthy();
|
|
212
|
+
expect(response.responseCode).toBe("00");
|
|
213
|
+
expect(response.token).toBeTruthy();
|
|
230
214
|
amexToken = response.token;
|
|
231
215
|
resolve();
|
|
232
216
|
})
|
|
@@ -234,8 +218,7 @@ test("009 - charge amex token", (t) => {
|
|
|
234
218
|
});
|
|
235
219
|
});
|
|
236
220
|
/// CREDIT SALE
|
|
237
|
-
test("010 - charge visa", (
|
|
238
|
-
t.plan(4);
|
|
221
|
+
test("010 - charge visa", async () => {
|
|
239
222
|
let card = Data_1.TestCards.visaManual();
|
|
240
223
|
const address = new src_1.Address();
|
|
241
224
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -244,36 +227,63 @@ test("010 - charge visa", (t) => {
|
|
|
244
227
|
card = new src_1.CreditCardData();
|
|
245
228
|
card.token = visaToken;
|
|
246
229
|
}
|
|
247
|
-
|
|
248
|
-
card
|
|
230
|
+
try {
|
|
231
|
+
const chargeResponse = await card
|
|
249
232
|
.charge()
|
|
250
233
|
.withCurrency("USD")
|
|
251
234
|
.withAmount("17.01")
|
|
252
235
|
.withAddress(address)
|
|
253
236
|
.withInvoiceNumber("123456")
|
|
254
237
|
.withAllowDuplicates(true)
|
|
255
|
-
.execute()
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
.then((voidResponse) => {
|
|
266
|
-
t.truthy(voidResponse);
|
|
267
|
-
t.is(voidResponse.responseCode, "00");
|
|
268
|
-
resolve();
|
|
269
|
-
})
|
|
270
|
-
.catch(reject);
|
|
271
|
-
})
|
|
272
|
-
.catch(reject);
|
|
273
|
-
});
|
|
238
|
+
.execute();
|
|
239
|
+
expect(chargeResponse).toBeTruthy();
|
|
240
|
+
expect(chargeResponse.responseCode).toBe("00");
|
|
241
|
+
const voidResponse = await chargeResponse.void().execute();
|
|
242
|
+
expect(voidResponse).toBeTruthy();
|
|
243
|
+
expect(voidResponse.responseCode).toBe("00");
|
|
244
|
+
}
|
|
245
|
+
catch (error) {
|
|
246
|
+
console.error("Test failed with error:", error);
|
|
247
|
+
}
|
|
274
248
|
});
|
|
275
|
-
test("
|
|
276
|
-
|
|
249
|
+
// test("010 - charge visa", async () => {
|
|
250
|
+
// let card = TestCards.visaManual();
|
|
251
|
+
// const address = new Address();
|
|
252
|
+
// address.streetAddress1 = "6860 Dallas Pkwy";
|
|
253
|
+
// address.postalCode = "75024";
|
|
254
|
+
// if (useTokens) {
|
|
255
|
+
// card = new CreditCardData();
|
|
256
|
+
// card.token = visaToken;
|
|
257
|
+
// }
|
|
258
|
+
// return new Promise<void>((resolve, reject) => {
|
|
259
|
+
// card
|
|
260
|
+
// .charge()
|
|
261
|
+
// .withCurrency("USD")
|
|
262
|
+
// .withAmount("17.01")
|
|
263
|
+
// .withAddress(address)
|
|
264
|
+
// .withInvoiceNumber("123456")
|
|
265
|
+
// .withAllowDuplicates(true)
|
|
266
|
+
// .execute()
|
|
267
|
+
// .then((response) => {
|
|
268
|
+
// expect(response).toBeTruthy()
|
|
269
|
+
// expect(response.responseCode).toBe("00")
|
|
270
|
+
// return response;
|
|
271
|
+
// })
|
|
272
|
+
// .then((response) => {
|
|
273
|
+
// response
|
|
274
|
+
// .void()
|
|
275
|
+
// .execute()
|
|
276
|
+
// .then((voidResponse) => {
|
|
277
|
+
// expect(voidResponse).toBeTruthy()
|
|
278
|
+
// expect(voidResponse.responseCode).toBe("00")
|
|
279
|
+
// resolve();
|
|
280
|
+
// })
|
|
281
|
+
// .catch(reject);
|
|
282
|
+
// })
|
|
283
|
+
// .catch(reject);
|
|
284
|
+
// });
|
|
285
|
+
// });
|
|
286
|
+
test("011 - charge mastercard", () => {
|
|
277
287
|
let card = Data_1.TestCards.masterCardManual();
|
|
278
288
|
const address = new src_1.Address();
|
|
279
289
|
address.streetAddress1 = "6860";
|
|
@@ -292,15 +302,14 @@ test("011 - charge mastercard", (t) => {
|
|
|
292
302
|
.withAllowDuplicates(true)
|
|
293
303
|
.execute()
|
|
294
304
|
.then((response) => {
|
|
295
|
-
|
|
296
|
-
|
|
305
|
+
expect(response).toBeTruthy();
|
|
306
|
+
expect(response.responseCode).toBe("00");
|
|
297
307
|
resolve();
|
|
298
308
|
})
|
|
299
309
|
.catch(reject);
|
|
300
310
|
});
|
|
301
311
|
});
|
|
302
|
-
test("012 - charge discover", (
|
|
303
|
-
t.plan(2);
|
|
312
|
+
test("012 - charge discover", () => {
|
|
304
313
|
let card = Data_1.TestCards.discoverManual();
|
|
305
314
|
const address = new src_1.Address();
|
|
306
315
|
address.streetAddress1 = "6860";
|
|
@@ -319,15 +328,14 @@ test("012 - charge discover", (t) => {
|
|
|
319
328
|
.withAllowDuplicates(true)
|
|
320
329
|
.execute()
|
|
321
330
|
.then((response) => {
|
|
322
|
-
|
|
323
|
-
|
|
331
|
+
expect(response).toBeTruthy();
|
|
332
|
+
expect(response.responseCode).toBe("00");
|
|
324
333
|
resolve();
|
|
325
334
|
})
|
|
326
335
|
.catch(reject);
|
|
327
336
|
});
|
|
328
337
|
});
|
|
329
|
-
test("013 - charge amex", (
|
|
330
|
-
t.plan(2);
|
|
338
|
+
test("013 - charge amex", () => {
|
|
331
339
|
let card = Data_1.TestCards.amexManual();
|
|
332
340
|
const address = new src_1.Address();
|
|
333
341
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -346,15 +354,14 @@ test("013 - charge amex", (t) => {
|
|
|
346
354
|
.withAllowDuplicates(true)
|
|
347
355
|
.execute()
|
|
348
356
|
.then((response) => {
|
|
349
|
-
|
|
350
|
-
|
|
357
|
+
expect(response).toBeTruthy();
|
|
358
|
+
expect(response.responseCode).toBe("00");
|
|
351
359
|
resolve();
|
|
352
360
|
})
|
|
353
361
|
.catch(reject);
|
|
354
362
|
});
|
|
355
363
|
});
|
|
356
|
-
test("014 - charge jcb", (
|
|
357
|
-
t.plan(2);
|
|
364
|
+
test("014 - charge jcb", () => {
|
|
358
365
|
const card = Data_1.TestCards.jcbManual();
|
|
359
366
|
const address = new src_1.Address();
|
|
360
367
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -369,16 +376,15 @@ test("014 - charge jcb", (t) => {
|
|
|
369
376
|
.withAllowDuplicates(true)
|
|
370
377
|
.execute()
|
|
371
378
|
.then((response) => {
|
|
372
|
-
|
|
373
|
-
|
|
379
|
+
expect(response).toBeTruthy();
|
|
380
|
+
expect(response.responseCode).toBe("00");
|
|
374
381
|
resolve();
|
|
375
382
|
})
|
|
376
383
|
.catch(reject);
|
|
377
384
|
});
|
|
378
385
|
});
|
|
379
386
|
/// AUTHORIZATION
|
|
380
|
-
test("015 - authorization visa", (
|
|
381
|
-
t.plan(4);
|
|
387
|
+
test("015 - authorization visa", () => {
|
|
382
388
|
// test 015a Authorization
|
|
383
389
|
const card = Data_1.TestCards.visaManual();
|
|
384
390
|
const address = new src_1.Address();
|
|
@@ -393,8 +399,8 @@ test("015 - authorization visa", (t) => {
|
|
|
393
399
|
.withAllowDuplicates(true)
|
|
394
400
|
.execute()
|
|
395
401
|
.then((response) => {
|
|
396
|
-
|
|
397
|
-
|
|
402
|
+
expect(response).toBeTruthy();
|
|
403
|
+
expect(response.responseCode).toBe("00");
|
|
398
404
|
return response;
|
|
399
405
|
})
|
|
400
406
|
.then((response) => {
|
|
@@ -403,8 +409,8 @@ test("015 - authorization visa", (t) => {
|
|
|
403
409
|
.capture()
|
|
404
410
|
.execute()
|
|
405
411
|
.then((capture) => {
|
|
406
|
-
|
|
407
|
-
|
|
412
|
+
expect(capture).toBeTruthy();
|
|
413
|
+
expect(capture.responseCode).toBe("00");
|
|
408
414
|
resolve();
|
|
409
415
|
})
|
|
410
416
|
.catch(reject);
|
|
@@ -412,8 +418,7 @@ test("015 - authorization visa", (t) => {
|
|
|
412
418
|
.catch(reject);
|
|
413
419
|
});
|
|
414
420
|
});
|
|
415
|
-
test("016 - authorization mastercard", (
|
|
416
|
-
t.plan(4);
|
|
421
|
+
test("016 - authorization mastercard", () => {
|
|
417
422
|
// test 016a Authorization
|
|
418
423
|
const card = Data_1.TestCards.masterCardManual();
|
|
419
424
|
const address = new src_1.Address();
|
|
@@ -428,8 +433,8 @@ test("016 - authorization mastercard", (t) => {
|
|
|
428
433
|
.withAllowDuplicates(true)
|
|
429
434
|
.execute()
|
|
430
435
|
.then((response) => {
|
|
431
|
-
|
|
432
|
-
|
|
436
|
+
expect(response).toBeTruthy();
|
|
437
|
+
expect(response.responseCode).toBe("00");
|
|
433
438
|
return response;
|
|
434
439
|
})
|
|
435
440
|
.then((response) => {
|
|
@@ -438,8 +443,8 @@ test("016 - authorization mastercard", (t) => {
|
|
|
438
443
|
.capture()
|
|
439
444
|
.execute()
|
|
440
445
|
.then((capture) => {
|
|
441
|
-
|
|
442
|
-
|
|
446
|
+
expect(capture).toBeTruthy();
|
|
447
|
+
expect(capture.responseCode).toBe("00");
|
|
443
448
|
resolve();
|
|
444
449
|
})
|
|
445
450
|
.catch(reject);
|
|
@@ -447,8 +452,7 @@ test("016 - authorization mastercard", (t) => {
|
|
|
447
452
|
.catch(reject);
|
|
448
453
|
});
|
|
449
454
|
});
|
|
450
|
-
test("017 - authorization discover", (
|
|
451
|
-
t.plan(2);
|
|
455
|
+
test("017 - authorization discover", () => {
|
|
452
456
|
// test 017a Authorization
|
|
453
457
|
const card = Data_1.TestCards.discoverManual();
|
|
454
458
|
const address = new src_1.Address();
|
|
@@ -463,8 +467,8 @@ test("017 - authorization discover", (t) => {
|
|
|
463
467
|
.withAllowDuplicates(true)
|
|
464
468
|
.execute()
|
|
465
469
|
.then((response) => {
|
|
466
|
-
|
|
467
|
-
|
|
470
|
+
expect(response).toBeTruthy();
|
|
471
|
+
expect(response.responseCode).toBe("00");
|
|
468
472
|
return response;
|
|
469
473
|
})
|
|
470
474
|
.then(() => {
|
|
@@ -476,8 +480,7 @@ test("017 - authorization discover", (t) => {
|
|
|
476
480
|
});
|
|
477
481
|
});
|
|
478
482
|
/// PARTIALLY APPROVED SALE
|
|
479
|
-
test("018 - partial approval visa", (
|
|
480
|
-
t.plan(4);
|
|
483
|
+
test("018 - partial approval visa", () => {
|
|
481
484
|
const address = new src_1.Address();
|
|
482
485
|
address.streetAddress1 = "6860";
|
|
483
486
|
address.postalCode = "75024";
|
|
@@ -492,17 +495,16 @@ test("018 - partial approval visa", (t) => {
|
|
|
492
495
|
.withAllowDuplicates(true)
|
|
493
496
|
.execute()
|
|
494
497
|
.then((response) => {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
498
|
+
expect(response).toBeTruthy();
|
|
499
|
+
expect(response.responseCode).toBe("10");
|
|
500
|
+
expect(response.authorizedAmount).toBeTruthy();
|
|
501
|
+
expect(response.authorizedAmount).toBe("110.00");
|
|
499
502
|
resolve();
|
|
500
503
|
})
|
|
501
504
|
.catch(reject);
|
|
502
505
|
});
|
|
503
506
|
});
|
|
504
|
-
test("019 - partial approval discover", (
|
|
505
|
-
t.plan(4);
|
|
507
|
+
test("019 - partial approval discover", () => {
|
|
506
508
|
const address = new src_1.Address();
|
|
507
509
|
address.streetAddress1 = "6860";
|
|
508
510
|
address.postalCode = "75024";
|
|
@@ -517,17 +519,16 @@ test("019 - partial approval discover", (t) => {
|
|
|
517
519
|
.withAllowDuplicates(true)
|
|
518
520
|
.execute()
|
|
519
521
|
.then((response) => {
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
522
|
+
expect(response).toBeTruthy();
|
|
523
|
+
expect(response.responseCode).toBe("10");
|
|
524
|
+
expect(response.authorizedAmount).toBeTruthy();
|
|
525
|
+
expect(response.authorizedAmount).toBe("65.00");
|
|
524
526
|
resolve();
|
|
525
527
|
})
|
|
526
528
|
.catch(reject);
|
|
527
529
|
});
|
|
528
530
|
});
|
|
529
|
-
test("020 - partial approval mastercard", (
|
|
530
|
-
t.plan(4);
|
|
531
|
+
test("020 - partial approval mastercard", () => {
|
|
531
532
|
const address = new src_1.Address();
|
|
532
533
|
address.streetAddress1 = "6860";
|
|
533
534
|
address.postalCode = "75024";
|
|
@@ -542,18 +543,17 @@ test("020 - partial approval mastercard", (t) => {
|
|
|
542
543
|
.withAllowDuplicates(true)
|
|
543
544
|
.execute()
|
|
544
545
|
.then((response) => {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
546
|
+
expect(response).toBeTruthy();
|
|
547
|
+
expect(response.responseCode).toBe("10");
|
|
548
|
+
expect(response.authorizedAmount).toBeTruthy();
|
|
549
|
+
expect(response.authorizedAmount).toBe("100.00");
|
|
549
550
|
resolve();
|
|
550
551
|
})
|
|
551
552
|
.catch(reject);
|
|
552
553
|
});
|
|
553
554
|
});
|
|
554
555
|
/// LEVEL II CORPORATE PURCHASE CARD
|
|
555
|
-
test("021 - level ii response b", (
|
|
556
|
-
t.plan(5);
|
|
556
|
+
test("021 - level ii response b", () => {
|
|
557
557
|
const address = new src_1.Address();
|
|
558
558
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
559
559
|
address.postalCode = "750241234";
|
|
@@ -567,9 +567,9 @@ test("021 - level ii response b", (t) => {
|
|
|
567
567
|
.withAllowDuplicates(true)
|
|
568
568
|
.execute()
|
|
569
569
|
.then((response) => {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
570
|
+
expect(response).toBeTruthy();
|
|
571
|
+
expect(response.responseCode).toBe("00");
|
|
572
|
+
expect(response.commercialIndicator).toBe("B");
|
|
573
573
|
return response;
|
|
574
574
|
})
|
|
575
575
|
.then((response) => {
|
|
@@ -579,8 +579,8 @@ test("021 - level ii response b", (t) => {
|
|
|
579
579
|
.withTaxType(src_1.TaxType.NotUsed)
|
|
580
580
|
.execute()
|
|
581
581
|
.then((cpcResponse) => {
|
|
582
|
-
|
|
583
|
-
|
|
582
|
+
expect(cpcResponse).toBeTruthy();
|
|
583
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
584
584
|
resolve();
|
|
585
585
|
})
|
|
586
586
|
.catch(reject);
|
|
@@ -588,8 +588,7 @@ test("021 - level ii response b", (t) => {
|
|
|
588
588
|
.catch(reject);
|
|
589
589
|
});
|
|
590
590
|
});
|
|
591
|
-
test("022 - level ii response b", (
|
|
592
|
-
t.plan(5);
|
|
591
|
+
test("022 - level ii response b", () => {
|
|
593
592
|
const address = new src_1.Address();
|
|
594
593
|
address.streetAddress1 = "6860";
|
|
595
594
|
address.postalCode = "750241234";
|
|
@@ -603,9 +602,9 @@ test("022 - level ii response b", (t) => {
|
|
|
603
602
|
.withAllowDuplicates(true)
|
|
604
603
|
.execute()
|
|
605
604
|
.then((response) => {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
605
|
+
expect(response).toBeTruthy();
|
|
606
|
+
expect(response.responseCode).toBe("00");
|
|
607
|
+
expect(response.commercialIndicator).toBe("B");
|
|
609
608
|
return response;
|
|
610
609
|
})
|
|
611
610
|
.then((response) => {
|
|
@@ -615,8 +614,8 @@ test("022 - level ii response b", (t) => {
|
|
|
615
614
|
.withTaxAmount(1.0)
|
|
616
615
|
.execute()
|
|
617
616
|
.then((cpcResponse) => {
|
|
618
|
-
|
|
619
|
-
|
|
617
|
+
expect(cpcResponse).toBeTruthy();
|
|
618
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
620
619
|
resolve();
|
|
621
620
|
})
|
|
622
621
|
.catch(reject);
|
|
@@ -624,8 +623,7 @@ test("022 - level ii response b", (t) => {
|
|
|
624
623
|
.catch(reject);
|
|
625
624
|
});
|
|
626
625
|
});
|
|
627
|
-
test("023 - level ii response r", (
|
|
628
|
-
t.plan(5);
|
|
626
|
+
test("023 - level ii response r", () => {
|
|
629
627
|
const address = new src_1.Address();
|
|
630
628
|
address.streetAddress1 = "6860";
|
|
631
629
|
address.postalCode = "75024";
|
|
@@ -639,9 +637,9 @@ test("023 - level ii response r", (t) => {
|
|
|
639
637
|
.withAllowDuplicates(true)
|
|
640
638
|
.execute()
|
|
641
639
|
.then((response) => {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
640
|
+
expect(response).toBeTruthy();
|
|
641
|
+
expect(response.responseCode).toBe("00");
|
|
642
|
+
expect(response.commercialIndicator).toBe("R");
|
|
645
643
|
return response;
|
|
646
644
|
})
|
|
647
645
|
.then((response) => {
|
|
@@ -650,8 +648,8 @@ test("023 - level ii response r", (t) => {
|
|
|
650
648
|
.withTaxType(src_1.TaxType.TaxExempt)
|
|
651
649
|
.execute()
|
|
652
650
|
.then((cpcResponse) => {
|
|
653
|
-
|
|
654
|
-
|
|
651
|
+
expect(cpcResponse).toBeTruthy();
|
|
652
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
655
653
|
resolve();
|
|
656
654
|
})
|
|
657
655
|
.catch(reject);
|
|
@@ -659,8 +657,7 @@ test("023 - level ii response r", (t) => {
|
|
|
659
657
|
.catch(reject);
|
|
660
658
|
});
|
|
661
659
|
});
|
|
662
|
-
test("024 - level ii response s", (
|
|
663
|
-
t.plan(5);
|
|
660
|
+
test("024 - level ii response s", () => {
|
|
664
661
|
const address = new src_1.Address();
|
|
665
662
|
address.streetAddress1 = "6860";
|
|
666
663
|
address.postalCode = "75024";
|
|
@@ -674,9 +671,9 @@ test("024 - level ii response s", (t) => {
|
|
|
674
671
|
.withAllowDuplicates(true)
|
|
675
672
|
.execute()
|
|
676
673
|
.then((response) => {
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
674
|
+
expect(response).toBeTruthy();
|
|
675
|
+
expect(response.responseCode).toBe("00");
|
|
676
|
+
expect(response.commercialIndicator).toBe("S");
|
|
680
677
|
return response;
|
|
681
678
|
})
|
|
682
679
|
.then((response) => {
|
|
@@ -687,8 +684,8 @@ test("024 - level ii response s", (t) => {
|
|
|
687
684
|
.withTaxAmount(1.0)
|
|
688
685
|
.execute()
|
|
689
686
|
.then((cpcResponse) => {
|
|
690
|
-
|
|
691
|
-
|
|
687
|
+
expect(cpcResponse).toBeTruthy();
|
|
688
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
692
689
|
resolve();
|
|
693
690
|
})
|
|
694
691
|
.catch(reject);
|
|
@@ -696,8 +693,7 @@ test("024 - level ii response s", (t) => {
|
|
|
696
693
|
.catch(reject);
|
|
697
694
|
});
|
|
698
695
|
});
|
|
699
|
-
test("025 - level ii response s", (
|
|
700
|
-
t.plan(5);
|
|
696
|
+
test("025 - level ii response s", () => {
|
|
701
697
|
const address = new src_1.Address();
|
|
702
698
|
address.streetAddress1 = "6860";
|
|
703
699
|
address.postalCode = "75024";
|
|
@@ -711,9 +707,9 @@ test("025 - level ii response s", (t) => {
|
|
|
711
707
|
.withAllowDuplicates(true)
|
|
712
708
|
.execute()
|
|
713
709
|
.then((response) => {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
710
|
+
expect(response).toBeTruthy();
|
|
711
|
+
expect(response.responseCode).toBe("00");
|
|
712
|
+
expect(response.commercialIndicator).toBe("S");
|
|
717
713
|
return response;
|
|
718
714
|
})
|
|
719
715
|
.then((response) => {
|
|
@@ -723,8 +719,8 @@ test("025 - level ii response s", (t) => {
|
|
|
723
719
|
.withTaxType(src_1.TaxType.NotUsed)
|
|
724
720
|
.execute()
|
|
725
721
|
.then((cpcResponse) => {
|
|
726
|
-
|
|
727
|
-
|
|
722
|
+
expect(cpcResponse).toBeTruthy();
|
|
723
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
728
724
|
resolve();
|
|
729
725
|
})
|
|
730
726
|
.catch(reject);
|
|
@@ -732,8 +728,7 @@ test("025 - level ii response s", (t) => {
|
|
|
732
728
|
.catch(reject);
|
|
733
729
|
});
|
|
734
730
|
});
|
|
735
|
-
test("026 - level ii response s", (
|
|
736
|
-
t.plan(5);
|
|
731
|
+
test("026 - level ii response s", () => {
|
|
737
732
|
const address = new src_1.Address();
|
|
738
733
|
address.streetAddress1 = "6860";
|
|
739
734
|
address.postalCode = "75024";
|
|
@@ -747,9 +742,9 @@ test("026 - level ii response s", (t) => {
|
|
|
747
742
|
.withAllowDuplicates(true)
|
|
748
743
|
.execute()
|
|
749
744
|
.then((response) => {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
745
|
+
expect(response).toBeTruthy();
|
|
746
|
+
expect(response.responseCode).toBe("00");
|
|
747
|
+
expect(response.commercialIndicator).toBe("S");
|
|
753
748
|
return response;
|
|
754
749
|
})
|
|
755
750
|
.then((response) => {
|
|
@@ -759,8 +754,8 @@ test("026 - level ii response s", (t) => {
|
|
|
759
754
|
.withTaxAmount(1.0)
|
|
760
755
|
.execute()
|
|
761
756
|
.then((cpcResponse) => {
|
|
762
|
-
|
|
763
|
-
|
|
757
|
+
expect(cpcResponse).toBeTruthy();
|
|
758
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
764
759
|
resolve();
|
|
765
760
|
})
|
|
766
761
|
.catch(reject);
|
|
@@ -768,8 +763,7 @@ test("026 - level ii response s", (t) => {
|
|
|
768
763
|
.catch(reject);
|
|
769
764
|
});
|
|
770
765
|
});
|
|
771
|
-
test("027 - level ii response s", (
|
|
772
|
-
t.plan(5);
|
|
766
|
+
test("027 - level ii response s", () => {
|
|
773
767
|
const address = new src_1.Address();
|
|
774
768
|
address.streetAddress1 = "6860";
|
|
775
769
|
address.postalCode = "75024";
|
|
@@ -783,9 +777,9 @@ test("027 - level ii response s", (t) => {
|
|
|
783
777
|
.withAllowDuplicates(true)
|
|
784
778
|
.execute()
|
|
785
779
|
.then((response) => {
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
780
|
+
expect(response).toBeTruthy();
|
|
781
|
+
expect(response.responseCode).toBe("00");
|
|
782
|
+
expect(response.commercialIndicator).toBe("S");
|
|
789
783
|
return response;
|
|
790
784
|
})
|
|
791
785
|
.then((response) => {
|
|
@@ -796,8 +790,8 @@ test("027 - level ii response s", (t) => {
|
|
|
796
790
|
.withTaxAmount(1.0)
|
|
797
791
|
.execute()
|
|
798
792
|
.then((cpcResponse) => {
|
|
799
|
-
|
|
800
|
-
|
|
793
|
+
expect(cpcResponse).toBeTruthy();
|
|
794
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
801
795
|
resolve();
|
|
802
796
|
})
|
|
803
797
|
.catch(reject);
|
|
@@ -805,8 +799,7 @@ test("027 - level ii response s", (t) => {
|
|
|
805
799
|
.catch(reject);
|
|
806
800
|
});
|
|
807
801
|
});
|
|
808
|
-
test("028 - level ii response s", (
|
|
809
|
-
t.plan(5);
|
|
802
|
+
test("028 - level ii response s", () => {
|
|
810
803
|
const address = new src_1.Address();
|
|
811
804
|
address.streetAddress1 = "6860";
|
|
812
805
|
address.postalCode = "75024";
|
|
@@ -820,9 +813,9 @@ test("028 - level ii response s", (t) => {
|
|
|
820
813
|
.withAllowDuplicates(true)
|
|
821
814
|
.execute()
|
|
822
815
|
.then((response) => {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
816
|
+
expect(response).toBeTruthy();
|
|
817
|
+
expect(response.responseCode).toBe("00");
|
|
818
|
+
expect(response.commercialIndicator).toBe("S");
|
|
826
819
|
return response;
|
|
827
820
|
})
|
|
828
821
|
.then((response) => {
|
|
@@ -832,8 +825,8 @@ test("028 - level ii response s", (t) => {
|
|
|
832
825
|
.withTaxType(src_1.TaxType.TaxExempt)
|
|
833
826
|
.execute()
|
|
834
827
|
.then((cpcResponse) => {
|
|
835
|
-
|
|
836
|
-
|
|
828
|
+
expect(cpcResponse).toBeTruthy();
|
|
829
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
837
830
|
resolve();
|
|
838
831
|
})
|
|
839
832
|
.catch(reject);
|
|
@@ -841,8 +834,7 @@ test("028 - level ii response s", (t) => {
|
|
|
841
834
|
.catch(reject);
|
|
842
835
|
});
|
|
843
836
|
});
|
|
844
|
-
test("029 - level ii no response", (
|
|
845
|
-
t.plan(5);
|
|
837
|
+
test("029 - level ii no response", () => {
|
|
846
838
|
const address = new src_1.Address();
|
|
847
839
|
address.streetAddress1 = "6860";
|
|
848
840
|
address.postalCode = "75024";
|
|
@@ -856,9 +848,9 @@ test("029 - level ii no response", (t) => {
|
|
|
856
848
|
.withAllowDuplicates(true)
|
|
857
849
|
.execute()
|
|
858
850
|
.then((response) => {
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
851
|
+
expect(response).toBeTruthy();
|
|
852
|
+
expect(response.responseCode).toBe("00");
|
|
853
|
+
expect(response.commercialIndicator).toBe("0");
|
|
862
854
|
return response;
|
|
863
855
|
})
|
|
864
856
|
.then((response) => {
|
|
@@ -868,8 +860,8 @@ test("029 - level ii no response", (t) => {
|
|
|
868
860
|
.withTaxType(src_1.TaxType.NotUsed)
|
|
869
861
|
.execute()
|
|
870
862
|
.then((cpcResponse) => {
|
|
871
|
-
|
|
872
|
-
|
|
863
|
+
expect(cpcResponse).toBeTruthy();
|
|
864
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
873
865
|
resolve();
|
|
874
866
|
})
|
|
875
867
|
.catch(reject);
|
|
@@ -877,8 +869,7 @@ test("029 - level ii no response", (t) => {
|
|
|
877
869
|
.catch(reject);
|
|
878
870
|
});
|
|
879
871
|
});
|
|
880
|
-
test("030 - level ii no response", (
|
|
881
|
-
t.plan(5);
|
|
872
|
+
test("030 - level ii no response", () => {
|
|
882
873
|
const address = new src_1.Address();
|
|
883
874
|
address.streetAddress1 = "6860";
|
|
884
875
|
address.postalCode = "750241234";
|
|
@@ -892,9 +883,9 @@ test("030 - level ii no response", (t) => {
|
|
|
892
883
|
.withAllowDuplicates(true)
|
|
893
884
|
.execute()
|
|
894
885
|
.then((response) => {
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
886
|
+
expect(response).toBeTruthy();
|
|
887
|
+
expect(response.responseCode).toBe("00");
|
|
888
|
+
expect(response.commercialIndicator).toBe("0");
|
|
898
889
|
return response;
|
|
899
890
|
})
|
|
900
891
|
.then((response) => {
|
|
@@ -904,8 +895,8 @@ test("030 - level ii no response", (t) => {
|
|
|
904
895
|
.withTaxAmount(1.0)
|
|
905
896
|
.execute()
|
|
906
897
|
.then((cpcResponse) => {
|
|
907
|
-
|
|
908
|
-
|
|
898
|
+
expect(cpcResponse).toBeTruthy();
|
|
899
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
909
900
|
resolve();
|
|
910
901
|
})
|
|
911
902
|
.catch(reject);
|
|
@@ -913,8 +904,7 @@ test("030 - level ii no response", (t) => {
|
|
|
913
904
|
.catch(reject);
|
|
914
905
|
});
|
|
915
906
|
});
|
|
916
|
-
test("031 - level ii no response", (
|
|
917
|
-
t.plan(5);
|
|
907
|
+
test("031 - level ii no response", () => {
|
|
918
908
|
const address = new src_1.Address();
|
|
919
909
|
address.streetAddress1 = "6860";
|
|
920
910
|
address.postalCode = "75024";
|
|
@@ -928,9 +918,9 @@ test("031 - level ii no response", (t) => {
|
|
|
928
918
|
.withAllowDuplicates(true)
|
|
929
919
|
.execute()
|
|
930
920
|
.then((response) => {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
921
|
+
expect(response).toBeTruthy();
|
|
922
|
+
expect(response.responseCode).toBe("00");
|
|
923
|
+
expect(response.commercialIndicator).toBe("0");
|
|
934
924
|
return response;
|
|
935
925
|
})
|
|
936
926
|
.then((response) => {
|
|
@@ -941,8 +931,8 @@ test("031 - level ii no response", (t) => {
|
|
|
941
931
|
.withTaxAmount(1.0)
|
|
942
932
|
.execute()
|
|
943
933
|
.then((cpcResponse) => {
|
|
944
|
-
|
|
945
|
-
|
|
934
|
+
expect(cpcResponse).toBeTruthy();
|
|
935
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
946
936
|
resolve();
|
|
947
937
|
})
|
|
948
938
|
.catch(reject);
|
|
@@ -950,8 +940,7 @@ test("031 - level ii no response", (t) => {
|
|
|
950
940
|
.catch(reject);
|
|
951
941
|
});
|
|
952
942
|
});
|
|
953
|
-
test("032 - level ii no response", (
|
|
954
|
-
t.plan(5);
|
|
943
|
+
test("032 - level ii no response", () => {
|
|
955
944
|
const address = new src_1.Address();
|
|
956
945
|
address.streetAddress1 = "6860";
|
|
957
946
|
address.postalCode = "75024";
|
|
@@ -965,9 +954,9 @@ test("032 - level ii no response", (t) => {
|
|
|
965
954
|
.withAllowDuplicates(true)
|
|
966
955
|
.execute()
|
|
967
956
|
.then((response) => {
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
957
|
+
expect(response).toBeTruthy();
|
|
958
|
+
expect(response.responseCode).toBe("00");
|
|
959
|
+
expect(response.commercialIndicator).toBe("0");
|
|
971
960
|
return response;
|
|
972
961
|
})
|
|
973
962
|
.then((response) => {
|
|
@@ -977,8 +966,8 @@ test("032 - level ii no response", (t) => {
|
|
|
977
966
|
.withTaxType(src_1.TaxType.TaxExempt)
|
|
978
967
|
.execute()
|
|
979
968
|
.then((cpcResponse) => {
|
|
980
|
-
|
|
981
|
-
|
|
969
|
+
expect(cpcResponse).toBeTruthy();
|
|
970
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
982
971
|
resolve();
|
|
983
972
|
})
|
|
984
973
|
.catch(reject);
|
|
@@ -987,8 +976,7 @@ test("032 - level ii no response", (t) => {
|
|
|
987
976
|
});
|
|
988
977
|
});
|
|
989
978
|
/// PRIOR / VOICE AUTHORIZATION
|
|
990
|
-
test("033 - offline sale", (
|
|
991
|
-
t.plan(2);
|
|
979
|
+
test("033 - offline sale", () => {
|
|
992
980
|
const card = Data_1.TestCards.visaManual();
|
|
993
981
|
return new Promise((resolve, reject) => {
|
|
994
982
|
card
|
|
@@ -1000,15 +988,14 @@ test("033 - offline sale", (t) => {
|
|
|
1000
988
|
.withAllowDuplicates(true)
|
|
1001
989
|
.execute()
|
|
1002
990
|
.then((response) => {
|
|
1003
|
-
|
|
1004
|
-
|
|
991
|
+
expect(response).toBeTruthy();
|
|
992
|
+
expect(response.responseCode).toBe("00");
|
|
1005
993
|
resolve();
|
|
1006
994
|
})
|
|
1007
995
|
.catch(reject);
|
|
1008
996
|
});
|
|
1009
997
|
});
|
|
1010
|
-
test("033 - offline authorization", (
|
|
1011
|
-
t.plan(2);
|
|
998
|
+
test("033 - offline authorization", () => {
|
|
1012
999
|
const card = Data_1.TestCards.visaManual();
|
|
1013
1000
|
return new Promise((resolve, reject) => {
|
|
1014
1001
|
card
|
|
@@ -1020,16 +1007,15 @@ test("033 - offline authorization", (t) => {
|
|
|
1020
1007
|
.withAllowDuplicates(true)
|
|
1021
1008
|
.execute()
|
|
1022
1009
|
.then((response) => {
|
|
1023
|
-
|
|
1024
|
-
|
|
1010
|
+
expect(response).toBeTruthy();
|
|
1011
|
+
expect(response.responseCode).toBe("00");
|
|
1025
1012
|
resolve();
|
|
1026
1013
|
})
|
|
1027
1014
|
.catch(reject);
|
|
1028
1015
|
});
|
|
1029
1016
|
});
|
|
1030
1017
|
/// RETURN
|
|
1031
|
-
test("034 - offline return", (
|
|
1032
|
-
t.plan(2);
|
|
1018
|
+
test("034 - offline return", () => {
|
|
1033
1019
|
const card = Data_1.TestCards.visaManual();
|
|
1034
1020
|
return new Promise((resolve, reject) => {
|
|
1035
1021
|
card
|
|
@@ -1039,19 +1025,15 @@ test("034 - offline return", (t) => {
|
|
|
1039
1025
|
.withAllowDuplicates(true)
|
|
1040
1026
|
.execute()
|
|
1041
1027
|
.then((response) => {
|
|
1042
|
-
|
|
1043
|
-
|
|
1028
|
+
expect(response).toBeTruthy();
|
|
1029
|
+
expect(response.responseCode).toBe("00");
|
|
1044
1030
|
resolve();
|
|
1045
1031
|
})
|
|
1046
1032
|
.catch(reject);
|
|
1047
1033
|
});
|
|
1048
1034
|
});
|
|
1049
|
-
/// ONLINE VOID / REVERSAL
|
|
1050
|
-
test("035 - void test 10", () => true);
|
|
1051
|
-
test("036 - void test 20", () => true);
|
|
1052
1035
|
/// ADVANCED FRAUD SCREENING
|
|
1053
|
-
test.failing("037 - fraud prevention sale", (
|
|
1054
|
-
t.plan(2);
|
|
1036
|
+
test.failing("037 - fraud prevention sale", () => {
|
|
1055
1037
|
const card = Data_1.TestCards.visaManual();
|
|
1056
1038
|
return new Promise((resolve, reject) => {
|
|
1057
1039
|
card
|
|
@@ -1060,15 +1042,14 @@ test.failing("037 - fraud prevention sale", (t) => {
|
|
|
1060
1042
|
.withAllowDuplicates(true)
|
|
1061
1043
|
.execute()
|
|
1062
1044
|
.then((response) => {
|
|
1063
|
-
|
|
1064
|
-
|
|
1045
|
+
expect(response).toBeTruthy();
|
|
1046
|
+
expect(response.responseCode).toBe("FR");
|
|
1065
1047
|
resolve();
|
|
1066
1048
|
})
|
|
1067
1049
|
.catch(reject);
|
|
1068
1050
|
});
|
|
1069
1051
|
});
|
|
1070
|
-
test.failing("038 - fraud prevention return", (
|
|
1071
|
-
t.plan(2);
|
|
1052
|
+
test.failing("038 - fraud prevention return", () => {
|
|
1072
1053
|
const card = Data_1.TestCards.visaManual();
|
|
1073
1054
|
return new Promise((resolve, reject) => {
|
|
1074
1055
|
card
|
|
@@ -1077,8 +1058,8 @@ test.failing("038 - fraud prevention return", (t) => {
|
|
|
1077
1058
|
.withAllowDuplicates(true)
|
|
1078
1059
|
.execute()
|
|
1079
1060
|
.then((response) => {
|
|
1080
|
-
|
|
1081
|
-
|
|
1061
|
+
expect(response).toBeTruthy();
|
|
1062
|
+
expect(response.responseCode).toBe("41");
|
|
1082
1063
|
resolve();
|
|
1083
1064
|
})
|
|
1084
1065
|
.catch(reject);
|
|
@@ -1086,110 +1067,110 @@ test.failing("038 - fraud prevention return", (t) => {
|
|
|
1086
1067
|
});
|
|
1087
1068
|
/// ONE CARD - GSB CARD FUNCTIONS
|
|
1088
1069
|
/// BALANCE INQUIRY
|
|
1089
|
-
(
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1070
|
+
describe("conditionally balance inquiry", () => {
|
|
1071
|
+
(usePrepaid ? test : test.skip)("037 - balance inquiry gsb", () => {
|
|
1072
|
+
const address = new src_1.Address();
|
|
1073
|
+
address.streetAddress1 = "6860";
|
|
1074
|
+
address.postalCode = "75024";
|
|
1075
|
+
const card = Data_1.TestCards.gsbManual();
|
|
1076
|
+
return new Promise((resolve, reject) => {
|
|
1077
|
+
card
|
|
1078
|
+
.balanceInquiry()
|
|
1079
|
+
.withAddress(address)
|
|
1080
|
+
.execute()
|
|
1081
|
+
.then((response) => {
|
|
1082
|
+
expect(response).toBeTruthy();
|
|
1083
|
+
expect(response.responseCode).toBe("00");
|
|
1084
|
+
resolve();
|
|
1085
|
+
})
|
|
1086
|
+
.catch(reject);
|
|
1087
|
+
});
|
|
1106
1088
|
});
|
|
1107
1089
|
});
|
|
1108
1090
|
/// ADD VALUE
|
|
1109
|
-
(
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1091
|
+
describe("conditional balancy inquiry", () => {
|
|
1092
|
+
(usePrepaid ? test : test.skip)("038 - add value gsb", () => {
|
|
1093
|
+
const address = new src_1.Address();
|
|
1094
|
+
address.streetAddress1 = "6860";
|
|
1095
|
+
address.postalCode = "75024";
|
|
1096
|
+
const card = new src_1.CreditTrackData();
|
|
1097
|
+
card.value =
|
|
1098
|
+
"%B6277220572999800^/^49121010557010000016000000?F;6277220572999800=49121010557010000016?";
|
|
1099
|
+
return new Promise((resolve, reject) => {
|
|
1100
|
+
card
|
|
1101
|
+
.addValue(15.0)
|
|
1102
|
+
.withCurrency("USD")
|
|
1103
|
+
.withAllowDuplicates(true)
|
|
1104
|
+
.execute()
|
|
1105
|
+
.then((response) => {
|
|
1106
|
+
expect(response).toBeTruthy();
|
|
1107
|
+
expect(response.responseCode).toBe("00");
|
|
1108
|
+
resolve();
|
|
1109
|
+
})
|
|
1110
|
+
.catch(reject);
|
|
1111
|
+
});
|
|
1129
1112
|
});
|
|
1130
1113
|
});
|
|
1131
1114
|
/// SALE
|
|
1132
|
-
(
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
.execute()
|
|
1146
|
-
.then((response) => {
|
|
1147
|
-
t.truthy(response);
|
|
1148
|
-
t.is(response.responseCode, "00");
|
|
1149
|
-
return response;
|
|
1150
|
-
})
|
|
1151
|
-
.then((response) => {
|
|
1152
|
-
response
|
|
1153
|
-
.void()
|
|
1115
|
+
describe("conditional - charge gsb", () => {
|
|
1116
|
+
(usePrepaid ? test : test.skip)("039 - charge gsb", () => {
|
|
1117
|
+
const address = new src_1.Address();
|
|
1118
|
+
address.streetAddress1 = "6860";
|
|
1119
|
+
address.postalCode = "75024";
|
|
1120
|
+
const card = Data_1.TestCards.gsbManual();
|
|
1121
|
+
return new Promise((resolve, reject) => {
|
|
1122
|
+
card
|
|
1123
|
+
.charge(2.05)
|
|
1124
|
+
.withCurrency("USD")
|
|
1125
|
+
.withAddress(address)
|
|
1126
|
+
.withInvoiceNumber("123456")
|
|
1127
|
+
.withAllowDuplicates(true)
|
|
1154
1128
|
.execute()
|
|
1155
|
-
.then((
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1129
|
+
.then((response) => {
|
|
1130
|
+
expect(response).toBeTruthy();
|
|
1131
|
+
expect(response.responseCode).toBe("00");
|
|
1132
|
+
return response;
|
|
1133
|
+
})
|
|
1134
|
+
.then((response) => {
|
|
1135
|
+
response
|
|
1136
|
+
.void()
|
|
1137
|
+
.execute()
|
|
1138
|
+
.then((voidResponse) => {
|
|
1139
|
+
expect(voidResponse).toBeTruthy();
|
|
1140
|
+
expect(voidResponse.responseCode).toBe("00");
|
|
1141
|
+
resolve();
|
|
1142
|
+
})
|
|
1143
|
+
.catch(reject);
|
|
1159
1144
|
})
|
|
1160
1145
|
.catch(reject);
|
|
1161
|
-
})
|
|
1162
|
-
.catch(reject);
|
|
1146
|
+
});
|
|
1163
1147
|
});
|
|
1164
1148
|
});
|
|
1165
|
-
(
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1149
|
+
describe("conditional charge gsb", () => {
|
|
1150
|
+
(usePrepaid ? test : test.skip)("040 - charge gsb", () => {
|
|
1151
|
+
const address = new src_1.Address();
|
|
1152
|
+
address.streetAddress1 = "6860";
|
|
1153
|
+
address.postalCode = "75024";
|
|
1154
|
+
const card = Data_1.TestCards.gsbManual();
|
|
1155
|
+
return new Promise((resolve, reject) => {
|
|
1156
|
+
card
|
|
1157
|
+
.charge(2.1)
|
|
1158
|
+
.withCurrency("USD")
|
|
1159
|
+
.withAddress(address)
|
|
1160
|
+
.withInvoiceNumber("123456")
|
|
1161
|
+
.withAllowDuplicates(true)
|
|
1162
|
+
.execute()
|
|
1163
|
+
.then((response) => {
|
|
1164
|
+
expect(response).toBeTruthy();
|
|
1165
|
+
expect(response.responseCode).toBe("00");
|
|
1166
|
+
resolve();
|
|
1167
|
+
})
|
|
1168
|
+
.catch(reject);
|
|
1169
|
+
});
|
|
1185
1170
|
});
|
|
1186
1171
|
});
|
|
1187
|
-
/// ONLINE VOID / REVERSAL
|
|
1188
|
-
test("041 - void gsb", () => true);
|
|
1189
|
-
/// HMS GIFT - REWARDS
|
|
1190
1172
|
/// ACTIVATE
|
|
1191
|
-
test("042 - activate gift 1", (
|
|
1192
|
-
t.plan(2);
|
|
1173
|
+
test("042 - activate gift 1", () => {
|
|
1193
1174
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1194
1175
|
return new Promise((resolve, reject) => {
|
|
1195
1176
|
card
|
|
@@ -1197,15 +1178,14 @@ test("042 - activate gift 1", (t) => {
|
|
|
1197
1178
|
.withCurrency("USD")
|
|
1198
1179
|
.execute()
|
|
1199
1180
|
.then((response) => {
|
|
1200
|
-
|
|
1201
|
-
|
|
1181
|
+
expect(response).toBeTruthy();
|
|
1182
|
+
expect(response.responseCode).toBe("00");
|
|
1202
1183
|
resolve();
|
|
1203
1184
|
})
|
|
1204
1185
|
.catch(reject);
|
|
1205
1186
|
});
|
|
1206
1187
|
});
|
|
1207
|
-
test("043 - activate gift 2", (
|
|
1208
|
-
t.plan(2);
|
|
1188
|
+
test("043 - activate gift 2", () => {
|
|
1209
1189
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1210
1190
|
return new Promise((resolve, reject) => {
|
|
1211
1191
|
card
|
|
@@ -1213,16 +1193,15 @@ test("043 - activate gift 2", (t) => {
|
|
|
1213
1193
|
.withCurrency("USD")
|
|
1214
1194
|
.execute()
|
|
1215
1195
|
.then((response) => {
|
|
1216
|
-
|
|
1217
|
-
|
|
1196
|
+
expect(response).toBeTruthy();
|
|
1197
|
+
expect(response.responseCode).toBe("00");
|
|
1218
1198
|
resolve();
|
|
1219
1199
|
})
|
|
1220
1200
|
.catch(reject);
|
|
1221
1201
|
});
|
|
1222
1202
|
});
|
|
1223
1203
|
/// LOAD / ADD VALUE
|
|
1224
|
-
test("044 - add value gift 1", (
|
|
1225
|
-
t.plan(2);
|
|
1204
|
+
test("044 - add value gift 1", () => {
|
|
1226
1205
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1227
1206
|
return new Promise((resolve, reject) => {
|
|
1228
1207
|
card
|
|
@@ -1230,15 +1209,14 @@ test("044 - add value gift 1", (t) => {
|
|
|
1230
1209
|
.withCurrency("USD")
|
|
1231
1210
|
.execute()
|
|
1232
1211
|
.then((response) => {
|
|
1233
|
-
|
|
1234
|
-
|
|
1212
|
+
expect(response).toBeTruthy();
|
|
1213
|
+
expect(response.responseCode).toBe("00");
|
|
1235
1214
|
resolve();
|
|
1236
1215
|
})
|
|
1237
1216
|
.catch(reject);
|
|
1238
1217
|
});
|
|
1239
1218
|
});
|
|
1240
|
-
test("045 - add value gift 2", (
|
|
1241
|
-
t.plan(2);
|
|
1219
|
+
test("045 - add value gift 2", () => {
|
|
1242
1220
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1243
1221
|
return new Promise((resolve, reject) => {
|
|
1244
1222
|
card
|
|
@@ -1246,80 +1224,75 @@ test("045 - add value gift 2", (t) => {
|
|
|
1246
1224
|
.withCurrency("USD")
|
|
1247
1225
|
.execute()
|
|
1248
1226
|
.then((response) => {
|
|
1249
|
-
|
|
1250
|
-
|
|
1227
|
+
expect(response).toBeTruthy();
|
|
1228
|
+
expect(response.responseCode).toBe("00");
|
|
1251
1229
|
resolve();
|
|
1252
1230
|
})
|
|
1253
1231
|
.catch(reject);
|
|
1254
1232
|
});
|
|
1255
1233
|
});
|
|
1256
1234
|
/// BALANCE INQUIRY
|
|
1257
|
-
test("046 - balance inquiry gift 1", (
|
|
1258
|
-
t.plan(3);
|
|
1235
|
+
test("046 - balance inquiry gift 1", () => {
|
|
1259
1236
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1260
1237
|
return new Promise((resolve, reject) => {
|
|
1261
1238
|
card
|
|
1262
1239
|
.balanceInquiry()
|
|
1263
1240
|
.execute()
|
|
1264
1241
|
.then((response) => {
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1242
|
+
expect(response).toBeTruthy();
|
|
1243
|
+
expect(response.responseCode).toBe("00");
|
|
1244
|
+
expect(response.balanceAmount).toBe("10.00");
|
|
1268
1245
|
resolve();
|
|
1269
1246
|
})
|
|
1270
1247
|
.catch(reject);
|
|
1271
1248
|
});
|
|
1272
1249
|
});
|
|
1273
|
-
test("047 - balance inquiry gift 2", (
|
|
1274
|
-
t.plan(3);
|
|
1250
|
+
test("047 - balance inquiry gift 2", () => {
|
|
1275
1251
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1276
1252
|
return new Promise((resolve, reject) => {
|
|
1277
1253
|
card
|
|
1278
1254
|
.balanceInquiry()
|
|
1279
1255
|
.execute()
|
|
1280
1256
|
.then((response) => {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1257
|
+
expect(response).toBeTruthy();
|
|
1258
|
+
expect(response.responseCode).toBe("00");
|
|
1259
|
+
expect(response.balanceAmount).toBe("10.00");
|
|
1284
1260
|
resolve();
|
|
1285
1261
|
})
|
|
1286
1262
|
.catch(reject);
|
|
1287
1263
|
});
|
|
1288
1264
|
});
|
|
1289
1265
|
/// REPLACE / TRANSFER
|
|
1290
|
-
test("048 - replace gift 1", (
|
|
1291
|
-
t.plan(2);
|
|
1266
|
+
test("048 - replace gift 1", () => {
|
|
1292
1267
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1293
1268
|
return new Promise((resolve, reject) => {
|
|
1294
1269
|
card
|
|
1295
1270
|
.replaceWith(Data_1.TestCards.giftCard2Manual())
|
|
1296
1271
|
.execute()
|
|
1297
1272
|
.then((response) => {
|
|
1298
|
-
|
|
1299
|
-
|
|
1273
|
+
expect(response).toBeTruthy();
|
|
1274
|
+
expect(response.responseCode).toBe("00");
|
|
1300
1275
|
resolve();
|
|
1301
1276
|
})
|
|
1302
1277
|
.catch(reject);
|
|
1303
1278
|
});
|
|
1304
1279
|
});
|
|
1305
|
-
test("049 - replace gift 2", (
|
|
1306
|
-
t.plan(2);
|
|
1280
|
+
test("049 - replace gift 2", () => {
|
|
1307
1281
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1308
1282
|
return new Promise((resolve, reject) => {
|
|
1309
1283
|
card
|
|
1310
1284
|
.replaceWith(Data_1.TestCards.giftCard1Swipe())
|
|
1311
1285
|
.execute()
|
|
1312
1286
|
.then((response) => {
|
|
1313
|
-
|
|
1314
|
-
|
|
1287
|
+
expect(response).toBeTruthy();
|
|
1288
|
+
expect(response.responseCode).toBe("00");
|
|
1315
1289
|
resolve();
|
|
1316
1290
|
})
|
|
1317
1291
|
.catch(reject);
|
|
1318
1292
|
});
|
|
1319
1293
|
});
|
|
1320
1294
|
/// SALE
|
|
1321
|
-
test("050 - sale gift 1", (
|
|
1322
|
-
t.plan(2);
|
|
1295
|
+
test("050 - sale gift 1", () => {
|
|
1323
1296
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1324
1297
|
return new Promise((resolve, reject) => {
|
|
1325
1298
|
card
|
|
@@ -1327,15 +1300,14 @@ test("050 - sale gift 1", (t) => {
|
|
|
1327
1300
|
.withCurrency("USD")
|
|
1328
1301
|
.execute()
|
|
1329
1302
|
.then((response) => {
|
|
1330
|
-
|
|
1331
|
-
|
|
1303
|
+
expect(response).toBeTruthy();
|
|
1304
|
+
expect(response.responseCode).toBe("00");
|
|
1332
1305
|
resolve();
|
|
1333
1306
|
})
|
|
1334
1307
|
.catch(reject);
|
|
1335
1308
|
});
|
|
1336
1309
|
});
|
|
1337
|
-
test("051 - sale gift 2", (
|
|
1338
|
-
t.plan(2);
|
|
1310
|
+
test("051 - sale gift 2", () => {
|
|
1339
1311
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1340
1312
|
return new Promise((resolve, reject) => {
|
|
1341
1313
|
card
|
|
@@ -1343,15 +1315,14 @@ test("051 - sale gift 2", (t) => {
|
|
|
1343
1315
|
.withCurrency("USD")
|
|
1344
1316
|
.execute()
|
|
1345
1317
|
.then((response) => {
|
|
1346
|
-
|
|
1347
|
-
|
|
1318
|
+
expect(response).toBeTruthy();
|
|
1319
|
+
expect(response.responseCode).toBe("00");
|
|
1348
1320
|
resolve();
|
|
1349
1321
|
})
|
|
1350
1322
|
.catch(reject);
|
|
1351
1323
|
});
|
|
1352
1324
|
});
|
|
1353
|
-
test("052 - sale gift 1 void", (
|
|
1354
|
-
t.plan(4);
|
|
1325
|
+
test("052 - sale gift 1 void", () => {
|
|
1355
1326
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1356
1327
|
return new Promise((resolve, reject) => {
|
|
1357
1328
|
card
|
|
@@ -1359,8 +1330,8 @@ test("052 - sale gift 1 void", (t) => {
|
|
|
1359
1330
|
.withCurrency("USD")
|
|
1360
1331
|
.execute()
|
|
1361
1332
|
.then((response) => {
|
|
1362
|
-
|
|
1363
|
-
|
|
1333
|
+
expect(response).toBeTruthy();
|
|
1334
|
+
expect(response.responseCode).toBe("00");
|
|
1364
1335
|
return response;
|
|
1365
1336
|
})
|
|
1366
1337
|
.then((response) => {
|
|
@@ -1368,8 +1339,8 @@ test("052 - sale gift 1 void", (t) => {
|
|
|
1368
1339
|
.void()
|
|
1369
1340
|
.execute()
|
|
1370
1341
|
.then((voidResponse) => {
|
|
1371
|
-
|
|
1372
|
-
|
|
1342
|
+
expect(voidResponse).toBeTruthy();
|
|
1343
|
+
expect(voidResponse.responseCode).toBe("00");
|
|
1373
1344
|
resolve();
|
|
1374
1345
|
})
|
|
1375
1346
|
.catch(reject);
|
|
@@ -1377,8 +1348,7 @@ test("052 - sale gift 1 void", (t) => {
|
|
|
1377
1348
|
.catch(reject);
|
|
1378
1349
|
});
|
|
1379
1350
|
});
|
|
1380
|
-
test("053 - sale gift 2 void", (
|
|
1381
|
-
t.plan(4);
|
|
1351
|
+
test("053 - sale gift 2 void", () => {
|
|
1382
1352
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1383
1353
|
return new Promise((resolve, reject) => {
|
|
1384
1354
|
card
|
|
@@ -1386,8 +1356,8 @@ test("053 - sale gift 2 void", (t) => {
|
|
|
1386
1356
|
.withCurrency("USD")
|
|
1387
1357
|
.execute()
|
|
1388
1358
|
.then((response) => {
|
|
1389
|
-
|
|
1390
|
-
|
|
1359
|
+
expect(response).toBeTruthy();
|
|
1360
|
+
expect(response.responseCode).toBe("00");
|
|
1391
1361
|
return response;
|
|
1392
1362
|
})
|
|
1393
1363
|
.then((response) => {
|
|
@@ -1395,8 +1365,8 @@ test("053 - sale gift 2 void", (t) => {
|
|
|
1395
1365
|
.reverse(4.0)
|
|
1396
1366
|
.execute()
|
|
1397
1367
|
.then((reversalResponse) => {
|
|
1398
|
-
|
|
1399
|
-
|
|
1368
|
+
expect(reversalResponse).toBeTruthy();
|
|
1369
|
+
expect(reversalResponse.responseCode).toBe("00");
|
|
1400
1370
|
resolve();
|
|
1401
1371
|
})
|
|
1402
1372
|
.catch(reject);
|
|
@@ -1404,12 +1374,7 @@ test("053 - sale gift 2 void", (t) => {
|
|
|
1404
1374
|
.catch(reject);
|
|
1405
1375
|
});
|
|
1406
1376
|
});
|
|
1407
|
-
|
|
1408
|
-
test("054 - void gift", () => true);
|
|
1409
|
-
/// REVERSAL
|
|
1410
|
-
test("055 - reversal gift", () => true);
|
|
1411
|
-
test("056 - reversal gift 2", (t) => {
|
|
1412
|
-
t.plan(4);
|
|
1377
|
+
test("056 - reversal gift 2", () => {
|
|
1413
1378
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1414
1379
|
return new Promise((resolve, reject) => {
|
|
1415
1380
|
// setup
|
|
@@ -1418,8 +1383,8 @@ test("056 - reversal gift 2", (t) => {
|
|
|
1418
1383
|
.withCurrency("USD")
|
|
1419
1384
|
.execute()
|
|
1420
1385
|
.then((response) => {
|
|
1421
|
-
|
|
1422
|
-
|
|
1386
|
+
expect(response).toBeTruthy();
|
|
1387
|
+
expect(response.responseCode).toBe("00");
|
|
1423
1388
|
})
|
|
1424
1389
|
.then(() => {
|
|
1425
1390
|
// reverse based on card, not transaction id
|
|
@@ -1427,8 +1392,8 @@ test("056 - reversal gift 2", (t) => {
|
|
|
1427
1392
|
.reverse(2.0)
|
|
1428
1393
|
.execute()
|
|
1429
1394
|
.then((response) => {
|
|
1430
|
-
|
|
1431
|
-
|
|
1395
|
+
expect(response).toBeTruthy();
|
|
1396
|
+
expect(response.responseCode).toBe("00");
|
|
1432
1397
|
resolve();
|
|
1433
1398
|
})
|
|
1434
1399
|
.catch(reject);
|
|
@@ -1437,128 +1402,118 @@ test("056 - reversal gift 2", (t) => {
|
|
|
1437
1402
|
});
|
|
1438
1403
|
});
|
|
1439
1404
|
/// DEACTIVATE
|
|
1440
|
-
test("057 - deactivate gift 1", (
|
|
1441
|
-
t.plan(2);
|
|
1405
|
+
test("057 - deactivate gift 1", () => {
|
|
1442
1406
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1443
1407
|
return new Promise((resolve, reject) => {
|
|
1444
1408
|
card
|
|
1445
1409
|
.deactivate()
|
|
1446
1410
|
.execute()
|
|
1447
1411
|
.then((response) => {
|
|
1448
|
-
|
|
1449
|
-
|
|
1412
|
+
expect(response).toBeTruthy();
|
|
1413
|
+
expect(response.responseCode).toBe("00");
|
|
1450
1414
|
resolve();
|
|
1451
1415
|
})
|
|
1452
1416
|
.catch(reject);
|
|
1453
1417
|
});
|
|
1454
1418
|
});
|
|
1455
1419
|
/// RECEIPTS MESSAGING
|
|
1456
|
-
test("058 - receipts messaging", () => true);
|
|
1457
1420
|
/// REWARD
|
|
1458
1421
|
/// BALANCE INQUIRY
|
|
1459
|
-
test("059 - balance inquiry rewards 1", (
|
|
1460
|
-
t.plan(3);
|
|
1422
|
+
test("059 - balance inquiry rewards 1", () => {
|
|
1461
1423
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1462
1424
|
return new Promise((resolve, reject) => {
|
|
1463
1425
|
card
|
|
1464
1426
|
.balanceInquiry()
|
|
1465
1427
|
.execute()
|
|
1466
1428
|
.then((response) => {
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1429
|
+
expect(response).toBeTruthy();
|
|
1430
|
+
expect(response.responseCode).toBe("00");
|
|
1431
|
+
expect(response.pointsBalanceAmount > "0").toBeTruthy();
|
|
1470
1432
|
resolve();
|
|
1471
1433
|
})
|
|
1472
1434
|
.catch(reject);
|
|
1473
1435
|
});
|
|
1474
1436
|
});
|
|
1475
|
-
test("060 - balance inquiry rewards 2", (
|
|
1476
|
-
t.plan(3);
|
|
1437
|
+
test("060 - balance inquiry rewards 2", () => {
|
|
1477
1438
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1478
1439
|
return new Promise((resolve, reject) => {
|
|
1479
1440
|
card
|
|
1480
1441
|
.balanceInquiry()
|
|
1481
1442
|
.execute()
|
|
1482
1443
|
.then((response) => {
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1444
|
+
expect(response).toBeTruthy();
|
|
1445
|
+
expect(response.responseCode).toBe("00");
|
|
1446
|
+
expect(response.pointsBalanceAmount > "0").toBeTruthy();
|
|
1486
1447
|
resolve();
|
|
1487
1448
|
})
|
|
1488
1449
|
.catch(reject);
|
|
1489
1450
|
});
|
|
1490
1451
|
});
|
|
1491
1452
|
/// ALIAS
|
|
1492
|
-
test("061 - create alias gift 1", (
|
|
1493
|
-
t.plan(1);
|
|
1453
|
+
test("061 - create alias gift 1", () => {
|
|
1494
1454
|
return new Promise((resolve, reject) => {
|
|
1495
1455
|
src_1.GiftCard.create("9725550100")
|
|
1496
1456
|
.then((response) => {
|
|
1497
|
-
|
|
1457
|
+
expect(response).toBeTruthy();
|
|
1498
1458
|
resolve();
|
|
1499
1459
|
})
|
|
1500
1460
|
.catch(reject);
|
|
1501
1461
|
});
|
|
1502
1462
|
});
|
|
1503
|
-
test("062 - create alias gift 2", (
|
|
1504
|
-
t.plan(1);
|
|
1463
|
+
test("062 - create alias gift 2", () => {
|
|
1505
1464
|
return new Promise((resolve, reject) => {
|
|
1506
1465
|
src_1.GiftCard.create("9725550100")
|
|
1507
1466
|
.then((response) => {
|
|
1508
|
-
|
|
1467
|
+
expect(response).toBeTruthy();
|
|
1509
1468
|
resolve();
|
|
1510
1469
|
})
|
|
1511
1470
|
.catch(reject);
|
|
1512
1471
|
});
|
|
1513
1472
|
});
|
|
1514
|
-
test("063 - add alias gift 1", (
|
|
1515
|
-
t.plan(2);
|
|
1473
|
+
test("063 - add alias gift 1", () => {
|
|
1516
1474
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1517
1475
|
return new Promise((resolve, reject) => {
|
|
1518
1476
|
card
|
|
1519
1477
|
.addAlias("9725550100")
|
|
1520
1478
|
.execute()
|
|
1521
1479
|
.then((response) => {
|
|
1522
|
-
|
|
1523
|
-
|
|
1480
|
+
expect(response).toBeTruthy();
|
|
1481
|
+
expect(response.responseCode).toBe("00");
|
|
1524
1482
|
resolve();
|
|
1525
1483
|
})
|
|
1526
1484
|
.catch(reject);
|
|
1527
1485
|
});
|
|
1528
1486
|
});
|
|
1529
|
-
test("064 - add alias gift 2", (
|
|
1530
|
-
t.plan(2);
|
|
1487
|
+
test("064 - add alias gift 2", () => {
|
|
1531
1488
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1532
1489
|
return new Promise((resolve, reject) => {
|
|
1533
1490
|
card
|
|
1534
1491
|
.addAlias("9725550100")
|
|
1535
1492
|
.execute()
|
|
1536
1493
|
.then((response) => {
|
|
1537
|
-
|
|
1538
|
-
|
|
1494
|
+
expect(response).toBeTruthy();
|
|
1495
|
+
expect(response.responseCode).toBe("00");
|
|
1539
1496
|
resolve();
|
|
1540
1497
|
})
|
|
1541
1498
|
.catch(reject);
|
|
1542
1499
|
});
|
|
1543
1500
|
});
|
|
1544
|
-
test("065 - delete alias gift 1", (
|
|
1545
|
-
t.plan(2);
|
|
1501
|
+
test("065 - delete alias gift 1", () => {
|
|
1546
1502
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1547
1503
|
return new Promise((resolve, reject) => {
|
|
1548
1504
|
card
|
|
1549
1505
|
.removeAlias("9725550100")
|
|
1550
1506
|
.execute()
|
|
1551
1507
|
.then((response) => {
|
|
1552
|
-
|
|
1553
|
-
|
|
1508
|
+
expect(response).toBeTruthy();
|
|
1509
|
+
expect(response.responseCode).toBe("00");
|
|
1554
1510
|
resolve();
|
|
1555
1511
|
})
|
|
1556
1512
|
.catch(reject);
|
|
1557
1513
|
});
|
|
1558
1514
|
});
|
|
1559
1515
|
/// SALE
|
|
1560
|
-
test("066 - redeem points gift 1", (
|
|
1561
|
-
t.plan(2);
|
|
1516
|
+
test("066 - redeem points gift 1", () => {
|
|
1562
1517
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1563
1518
|
return new Promise((resolve, reject) => {
|
|
1564
1519
|
card
|
|
@@ -1566,15 +1521,14 @@ test("066 - redeem points gift 1", (t) => {
|
|
|
1566
1521
|
.withCurrency("points")
|
|
1567
1522
|
.execute()
|
|
1568
1523
|
.then((response) => {
|
|
1569
|
-
|
|
1570
|
-
|
|
1524
|
+
expect(response).toBeTruthy();
|
|
1525
|
+
expect(response.responseCode).toBe("00");
|
|
1571
1526
|
resolve();
|
|
1572
1527
|
})
|
|
1573
1528
|
.catch(reject);
|
|
1574
1529
|
});
|
|
1575
1530
|
});
|
|
1576
|
-
test("067 - redeem points gift 2", (
|
|
1577
|
-
t.plan(2);
|
|
1531
|
+
test("067 - redeem points gift 2", () => {
|
|
1578
1532
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1579
1533
|
return new Promise((resolve, reject) => {
|
|
1580
1534
|
card
|
|
@@ -1582,15 +1536,14 @@ test("067 - redeem points gift 2", (t) => {
|
|
|
1582
1536
|
.withCurrency("points")
|
|
1583
1537
|
.execute()
|
|
1584
1538
|
.then((response) => {
|
|
1585
|
-
|
|
1586
|
-
|
|
1539
|
+
expect(response).toBeTruthy();
|
|
1540
|
+
expect(response.responseCode).toBe("00");
|
|
1587
1541
|
resolve();
|
|
1588
1542
|
})
|
|
1589
1543
|
.catch(reject);
|
|
1590
1544
|
});
|
|
1591
1545
|
});
|
|
1592
|
-
test("068 - redeem points gift 2", (
|
|
1593
|
-
t.plan(2);
|
|
1546
|
+
test("068 - redeem points gift 2", () => {
|
|
1594
1547
|
const card = new src_1.GiftCard();
|
|
1595
1548
|
card.alias = "9725550100";
|
|
1596
1549
|
return new Promise((resolve, reject) => {
|
|
@@ -1599,120 +1552,111 @@ test("068 - redeem points gift 2", (t) => {
|
|
|
1599
1552
|
.withCurrency("points")
|
|
1600
1553
|
.execute()
|
|
1601
1554
|
.then((response) => {
|
|
1602
|
-
|
|
1603
|
-
|
|
1555
|
+
expect(response).toBeTruthy();
|
|
1556
|
+
expect(response.responseCode).toBe("00");
|
|
1604
1557
|
resolve();
|
|
1605
1558
|
})
|
|
1606
1559
|
.catch(reject);
|
|
1607
1560
|
});
|
|
1608
1561
|
});
|
|
1609
1562
|
/// REWARDS
|
|
1610
|
-
test("069 - rewards gift 1", (
|
|
1611
|
-
t.plan(2);
|
|
1563
|
+
test("069 - rewards gift 1", () => {
|
|
1612
1564
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1613
1565
|
return new Promise((resolve, reject) => {
|
|
1614
1566
|
card
|
|
1615
1567
|
.rewards(10)
|
|
1616
1568
|
.execute()
|
|
1617
1569
|
.then((response) => {
|
|
1618
|
-
|
|
1619
|
-
|
|
1570
|
+
expect(response).toBeTruthy();
|
|
1571
|
+
expect(response.responseCode).toBe("00");
|
|
1620
1572
|
resolve();
|
|
1621
1573
|
})
|
|
1622
1574
|
.catch(reject);
|
|
1623
1575
|
});
|
|
1624
1576
|
});
|
|
1625
|
-
test("070 - rewards gift 2", (
|
|
1626
|
-
t.plan(2);
|
|
1577
|
+
test("070 - rewards gift 2", () => {
|
|
1627
1578
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1628
1579
|
return new Promise((resolve, reject) => {
|
|
1629
1580
|
card
|
|
1630
1581
|
.rewards(11)
|
|
1631
1582
|
.execute()
|
|
1632
1583
|
.then((response) => {
|
|
1633
|
-
|
|
1634
|
-
|
|
1584
|
+
expect(response).toBeTruthy();
|
|
1585
|
+
expect(response.responseCode).toBe("00");
|
|
1635
1586
|
resolve();
|
|
1636
1587
|
})
|
|
1637
1588
|
.catch(reject);
|
|
1638
1589
|
});
|
|
1639
1590
|
});
|
|
1640
1591
|
/// REPLACE / TRANSFER
|
|
1641
|
-
test("071 - replace rewards 1", (
|
|
1642
|
-
t.plan(2);
|
|
1592
|
+
test("071 - replace rewards 1", () => {
|
|
1643
1593
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1644
1594
|
return new Promise((resolve, reject) => {
|
|
1645
1595
|
card
|
|
1646
1596
|
.replaceWith(Data_1.TestCards.giftCard2Manual())
|
|
1647
1597
|
.execute()
|
|
1648
1598
|
.then((response) => {
|
|
1649
|
-
|
|
1650
|
-
|
|
1599
|
+
expect(response).toBeTruthy();
|
|
1600
|
+
expect(response.responseCode).toBe("00");
|
|
1651
1601
|
resolve();
|
|
1652
1602
|
})
|
|
1653
1603
|
.catch(reject);
|
|
1654
1604
|
});
|
|
1655
1605
|
});
|
|
1656
|
-
test("072 - replace rewards 2", (
|
|
1657
|
-
t.plan(2);
|
|
1606
|
+
test("072 - replace rewards 2", () => {
|
|
1658
1607
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1659
1608
|
return new Promise((resolve, reject) => {
|
|
1660
1609
|
card
|
|
1661
1610
|
.replaceWith(Data_1.TestCards.giftCard1Swipe())
|
|
1662
1611
|
.execute()
|
|
1663
1612
|
.then((response) => {
|
|
1664
|
-
|
|
1665
|
-
|
|
1613
|
+
expect(response).toBeTruthy();
|
|
1614
|
+
expect(response.responseCode).toBe("00");
|
|
1666
1615
|
resolve();
|
|
1667
1616
|
})
|
|
1668
1617
|
.catch(reject);
|
|
1669
1618
|
});
|
|
1670
1619
|
});
|
|
1671
1620
|
/// DEACTIVATE
|
|
1672
|
-
test("073 - deactivate rewards 1", (
|
|
1673
|
-
t.plan(2);
|
|
1621
|
+
test("073 - deactivate rewards 1", () => {
|
|
1674
1622
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1675
1623
|
return new Promise((resolve, reject) => {
|
|
1676
1624
|
card
|
|
1677
1625
|
.deactivate()
|
|
1678
1626
|
.execute()
|
|
1679
1627
|
.then((response) => {
|
|
1680
|
-
|
|
1681
|
-
|
|
1628
|
+
expect(response).toBeTruthy();
|
|
1629
|
+
expect(response.responseCode).toBe("00");
|
|
1682
1630
|
resolve();
|
|
1683
1631
|
})
|
|
1684
1632
|
.catch(reject);
|
|
1685
1633
|
});
|
|
1686
1634
|
});
|
|
1687
|
-
test("074 - deactivate rewards 2", (
|
|
1688
|
-
t.plan(2);
|
|
1635
|
+
test("074 - deactivate rewards 2", () => {
|
|
1689
1636
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1690
1637
|
return new Promise((resolve, reject) => {
|
|
1691
1638
|
card
|
|
1692
1639
|
.deactivate()
|
|
1693
1640
|
.execute()
|
|
1694
1641
|
.then((response) => {
|
|
1695
|
-
|
|
1696
|
-
|
|
1642
|
+
expect(response).toBeTruthy();
|
|
1643
|
+
expect(response.responseCode).toBe("00");
|
|
1697
1644
|
resolve();
|
|
1698
1645
|
})
|
|
1699
1646
|
.catch(reject);
|
|
1700
1647
|
});
|
|
1701
1648
|
});
|
|
1702
1649
|
/// RECEIPTS MESSAGING
|
|
1703
|
-
|
|
1704
|
-
test.after("999 - close batch", (t) => {
|
|
1705
|
-
t.plan(1);
|
|
1650
|
+
afterAll(() => {
|
|
1706
1651
|
return new Promise((resolve, reject) => {
|
|
1707
1652
|
src_1.BatchService.closeBatch()
|
|
1708
1653
|
.then((response) => {
|
|
1709
|
-
|
|
1654
|
+
expect(response).toBeTruthy();
|
|
1710
1655
|
resolve();
|
|
1711
1656
|
})
|
|
1712
1657
|
.catch((e) => {
|
|
1713
1658
|
if (e.message.indexOf(BATCH_NOT_OPEN) !== -1 ||
|
|
1714
1659
|
e.message.indexOf(BATCH_EMPTY) !== -1) {
|
|
1715
|
-
t.pass();
|
|
1716
1660
|
resolve();
|
|
1717
1661
|
return;
|
|
1718
1662
|
}
|
|
@@ -1720,4 +1664,4 @@ test.after("999 - close batch", (t) => {
|
|
|
1720
1664
|
});
|
|
1721
1665
|
});
|
|
1722
1666
|
});
|
|
1723
|
-
//# sourceMappingURL=
|
|
1667
|
+
//# sourceMappingURL=Ecommerce.test.js.map
|