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