globalpayments-api 3.7.0 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -1
- package/LICENSE.md +257 -257
- package/README.md +141 -141
- package/lib/src/Builders/BaseBuilder/Validations.js +1 -1
- package/lib/src/Builders/BaseBuilder/Validations.js.map +1 -1
- package/lib/src/Builders/ManagementBuilder.d.ts +26 -6
- package/lib/src/Builders/ManagementBuilder.js +66 -34
- package/lib/src/Builders/ManagementBuilder.js.map +1 -1
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js +19 -0
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js.map +1 -1
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.d.ts +2 -0
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js +86 -0
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js.map +1 -1
- package/lib/src/Builders/TransactionReportBuilder.d.ts +5 -2
- package/lib/src/Builders/TransactionReportBuilder.js +19 -0
- package/lib/src/Builders/TransactionReportBuilder.js.map +1 -1
- package/lib/src/Entities/AdditionalTaxDetails.d.ts +5 -0
- package/lib/src/Entities/AdditionalTaxDetails.js +10 -0
- package/lib/src/Entities/AdditionalTaxDetails.js.map +1 -0
- package/lib/src/Entities/CommercialData.d.ts +26 -0
- package/lib/src/Entities/CommercialData.js +36 -0
- package/lib/src/Entities/CommercialData.js.map +1 -0
- package/lib/src/Entities/CommercialLineItem.d.ts +21 -0
- package/lib/src/Entities/CommercialLineItem.js +24 -0
- package/lib/src/Entities/CommercialLineItem.js.map +1 -0
- package/lib/src/Entities/DiscountDetails.d.ts +8 -0
- package/lib/src/Entities/DiscountDetails.js +13 -0
- package/lib/src/Entities/DiscountDetails.js.map +1 -0
- package/lib/src/Entities/DisputeDocument.d.ts +5 -0
- package/lib/src/Entities/DisputeDocument.js +10 -0
- package/lib/src/Entities/DisputeDocument.js.map +1 -0
- package/lib/src/Entities/Document.d.ts +10 -0
- package/lib/src/Entities/Document.js +13 -0
- package/lib/src/Entities/Document.js.map +1 -0
- package/lib/src/Entities/Enums/DisputeSortProperty.d.ts +12 -0
- package/lib/src/Entities/Enums/DisputeSortProperty.js +17 -0
- package/lib/src/Entities/Enums/DisputeSortProperty.js.map +1 -0
- package/lib/src/Entities/Enums/DisputeStage.d.ts +11 -0
- package/lib/src/Entities/Enums/DisputeStage.js +16 -0
- package/lib/src/Entities/Enums/DisputeStage.js.map +1 -0
- package/lib/src/Entities/Enums/DisputeStatus.d.ts +7 -0
- package/lib/src/Entities/Enums/DisputeStatus.js +12 -0
- package/lib/src/Entities/Enums/DisputeStatus.js.map +1 -0
- package/lib/src/Entities/Enums/DocumentCategory.d.ts +5 -0
- package/lib/src/Entities/Enums/DocumentCategory.js +10 -0
- package/lib/src/Entities/Enums/DocumentCategory.js.map +1 -0
- package/lib/src/Entities/Enums/FileType.d.ts +11 -0
- package/lib/src/Entities/Enums/FileType.js +16 -0
- package/lib/src/Entities/Enums/FileType.js.map +1 -0
- package/lib/src/Entities/Enums.d.ts +17 -1
- package/lib/src/Entities/Enums.js +20 -2
- package/lib/src/Entities/Enums.js.map +1 -1
- package/lib/src/Entities/HostedPaymentData.d.ts +3 -0
- package/lib/src/Entities/HostedPaymentData.js +3 -0
- package/lib/src/Entities/HostedPaymentData.js.map +1 -1
- package/lib/src/Entities/Reporting/DisputeSummary.d.ts +53 -0
- package/lib/src/Entities/Reporting/DisputeSummary.js +64 -0
- package/lib/src/Entities/Reporting/DisputeSummary.js.map +1 -0
- package/lib/src/Entities/Reporting/SearchCriteriaBuilder.d.ts +4 -2
- package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js +2 -0
- package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js.map +1 -1
- package/lib/src/Entities/Reporting/index.d.ts +1 -0
- package/lib/src/Entities/Reporting/index.js +1 -0
- package/lib/src/Entities/Reporting/index.js.map +1 -1
- package/lib/src/Entities/Transaction.js +3 -0
- package/lib/src/Entities/Transaction.js.map +1 -1
- package/lib/src/Entities/TransactionSummary.d.ts +1 -0
- package/lib/src/Entities/TransactionSummary.js +1 -0
- package/lib/src/Entities/TransactionSummary.js.map +1 -1
- package/lib/src/Entities/index.d.ts +7 -0
- package/lib/src/Entities/index.js +7 -0
- package/lib/src/Entities/index.js.map +1 -1
- package/lib/src/Gateways/GpApiConnector.js +3 -0
- package/lib/src/Gateways/GpApiConnector.js.map +1 -1
- package/lib/src/Gateways/GpEcomConnector.js +9 -0
- package/lib/src/Gateways/GpEcomConnector.js.map +1 -1
- package/lib/src/Gateways/PayPlanConnector.d.ts +1 -1
- package/lib/src/Gateways/PorticoConnector.d.ts +3 -3
- package/lib/src/Gateways/PorticoConnector.js +117 -4
- package/lib/src/Gateways/PorticoConnector.js.map +1 -1
- package/lib/src/Mapping/GpApiMapping.d.ts +2 -1
- package/lib/src/Mapping/GpApiMapping.js +75 -2
- package/lib/src/Mapping/GpApiMapping.js.map +1 -1
- package/lib/src/Services/ReportingService.d.ts +6 -1
- package/lib/src/Services/ReportingService.js +15 -0
- package/lib/src/Services/ReportingService.js.map +1 -1
- package/lib/test/Integration/Gateways/GpApiConnector/{3DS2Test.js → 3DS2.test.js} +338 -341
- package/lib/test/Integration/Gateways/GpApiConnector/3DS2.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{3DSecureTest.js → 3DSecure.test.js} +167 -173
- package/lib/test/Integration/Gateways/GpApiConnector/3DSecure.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/AccessToken.test.js +130 -0
- package/lib/test/Integration/Gateways/GpApiConnector/AccessToken.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresent.test.js +1070 -0
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresent.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{DebitCardTest.js → DebitCard.test.js} +27 -33
- package/lib/test/Integration/Gateways/GpApiConnector/DebitCard.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{GpApiCertificationTest.js → GpApiCertification.test.js} +211 -208
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertification.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagement.test.js +151 -0
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagement.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{ReportingDepositsTest.js → ReportingDeposits.test.js} +103 -103
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingDeposits.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingDisputes.test.js +571 -0
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingDisputes.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{ReportingSettlementTransactionsTest.js → ReportingSettlementTransactions.test.js} +104 -108
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactions.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{ReportingStoredPaymentMethodsTest.js → ReportingStoredPaymentMethods.test.js} +75 -76
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethods.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/{ReportingTransactionsTest.js → ReportingTransactions.test.js} +97 -95
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactions.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AuthTest.js → Auth.test.js} +441 -461
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Auth.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AvsTest.js → Avs.test.js} +274 -218
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Avs.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{CreditTest.js → Credit.test.js} +317 -321
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Credit.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{HoldTest.js → Hold.test.js} +290 -257
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Hold.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/{CreditTest.js → Credit.test.js} +76 -84
- package/lib/test/Integration/Gateways/GpEcomConnector/Credit.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Hpp.test.js +137 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Hpp.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Recurring.test.js +124 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Recurring.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Ach.test.js +54 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Ach.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Check.test.js +357 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Check.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceTest.js → Ecommerce.test.js} +403 -459
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Ecommerce.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceCheckTest.js → EcommerceCheck.test.js} +17 -23
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheck.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoTest.js → Moto.test.js} +377 -650
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Moto.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoCheckTest.js → MotoCheck.test.js} +16 -22
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheck.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Recurring.test.js +393 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Recurring.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{RetailTest.js → Retail.test.js} +481 -600
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Retail.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Credit.test.js +433 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Credit.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/{DebitTest.js → Debit.test.js} +32 -37
- package/lib/test/Integration/Gateways/PorticoConnector/Debit.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/{EbtTest.js → Ebt.test.js} +30 -39
- package/lib/test/Integration/Gateways/PorticoConnector/Ebt.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/{EcommerceTest.js → Ecommerce.test.js} +38 -45
- package/lib/test/Integration/Gateways/PorticoConnector/Ecommerce.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Gift.test.js +121 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Gift.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/{PorticoManagementTokenTest.js → PorticoManagementToken.test.js} +8 -16
- package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementToken.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Recurring.test.js +87 -0
- package/lib/test/Integration/Gateways/PorticoConnector/Recurring.test.js.map +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/{ReportingTest.js → Reporting.test.js} +12 -18
- package/lib/test/Integration/Gateways/PorticoConnector/Reporting.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{GetInformationCertificationTest.js → GetInformationCertification.test.js} +12 -18
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertification.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayAccountCertificationTest.js → ProPayAccountCertification.test.js} +49 -64
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertification.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayFundCertificationTest.js → ProPayFundCertification.test.js} +14 -22
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertification.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayInNetworkTransactionCertificationTest.js → ProPayInNetworkTransactionCertification.test.js} +18 -26
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertification.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/{GetInformationTest.js → GetInformation.test.js} +11 -18
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformation.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/{ProPayAccountTest.js → ProPayAccount.test.js} +63 -83
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccount.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/{ProPayFundsTest.js → ProPayFunds.test.js} +15 -22
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFunds.test.js.map +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/{ProPayInNetworkTransactionTest.js → ProPayInNetworkTransaction.test.js} +17 -25
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransaction.test.js.map +1 -0
- package/lib/test/Integration/Gateways/Terminals/UPA/UpaMic.test.js +165 -0
- package/lib/test/Integration/Gateways/Terminals/UPA/UpaMic.test.js.map +1 -0
- package/lib/test/Integration/Services/{CheckServiceTest.js → CheckService.test.js} +11 -18
- package/lib/test/Integration/Services/CheckService.test.js.map +1 -0
- package/lib/test/Integration/Services/{CreditServiceTest.js → CreditService.test.js} +48 -64
- package/lib/test/Integration/Services/CreditService.test.js.map +1 -0
- package/lib/test/Integration/Services/{DebitServiceTest.js → DebitService.test.js} +28 -32
- package/lib/test/Integration/Services/DebitService.test.js.map +1 -0
- package/lib/test/Integration/Services/{EBTServiceTest.js → EBTService.test.js} +16 -26
- package/lib/test/Integration/Services/EBTService.test.js.map +1 -0
- package/lib/test/Unit/Builders/AuthorizationBuilder/Validation.test.js +122 -0
- package/lib/test/Unit/Builders/AuthorizationBuilder/Validation.test.js.map +1 -0
- package/lib/test/Unit/Builders/ReportBuilder/Validation.test.js +66 -0
- package/lib/test/Unit/Builders/ReportBuilder/Validation.test.js.map +1 -0
- package/lib/test/Unit/Gateways/GpEcomConnector/{CreditTest.js → Credit.test.js} +13 -15
- package/lib/test/Unit/Gateways/GpEcomConnector/Credit.test.js.map +1 -0
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidation.test.js +128 -0
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidation.test.js.map +1 -0
- package/package.json +7 -17
- package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js +0 -109
- package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js +0 -1025
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js +0 -439
- package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagementTest.js +0 -149
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagementTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingDepositsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js +0 -99
- package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js +0 -133
- package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +0 -59
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +0 -378
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +0 -420
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +0 -392
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +0 -147
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementTokenTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +0 -101
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js.map +0 -1
- package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js +0 -149
- package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js.map +0 -1
- package/lib/test/Integration/Services/CheckServiceTest.js.map +0 -1
- package/lib/test/Integration/Services/CreditServiceTest.js.map +0 -1
- package/lib/test/Integration/Services/DebitServiceTest.js.map +0 -1
- package/lib/test/Integration/Services/EBTServiceTest.js.map +0 -1
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +0 -111
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +0 -1
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +0 -62
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +0 -1
- package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +0 -1
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +0 -125
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +0 -1
- /package/lib/test/Integration/Gateways/GpApiConnector/{3DS2Test.d.ts → 3DS2.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{3DSecureTest.d.ts → 3DSecure.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{AccessTokenTest.d.ts → AccessToken.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{CreditCardNotPresentTest.d.ts → CreditCardNotPresent.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{CreditCardPresentTest.d.ts → DebitCard.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{DebitCardTest.d.ts → GpApiCertification.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{GpApiCertificationTest.d.ts → GpApiTokenManagement.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{GpApiTokenManagementTest.d.ts → ReportingDeposits.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingDepositsTest.d.ts → ReportingDisputes.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingSettlementTransactionsTest.d.ts → ReportingSettlementTransactions.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingStoredPaymentMethodsTest.d.ts → ReportingStoredPaymentMethods.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingTransactionsTest.d.ts → ReportingTransactions.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AuthTest.d.ts → Auth.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AvsTest.d.ts → Avs.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{HoldTest.d.ts → Hold.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/{HppTest.d.ts → Hpp.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/GpEcomConnector/{RecurringTest.d.ts → Recurring.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{AchTest.d.ts → Ach.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{CheckTest.d.ts → Check.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceCheckTest.d.ts → Ecommerce.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceTest.d.ts → EcommerceCheck.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoCheckTest.d.ts → Moto.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoTest.d.ts → MotoCheck.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{RecurringTest.d.ts → Recurring.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{RetailTest.d.ts → Retail.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{DebitTest.d.ts → Debit.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{EbtTest.d.ts → Ebt.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{EcommerceTest.d.ts → Ecommerce.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{GiftTest.d.ts → Gift.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{PorticoManagementTokenTest.d.ts → PorticoManagementToken.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{RecurringTest.d.ts → Recurring.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/PorticoConnector/{ReportingTest.d.ts → Reporting.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{GetInformationCertificationTest.d.ts → GetInformationCertification.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayAccountCertificationTest.d.ts → ProPayAccountCertification.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayFundCertificationTest.d.ts → ProPayFundCertification.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayInNetworkTransactionCertificationTest.d.ts → ProPayInNetworkTransactionCertification.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/{GetInformationTest.d.ts → GetInformation.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/{ProPayAccountTest.d.ts → ProPayAccount.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/{ProPayFundsTest.d.ts → ProPayFunds.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/ProPayConnector/{ProPayInNetworkTransactionTest.d.ts → ProPayInNetworkTransaction.test.d.ts} +0 -0
- /package/lib/test/Integration/Gateways/Terminals/UPA/{UpaMicTest.d.ts → UpaMic.test.d.ts} +0 -0
- /package/lib/test/Integration/Services/{CheckServiceTest.d.ts → CheckService.test.d.ts} +0 -0
- /package/lib/test/Integration/Services/{CreditServiceTest.d.ts → CreditService.test.d.ts} +0 -0
- /package/lib/test/Integration/Services/{DebitServiceTest.d.ts → DebitService.test.d.ts} +0 -0
- /package/lib/test/Integration/Services/{EBTServiceTest.d.ts → EBTService.test.d.ts} +0 -0
- /package/lib/test/Unit/Builders/AuthorizationBuilder/{ValidationTest.d.ts → Validation.test.d.ts} +0 -0
- /package/lib/test/Unit/Builders/ReportBuilder/{ValidationTest.d.ts → Validation.test.d.ts} +0 -0
- /package/lib/test/Unit/Gateways/GpEcomConnector/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
- /package/lib/test/Unit/Gateways/PorticoConnector/{InputValidationTest.d.ts → InputValidation.test.d.ts} +0 -0
|
@@ -1,37 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const Data_1 = require("../../../../Data/");
|
|
3
|
+
const src_1 = require("../../../../../src");
|
|
4
|
+
const Data_1 = require("../../../../Data");
|
|
9
5
|
const config = new src_1.PorticoConfig();
|
|
10
6
|
config.secretApiKey = "skapi_cert_MaePAQBr-1QAqjfckFC8FTbRTT120bVQUlfVOjgCBw";
|
|
11
7
|
const BATCH_NOT_OPEN = "Transaction was rejected because it requires a batch to be open.";
|
|
12
8
|
const BATCH_EMPTY = "Batch close was rejected because no transactions are associated with the currently open batch";
|
|
13
|
-
const runSerially = false;
|
|
14
|
-
const test = runSerially ? ava_1.default.serial : ava_1.default;
|
|
15
9
|
const useTokens = false;
|
|
16
10
|
let visaToken = "";
|
|
17
11
|
let masterCardToken = "";
|
|
18
12
|
let discoverToken = "";
|
|
19
13
|
let amexToken = "";
|
|
20
|
-
|
|
14
|
+
beforeAll(() => {
|
|
21
15
|
src_1.ServicesContainer.configureService(config);
|
|
22
16
|
});
|
|
23
|
-
|
|
24
|
-
t.plan(1);
|
|
17
|
+
beforeAll(() => {
|
|
25
18
|
return new Promise((resolve, reject) => {
|
|
26
19
|
src_1.BatchService.closeBatch()
|
|
27
20
|
.then((response) => {
|
|
28
|
-
|
|
21
|
+
expect(response).toBeTruthy();
|
|
29
22
|
resolve();
|
|
30
23
|
})
|
|
31
24
|
.catch((e) => {
|
|
32
25
|
if (e.message.indexOf(BATCH_NOT_OPEN) !== -1 ||
|
|
33
26
|
e.message.indexOf(BATCH_EMPTY) !== -1) {
|
|
34
|
-
t.pass();
|
|
35
27
|
resolve();
|
|
36
28
|
return;
|
|
37
29
|
}
|
|
@@ -42,8 +34,7 @@ test.before("000 - close batch", (t) => {
|
|
|
42
34
|
/// CREDIT CARD FUNCTIONS
|
|
43
35
|
/// CARD VERIFY
|
|
44
36
|
/// ACCOUNT VERIFICATION
|
|
45
|
-
test("001 - card verify visa", (
|
|
46
|
-
t.plan(5);
|
|
37
|
+
test("001 - card verify visa", () => {
|
|
47
38
|
const card = Data_1.TestCards.visaSwipeEncrypted();
|
|
48
39
|
return card
|
|
49
40
|
.verify()
|
|
@@ -51,16 +42,16 @@ test("001 - card verify visa", (t) => {
|
|
|
51
42
|
.withRequestMultiUseToken(useTokens)
|
|
52
43
|
.execute()
|
|
53
44
|
.then((response) => {
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
expect(response).toBeTruthy();
|
|
46
|
+
expect(response.responseCode).toBe("00");
|
|
56
47
|
return response;
|
|
57
48
|
})
|
|
58
49
|
.then((response) => {
|
|
59
50
|
if (!useTokens) {
|
|
60
|
-
|
|
51
|
+
expect.assertions(2);
|
|
61
52
|
return;
|
|
62
53
|
}
|
|
63
|
-
|
|
54
|
+
expect(response.token).toBeTruthy();
|
|
64
55
|
const token = new src_1.CreditCardData();
|
|
65
56
|
token.token = response.token;
|
|
66
57
|
return token
|
|
@@ -68,13 +59,12 @@ test("001 - card verify visa", (t) => {
|
|
|
68
59
|
.withAllowDuplicates(true)
|
|
69
60
|
.execute()
|
|
70
61
|
.then((chargeResponse) => {
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
expect(chargeResponse).toBeTruthy();
|
|
63
|
+
expect(chargeResponse.responseCode).toBe("00");
|
|
73
64
|
});
|
|
74
65
|
});
|
|
75
66
|
});
|
|
76
|
-
test("002 - card verify mastercard", (
|
|
77
|
-
t.plan(5);
|
|
67
|
+
test("002 - card verify mastercard", () => {
|
|
78
68
|
const card = Data_1.TestCards.masterCardSwipeEncrypted();
|
|
79
69
|
return card
|
|
80
70
|
.verify()
|
|
@@ -82,16 +72,16 @@ test("002 - card verify mastercard", (t) => {
|
|
|
82
72
|
.withRequestMultiUseToken(useTokens)
|
|
83
73
|
.execute()
|
|
84
74
|
.then((response) => {
|
|
85
|
-
|
|
86
|
-
|
|
75
|
+
expect(response).toBeTruthy();
|
|
76
|
+
expect(response.responseCode).toBe("00");
|
|
87
77
|
return response;
|
|
88
78
|
})
|
|
89
79
|
.then((response) => {
|
|
90
80
|
if (!useTokens) {
|
|
91
|
-
|
|
81
|
+
expect.assertions(2);
|
|
92
82
|
return;
|
|
93
83
|
}
|
|
94
|
-
|
|
84
|
+
expect(response.token).toBeTruthy();
|
|
95
85
|
const token = new src_1.CreditCardData();
|
|
96
86
|
token.token = response.token;
|
|
97
87
|
return token
|
|
@@ -99,13 +89,12 @@ test("002 - card verify mastercard", (t) => {
|
|
|
99
89
|
.withAllowDuplicates(true)
|
|
100
90
|
.execute()
|
|
101
91
|
.then((chargeResponse) => {
|
|
102
|
-
|
|
103
|
-
|
|
92
|
+
expect(chargeResponse).toBeTruthy();
|
|
93
|
+
expect(chargeResponse.responseCode).toBe("00");
|
|
104
94
|
});
|
|
105
95
|
});
|
|
106
96
|
});
|
|
107
|
-
test("003 - card verify discover", (
|
|
108
|
-
t.plan(5);
|
|
97
|
+
test("003 - card verify discover", () => {
|
|
109
98
|
const card = Data_1.TestCards.discoverSwipeEncrypted();
|
|
110
99
|
return card
|
|
111
100
|
.verify()
|
|
@@ -113,16 +102,16 @@ test("003 - card verify discover", (t) => {
|
|
|
113
102
|
.withRequestMultiUseToken(useTokens)
|
|
114
103
|
.execute()
|
|
115
104
|
.then((response) => {
|
|
116
|
-
|
|
117
|
-
|
|
105
|
+
expect(response).toBeTruthy();
|
|
106
|
+
expect(response.responseCode).toBe("00");
|
|
118
107
|
return response;
|
|
119
108
|
})
|
|
120
109
|
.then((response) => {
|
|
121
110
|
if (!useTokens) {
|
|
122
|
-
|
|
111
|
+
expect.assertions(2);
|
|
123
112
|
return;
|
|
124
113
|
}
|
|
125
|
-
|
|
114
|
+
expect(response.token).toBeTruthy();
|
|
126
115
|
const token = new src_1.CreditCardData();
|
|
127
116
|
token.token = response.token;
|
|
128
117
|
return token
|
|
@@ -130,14 +119,13 @@ test("003 - card verify discover", (t) => {
|
|
|
130
119
|
.withAllowDuplicates(true)
|
|
131
120
|
.execute()
|
|
132
121
|
.then((chargeResponse) => {
|
|
133
|
-
|
|
134
|
-
|
|
122
|
+
expect(chargeResponse).toBeTruthy();
|
|
123
|
+
expect(chargeResponse.responseCode).toBe("00");
|
|
135
124
|
});
|
|
136
125
|
});
|
|
137
126
|
});
|
|
138
127
|
/// Address Verification
|
|
139
|
-
test("004 - card verify amex", (
|
|
140
|
-
t.plan(5);
|
|
128
|
+
test("004 - card verify amex", () => {
|
|
141
129
|
const address = new src_1.Address();
|
|
142
130
|
address.postalCode = "75024";
|
|
143
131
|
const card = Data_1.TestCards.amexManual(false, true);
|
|
@@ -148,16 +136,15 @@ test("004 - card verify amex", (t) => {
|
|
|
148
136
|
.withRequestMultiUseToken(useTokens)
|
|
149
137
|
.execute()
|
|
150
138
|
.then((response) => {
|
|
151
|
-
|
|
152
|
-
|
|
139
|
+
expect(response).toBeTruthy();
|
|
140
|
+
expect(response.responseCode).toBe("00");
|
|
153
141
|
return response;
|
|
154
142
|
})
|
|
155
143
|
.then((response) => {
|
|
156
144
|
if (!useTokens) {
|
|
157
|
-
t.plan(2);
|
|
158
145
|
return;
|
|
159
146
|
}
|
|
160
|
-
|
|
147
|
+
expect(response.token).toBeTruthy();
|
|
161
148
|
const token = new src_1.CreditCardData();
|
|
162
149
|
token.token = response.token;
|
|
163
150
|
return token
|
|
@@ -165,26 +152,24 @@ test("004 - card verify amex", (t) => {
|
|
|
165
152
|
.withAllowDuplicates(true)
|
|
166
153
|
.execute()
|
|
167
154
|
.then((chargeResponse) => {
|
|
168
|
-
|
|
169
|
-
|
|
155
|
+
expect(chargeResponse).toBeTruthy();
|
|
156
|
+
expect(chargeResponse.responseCode).toBe("00");
|
|
170
157
|
});
|
|
171
158
|
});
|
|
172
159
|
});
|
|
173
160
|
/// Balance Inquiry (for Prepaid)
|
|
174
|
-
test("005 - balance inquiry visa", (
|
|
175
|
-
t.plan(2);
|
|
161
|
+
test("005 - balance inquiry visa", () => {
|
|
176
162
|
const card = Data_1.TestCards.visaSwipeEncrypted();
|
|
177
163
|
return card
|
|
178
164
|
.balanceInquiry()
|
|
179
165
|
.execute()
|
|
180
166
|
.then((response) => {
|
|
181
|
-
|
|
182
|
-
|
|
167
|
+
expect(response).toBeTruthy();
|
|
168
|
+
expect(response.responseCode).toBe("00");
|
|
183
169
|
});
|
|
184
170
|
});
|
|
185
171
|
/// CREDIT SALE (for multi-use token only)
|
|
186
|
-
test("006 - charge visa swipe token", (
|
|
187
|
-
t.plan(2);
|
|
172
|
+
test("006 - charge visa swipe token", () => {
|
|
188
173
|
const card = Data_1.TestCards.visaSwipe();
|
|
189
174
|
return card
|
|
190
175
|
.charge(15.01)
|
|
@@ -193,13 +178,12 @@ test("006 - charge visa swipe token", (t) => {
|
|
|
193
178
|
.withAllowDuplicates(true)
|
|
194
179
|
.execute()
|
|
195
180
|
.then((response) => {
|
|
196
|
-
|
|
197
|
-
|
|
181
|
+
expect(response).toBeTruthy();
|
|
182
|
+
expect(response.responseCode).toBe("00");
|
|
198
183
|
visaToken = response.token;
|
|
199
184
|
});
|
|
200
185
|
});
|
|
201
|
-
test("007 - charge mastercard swipe token", (
|
|
202
|
-
t.plan(2);
|
|
186
|
+
test("007 - charge mastercard swipe token", () => {
|
|
203
187
|
const card = Data_1.TestCards.masterCardSwipe();
|
|
204
188
|
return card
|
|
205
189
|
.charge(15.02)
|
|
@@ -208,13 +192,12 @@ test("007 - charge mastercard swipe token", (t) => {
|
|
|
208
192
|
.withAllowDuplicates(true)
|
|
209
193
|
.execute()
|
|
210
194
|
.then((response) => {
|
|
211
|
-
|
|
212
|
-
|
|
195
|
+
expect(response).toBeTruthy();
|
|
196
|
+
expect(response.responseCode).toBe("00");
|
|
213
197
|
masterCardToken = response.token;
|
|
214
198
|
});
|
|
215
199
|
});
|
|
216
|
-
test("008 - charge discover swipe token", (
|
|
217
|
-
t.plan(2);
|
|
200
|
+
test("008 - charge discover swipe token", () => {
|
|
218
201
|
const card = Data_1.TestCards.discoverSwipe();
|
|
219
202
|
return card
|
|
220
203
|
.charge(15.03)
|
|
@@ -223,13 +206,12 @@ test("008 - charge discover swipe token", (t) => {
|
|
|
223
206
|
.withAllowDuplicates(true)
|
|
224
207
|
.execute()
|
|
225
208
|
.then((response) => {
|
|
226
|
-
|
|
227
|
-
|
|
209
|
+
expect(response).toBeTruthy();
|
|
210
|
+
expect(response.responseCode).toBe("00");
|
|
228
211
|
discoverToken = response.token;
|
|
229
212
|
});
|
|
230
213
|
});
|
|
231
|
-
test("009 - charge amex swipe token", (
|
|
232
|
-
t.plan(2);
|
|
214
|
+
test("009 - charge amex swipe token", () => {
|
|
233
215
|
const card = Data_1.TestCards.amexSwipe();
|
|
234
216
|
return card
|
|
235
217
|
.charge(15.04)
|
|
@@ -238,15 +220,14 @@ test("009 - charge amex swipe token", (t) => {
|
|
|
238
220
|
.withAllowDuplicates(true)
|
|
239
221
|
.execute()
|
|
240
222
|
.then((response) => {
|
|
241
|
-
|
|
242
|
-
|
|
223
|
+
expect(response).toBeTruthy();
|
|
224
|
+
expect(response.responseCode).toBe("00");
|
|
243
225
|
amexToken = response.token;
|
|
244
226
|
});
|
|
245
227
|
});
|
|
246
228
|
/// CREDIT SALE
|
|
247
229
|
/// SWIPED
|
|
248
|
-
test("010 - charge visa swipe", (
|
|
249
|
-
t.plan(4);
|
|
230
|
+
test.skip("010 - charge visa swipe", () => {
|
|
250
231
|
const card = Data_1.TestCards.visaSwipe();
|
|
251
232
|
return card
|
|
252
233
|
.charge(15.01)
|
|
@@ -254,8 +235,8 @@ test("010 - charge visa swipe", (t) => {
|
|
|
254
235
|
.withAllowDuplicates(true)
|
|
255
236
|
.execute()
|
|
256
237
|
.then((response) => {
|
|
257
|
-
|
|
258
|
-
|
|
238
|
+
expect(response).toBeTruthy();
|
|
239
|
+
expect(response.responseCode).toBe("00");
|
|
259
240
|
return response;
|
|
260
241
|
})
|
|
261
242
|
.then((response) => {
|
|
@@ -265,13 +246,12 @@ test("010 - charge visa swipe", (t) => {
|
|
|
265
246
|
// .withAllowDuplicates(true)
|
|
266
247
|
.execute()
|
|
267
248
|
.then((reverseResponse) => {
|
|
268
|
-
|
|
269
|
-
|
|
249
|
+
expect(reverseResponse).toBeTruthy();
|
|
250
|
+
expect(reverseResponse.responseCode).toBe("00");
|
|
270
251
|
}));
|
|
271
252
|
});
|
|
272
253
|
});
|
|
273
|
-
test("011 - charge mastercard swipe", (
|
|
274
|
-
t.plan(2);
|
|
254
|
+
test("011 - charge mastercard swipe", () => {
|
|
275
255
|
const card = Data_1.TestCards.masterCardSwipe();
|
|
276
256
|
return card
|
|
277
257
|
.charge(15.02)
|
|
@@ -279,12 +259,11 @@ test("011 - charge mastercard swipe", (t) => {
|
|
|
279
259
|
.withAllowDuplicates(true)
|
|
280
260
|
.execute()
|
|
281
261
|
.then((response) => {
|
|
282
|
-
|
|
283
|
-
|
|
262
|
+
expect(response).toBeTruthy();
|
|
263
|
+
expect(response.responseCode).toBe("00");
|
|
284
264
|
});
|
|
285
265
|
});
|
|
286
|
-
test("012 - charge discover swipe", (
|
|
287
|
-
t.plan(2);
|
|
266
|
+
test("012 - charge discover swipe", () => {
|
|
288
267
|
const card = Data_1.TestCards.discoverSwipe();
|
|
289
268
|
return card
|
|
290
269
|
.charge(15.02)
|
|
@@ -292,12 +271,11 @@ test("012 - charge discover swipe", (t) => {
|
|
|
292
271
|
.withAllowDuplicates(true)
|
|
293
272
|
.execute()
|
|
294
273
|
.then((response) => {
|
|
295
|
-
|
|
296
|
-
|
|
274
|
+
expect(response).toBeTruthy();
|
|
275
|
+
expect(response.responseCode).toBe("00");
|
|
297
276
|
});
|
|
298
277
|
});
|
|
299
|
-
test("013 - charge amex swipe", (
|
|
300
|
-
t.plan(2);
|
|
278
|
+
test("013 - charge amex swipe", () => {
|
|
301
279
|
const card = Data_1.TestCards.amexSwipe();
|
|
302
280
|
return card
|
|
303
281
|
.charge(15.02)
|
|
@@ -305,12 +283,11 @@ test("013 - charge amex swipe", (t) => {
|
|
|
305
283
|
.withAllowDuplicates(true)
|
|
306
284
|
.execute()
|
|
307
285
|
.then((response) => {
|
|
308
|
-
|
|
309
|
-
|
|
286
|
+
expect(response).toBeTruthy();
|
|
287
|
+
expect(response.responseCode).toBe("00");
|
|
310
288
|
});
|
|
311
289
|
});
|
|
312
|
-
test("014 - charge jcb swipe", (
|
|
313
|
-
t.plan(4);
|
|
290
|
+
test.skip("014 - charge jcb swipe", () => {
|
|
314
291
|
const card = Data_1.TestCards.visaSwipe();
|
|
315
292
|
return card
|
|
316
293
|
.charge(15.05)
|
|
@@ -318,8 +295,8 @@ test("014 - charge jcb swipe", (t) => {
|
|
|
318
295
|
.withAllowDuplicates(true)
|
|
319
296
|
.execute()
|
|
320
297
|
.then((response) => {
|
|
321
|
-
|
|
322
|
-
|
|
298
|
+
expect(response).toBeTruthy();
|
|
299
|
+
expect(response.responseCode).toBe("00");
|
|
323
300
|
return response;
|
|
324
301
|
})
|
|
325
302
|
.then((response) => {
|
|
@@ -330,13 +307,12 @@ test("014 - charge jcb swipe", (t) => {
|
|
|
330
307
|
.withCurrency("USD")
|
|
331
308
|
.execute()
|
|
332
309
|
.then((refundResponse) => {
|
|
333
|
-
|
|
334
|
-
|
|
310
|
+
expect(refundResponse).toBeTruthy();
|
|
311
|
+
expect(refundResponse.responseCode).toBe("00");
|
|
335
312
|
}));
|
|
336
313
|
});
|
|
337
314
|
});
|
|
338
|
-
test("014a - charge mastercard 24 swipe", (
|
|
339
|
-
t.plan(2);
|
|
315
|
+
test("014a - charge mastercard 24 swipe", () => {
|
|
340
316
|
const card = Data_1.TestCards.masterCard24Swipe();
|
|
341
317
|
return card
|
|
342
318
|
.charge(15.34)
|
|
@@ -344,12 +320,11 @@ test("014a - charge mastercard 24 swipe", (t) => {
|
|
|
344
320
|
.withAllowDuplicates(true)
|
|
345
321
|
.execute()
|
|
346
322
|
.then((response) => {
|
|
347
|
-
|
|
348
|
-
|
|
323
|
+
expect(response).toBeTruthy();
|
|
324
|
+
expect(response.responseCode).toBe("00");
|
|
349
325
|
});
|
|
350
326
|
});
|
|
351
|
-
test("014b - charge mastercard 25 swipe", (
|
|
352
|
-
t.plan(2);
|
|
327
|
+
test("014b - charge mastercard 25 swipe", () => {
|
|
353
328
|
const card = Data_1.TestCards.masterCard25Swipe();
|
|
354
329
|
return card
|
|
355
330
|
.charge(15.34)
|
|
@@ -357,12 +332,11 @@ test("014b - charge mastercard 25 swipe", (t) => {
|
|
|
357
332
|
.withAllowDuplicates(true)
|
|
358
333
|
.execute()
|
|
359
334
|
.then((response) => {
|
|
360
|
-
|
|
361
|
-
|
|
335
|
+
expect(response).toBeTruthy();
|
|
336
|
+
expect(response.responseCode).toBe("00");
|
|
362
337
|
});
|
|
363
338
|
});
|
|
364
|
-
test("015 - charge visa swipe", (
|
|
365
|
-
t.plan(4);
|
|
339
|
+
test.skip("015 - charge visa swipe", () => {
|
|
366
340
|
const card = Data_1.TestCards.visaSwipe();
|
|
367
341
|
return card
|
|
368
342
|
.charge(15.06)
|
|
@@ -370,8 +344,8 @@ test("015 - charge visa swipe", (t) => {
|
|
|
370
344
|
.withAllowDuplicates(true)
|
|
371
345
|
.execute()
|
|
372
346
|
.then((response) => {
|
|
373
|
-
|
|
374
|
-
|
|
347
|
+
expect(response).toBeTruthy();
|
|
348
|
+
expect(response.responseCode).toBe("00");
|
|
375
349
|
return response;
|
|
376
350
|
})
|
|
377
351
|
.then((response) => {
|
|
@@ -382,14 +356,13 @@ test("015 - charge visa swipe", (t) => {
|
|
|
382
356
|
.withAuthAmount(5.06)
|
|
383
357
|
.execute()
|
|
384
358
|
.then((reverseResponse) => {
|
|
385
|
-
|
|
386
|
-
|
|
359
|
+
expect(reverseResponse).toBeTruthy();
|
|
360
|
+
expect(reverseResponse.responseCode).toBe("00");
|
|
387
361
|
}));
|
|
388
362
|
});
|
|
389
363
|
});
|
|
390
364
|
/// Manually Entered - Card Present
|
|
391
|
-
test("016 - charge visa manual card present", (
|
|
392
|
-
t.plan(2);
|
|
365
|
+
test("016 - charge visa manual card present", () => {
|
|
393
366
|
const address = new src_1.Address();
|
|
394
367
|
address.postalCode = "750241234";
|
|
395
368
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -401,12 +374,11 @@ test("016 - charge visa manual card present", (t) => {
|
|
|
401
374
|
.withAddress(address)
|
|
402
375
|
.execute()
|
|
403
376
|
.then((response) => {
|
|
404
|
-
|
|
405
|
-
|
|
377
|
+
expect(response).toBeTruthy();
|
|
378
|
+
expect(response.responseCode).toBe("00");
|
|
406
379
|
});
|
|
407
380
|
});
|
|
408
|
-
test("017 - charge mastercard manual card present", (
|
|
409
|
-
t.plan(4);
|
|
381
|
+
test.skip("017 - charge mastercard manual card present", () => {
|
|
410
382
|
const address = new src_1.Address();
|
|
411
383
|
address.postalCode = "75024";
|
|
412
384
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -418,8 +390,8 @@ test("017 - charge mastercard manual card present", (t) => {
|
|
|
418
390
|
.withAddress(address)
|
|
419
391
|
.execute()
|
|
420
392
|
.then((response) => {
|
|
421
|
-
|
|
422
|
-
|
|
393
|
+
expect(response).toBeTruthy();
|
|
394
|
+
expect(response.responseCode).toBe("00");
|
|
423
395
|
return response;
|
|
424
396
|
})
|
|
425
397
|
.then((response) => {
|
|
@@ -429,13 +401,12 @@ test("017 - charge mastercard manual card present", (t) => {
|
|
|
429
401
|
// .withAllowDuplicates(true)
|
|
430
402
|
.execute()
|
|
431
403
|
.then((reverseResponse) => {
|
|
432
|
-
|
|
433
|
-
|
|
404
|
+
expect(reverseResponse).toBeTruthy();
|
|
405
|
+
expect(reverseResponse.responseCode).toBe("00");
|
|
434
406
|
}));
|
|
435
407
|
});
|
|
436
408
|
});
|
|
437
|
-
test("018 - charge discover manual card present", (
|
|
438
|
-
t.plan(2);
|
|
409
|
+
test("018 - charge discover manual card present", () => {
|
|
439
410
|
const address = new src_1.Address();
|
|
440
411
|
address.postalCode = "750241234";
|
|
441
412
|
const card = Data_1.TestCards.discoverManual(true, true);
|
|
@@ -446,12 +417,11 @@ test("018 - charge discover manual card present", (t) => {
|
|
|
446
417
|
.withAddress(address)
|
|
447
418
|
.execute()
|
|
448
419
|
.then((response) => {
|
|
449
|
-
|
|
450
|
-
|
|
420
|
+
expect(response).toBeTruthy();
|
|
421
|
+
expect(response.responseCode).toBe("00");
|
|
451
422
|
});
|
|
452
423
|
});
|
|
453
|
-
test("019 - charge amex manual card present", (
|
|
454
|
-
t.plan(2);
|
|
424
|
+
test("019 - charge amex manual card present", () => {
|
|
455
425
|
const address = new src_1.Address();
|
|
456
426
|
address.postalCode = "75024";
|
|
457
427
|
address.streetAddress1 = "6860";
|
|
@@ -463,12 +433,11 @@ test("019 - charge amex manual card present", (t) => {
|
|
|
463
433
|
.withAddress(address)
|
|
464
434
|
.execute()
|
|
465
435
|
.then((response) => {
|
|
466
|
-
|
|
467
|
-
|
|
436
|
+
expect(response).toBeTruthy();
|
|
437
|
+
expect(response.responseCode).toBe("00");
|
|
468
438
|
});
|
|
469
439
|
});
|
|
470
|
-
test("020 - charge jcb manual card present", (
|
|
471
|
-
t.plan(2);
|
|
440
|
+
test("020 - charge jcb manual card present", () => {
|
|
472
441
|
const address = new src_1.Address();
|
|
473
442
|
address.postalCode = "75024";
|
|
474
443
|
const card = Data_1.TestCards.jcbManual(true, true);
|
|
@@ -479,12 +448,11 @@ test("020 - charge jcb manual card present", (t) => {
|
|
|
479
448
|
.withAddress(address)
|
|
480
449
|
.execute()
|
|
481
450
|
.then((response) => {
|
|
482
|
-
|
|
483
|
-
|
|
451
|
+
expect(response).toBeTruthy();
|
|
452
|
+
expect(response.responseCode).toBe("00");
|
|
484
453
|
});
|
|
485
454
|
});
|
|
486
|
-
test("021 - charge discover manual card present", (
|
|
487
|
-
t.plan(4);
|
|
455
|
+
test.skip("021 - charge discover manual card present", () => {
|
|
488
456
|
const address = new src_1.Address();
|
|
489
457
|
address.postalCode = "750241234";
|
|
490
458
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -496,8 +464,8 @@ test("021 - charge discover manual card present", (t) => {
|
|
|
496
464
|
.withAddress(address)
|
|
497
465
|
.execute()
|
|
498
466
|
.then((response) => {
|
|
499
|
-
|
|
500
|
-
|
|
467
|
+
expect(response).toBeTruthy();
|
|
468
|
+
expect(response.responseCode).toBe("00");
|
|
501
469
|
return response;
|
|
502
470
|
})
|
|
503
471
|
.then((response) => {
|
|
@@ -508,14 +476,13 @@ test("021 - charge discover manual card present", (t) => {
|
|
|
508
476
|
.withAuthAmount(6.07)
|
|
509
477
|
.execute()
|
|
510
478
|
.then((reverseResponse) => {
|
|
511
|
-
|
|
512
|
-
|
|
479
|
+
expect(reverseResponse).toBeTruthy();
|
|
480
|
+
expect(reverseResponse.responseCode).toBe("00");
|
|
513
481
|
}));
|
|
514
482
|
});
|
|
515
483
|
});
|
|
516
484
|
/// Manually Entered - Card Not Present
|
|
517
|
-
test("022 - charge visa manual card not present", (
|
|
518
|
-
t.plan(2);
|
|
485
|
+
test("022 - charge visa manual card not present", () => {
|
|
519
486
|
const address = new src_1.Address();
|
|
520
487
|
address.postalCode = "750241234";
|
|
521
488
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -534,12 +501,11 @@ test("022 - charge visa manual card not present", (t) => {
|
|
|
534
501
|
.withAddress(address)
|
|
535
502
|
.execute()
|
|
536
503
|
.then((response) => {
|
|
537
|
-
|
|
538
|
-
|
|
504
|
+
expect(response).toBeTruthy();
|
|
505
|
+
expect(response.responseCode).toBe("00");
|
|
539
506
|
});
|
|
540
507
|
});
|
|
541
|
-
test("023 - charge mastercard manual card not present", (
|
|
542
|
-
t.plan(4);
|
|
508
|
+
test.skip("023 - charge mastercard manual card not present", () => {
|
|
543
509
|
const address = new src_1.Address();
|
|
544
510
|
address.postalCode = "75024";
|
|
545
511
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -558,8 +524,8 @@ test("023 - charge mastercard manual card not present", (t) => {
|
|
|
558
524
|
.withAddress(address)
|
|
559
525
|
.execute()
|
|
560
526
|
.then((response) => {
|
|
561
|
-
|
|
562
|
-
|
|
527
|
+
expect(response).toBeTruthy();
|
|
528
|
+
expect(response.responseCode).toBe("00");
|
|
563
529
|
return response;
|
|
564
530
|
})
|
|
565
531
|
.then((response) => {
|
|
@@ -569,13 +535,12 @@ test("023 - charge mastercard manual card not present", (t) => {
|
|
|
569
535
|
// .withAllowDuplicates(true)
|
|
570
536
|
.execute()
|
|
571
537
|
.then((reverseResponse) => {
|
|
572
|
-
|
|
573
|
-
|
|
538
|
+
expect(reverseResponse).toBeTruthy();
|
|
539
|
+
expect(reverseResponse.responseCode).toBe("00");
|
|
574
540
|
}));
|
|
575
541
|
});
|
|
576
542
|
});
|
|
577
|
-
test("024 - charge discover manual card not present", (
|
|
578
|
-
t.plan(2);
|
|
543
|
+
test("024 - charge discover manual card not present", () => {
|
|
579
544
|
const address = new src_1.Address();
|
|
580
545
|
address.postalCode = "750241234";
|
|
581
546
|
let card;
|
|
@@ -593,12 +558,11 @@ test("024 - charge discover manual card not present", (t) => {
|
|
|
593
558
|
.withAddress(address)
|
|
594
559
|
.execute()
|
|
595
560
|
.then((response) => {
|
|
596
|
-
|
|
597
|
-
|
|
561
|
+
expect(response).toBeTruthy();
|
|
562
|
+
expect(response.responseCode).toBe("00");
|
|
598
563
|
});
|
|
599
564
|
});
|
|
600
|
-
test("025 - charge amex manual card not present", (
|
|
601
|
-
t.plan(2);
|
|
565
|
+
test("025 - charge amex manual card not present", () => {
|
|
602
566
|
const address = new src_1.Address();
|
|
603
567
|
address.postalCode = "75024";
|
|
604
568
|
address.streetAddress1 = "6860";
|
|
@@ -617,12 +581,11 @@ test("025 - charge amex manual card not present", (t) => {
|
|
|
617
581
|
.withAddress(address)
|
|
618
582
|
.execute()
|
|
619
583
|
.then((response) => {
|
|
620
|
-
|
|
621
|
-
|
|
584
|
+
expect(response).toBeTruthy();
|
|
585
|
+
expect(response.responseCode).toBe("00");
|
|
622
586
|
});
|
|
623
587
|
});
|
|
624
|
-
test("026 - charge jcb manual card not present", (
|
|
625
|
-
t.plan(2);
|
|
588
|
+
test("026 - charge jcb manual card not present", () => {
|
|
626
589
|
const address = new src_1.Address();
|
|
627
590
|
address.postalCode = "75024";
|
|
628
591
|
const card = Data_1.TestCards.jcbManual(false, true);
|
|
@@ -633,13 +596,12 @@ test("026 - charge jcb manual card not present", (t) => {
|
|
|
633
596
|
.withAddress(address)
|
|
634
597
|
.execute()
|
|
635
598
|
.then((response) => {
|
|
636
|
-
|
|
637
|
-
|
|
599
|
+
expect(response).toBeTruthy();
|
|
600
|
+
expect(response.responseCode).toBe("00");
|
|
638
601
|
});
|
|
639
602
|
});
|
|
640
603
|
/// Contactless
|
|
641
|
-
test("027 - charge visa contactless", (
|
|
642
|
-
t.plan(2);
|
|
604
|
+
test("027 - charge visa contactless", () => {
|
|
643
605
|
const card = Data_1.TestCards.visaSwipe(src_1.EntryMethod.Proximity);
|
|
644
606
|
return card
|
|
645
607
|
.charge(18.01)
|
|
@@ -647,12 +609,11 @@ test("027 - charge visa contactless", (t) => {
|
|
|
647
609
|
.withCurrency("USD")
|
|
648
610
|
.execute()
|
|
649
611
|
.then((response) => {
|
|
650
|
-
|
|
651
|
-
|
|
612
|
+
expect(response).toBeTruthy();
|
|
613
|
+
expect(response.responseCode).toBe("00");
|
|
652
614
|
});
|
|
653
615
|
});
|
|
654
|
-
test("028 - charge mastercard contactless", (
|
|
655
|
-
t.plan(2);
|
|
616
|
+
test("028 - charge mastercard contactless", () => {
|
|
656
617
|
const card = Data_1.TestCards.masterCardSwipe(src_1.EntryMethod.Proximity);
|
|
657
618
|
return card
|
|
658
619
|
.charge(18.02)
|
|
@@ -660,12 +621,11 @@ test("028 - charge mastercard contactless", (t) => {
|
|
|
660
621
|
.withCurrency("USD")
|
|
661
622
|
.execute()
|
|
662
623
|
.then((response) => {
|
|
663
|
-
|
|
664
|
-
|
|
624
|
+
expect(response).toBeTruthy();
|
|
625
|
+
expect(response.responseCode).toBe("00");
|
|
665
626
|
});
|
|
666
627
|
});
|
|
667
|
-
test("029 - charge discover contactless", (
|
|
668
|
-
t.plan(2);
|
|
628
|
+
test("029 - charge discover contactless", () => {
|
|
669
629
|
const card = Data_1.TestCards.discoverSwipe(src_1.EntryMethod.Proximity);
|
|
670
630
|
return card
|
|
671
631
|
.charge(18.03)
|
|
@@ -673,12 +633,11 @@ test("029 - charge discover contactless", (t) => {
|
|
|
673
633
|
.withCurrency("USD")
|
|
674
634
|
.execute()
|
|
675
635
|
.then((response) => {
|
|
676
|
-
|
|
677
|
-
|
|
636
|
+
expect(response).toBeTruthy();
|
|
637
|
+
expect(response.responseCode).toBe("00");
|
|
678
638
|
});
|
|
679
639
|
});
|
|
680
|
-
test("030 - charge amex contactless", (
|
|
681
|
-
t.plan(2);
|
|
640
|
+
test("030 - charge amex contactless", () => {
|
|
682
641
|
const card = Data_1.TestCards.amexSwipe(src_1.EntryMethod.Proximity);
|
|
683
642
|
return card
|
|
684
643
|
.charge(18.04)
|
|
@@ -686,13 +645,12 @@ test("030 - charge amex contactless", (t) => {
|
|
|
686
645
|
.withCurrency("USD")
|
|
687
646
|
.execute()
|
|
688
647
|
.then((response) => {
|
|
689
|
-
|
|
690
|
-
|
|
648
|
+
expect(response).toBeTruthy();
|
|
649
|
+
expect(response.responseCode).toBe("00");
|
|
691
650
|
});
|
|
692
651
|
});
|
|
693
652
|
/// AUTHORIZATION
|
|
694
|
-
test("031 - authorize visa swipe", (
|
|
695
|
-
t.plan(4);
|
|
653
|
+
test.skip("031 - authorize visa swipe", () => {
|
|
696
654
|
const card = Data_1.TestCards.visaSwipe();
|
|
697
655
|
// 031a authorize
|
|
698
656
|
return (card
|
|
@@ -701,8 +659,8 @@ test("031 - authorize visa swipe", (t) => {
|
|
|
701
659
|
.withCurrency("USD")
|
|
702
660
|
.execute()
|
|
703
661
|
.then((response) => {
|
|
704
|
-
|
|
705
|
-
|
|
662
|
+
expect(response).toBeTruthy();
|
|
663
|
+
expect(response.responseCode).toBe("00");
|
|
706
664
|
return response;
|
|
707
665
|
})
|
|
708
666
|
// 031b capture
|
|
@@ -711,13 +669,12 @@ test("031 - authorize visa swipe", (t) => {
|
|
|
711
669
|
.capture()
|
|
712
670
|
.execute()
|
|
713
671
|
.then((captureResponse) => {
|
|
714
|
-
|
|
715
|
-
|
|
672
|
+
expect(captureResponse).toBeTruthy();
|
|
673
|
+
expect(captureResponse.responseCode).toBe("00");
|
|
716
674
|
});
|
|
717
675
|
}));
|
|
718
676
|
});
|
|
719
|
-
test("032 - authorize visa swipe additional auth", (
|
|
720
|
-
t.plan(4);
|
|
677
|
+
test.skip("032 - authorize visa swipe additional auth", () => {
|
|
721
678
|
const card = Data_1.TestCards.visaSwipe();
|
|
722
679
|
// 032a authorize
|
|
723
680
|
return (card
|
|
@@ -726,8 +683,8 @@ test("032 - authorize visa swipe additional auth", (t) => {
|
|
|
726
683
|
.withCurrency("USD")
|
|
727
684
|
.execute()
|
|
728
685
|
.then((response) => {
|
|
729
|
-
|
|
730
|
-
|
|
686
|
+
expect(response).toBeTruthy();
|
|
687
|
+
expect(response.responseCode).toBe("00");
|
|
731
688
|
return response;
|
|
732
689
|
})
|
|
733
690
|
// 032b Additional Auth (restaurant only)
|
|
@@ -737,13 +694,12 @@ test("032 - authorize visa swipe additional auth", (t) => {
|
|
|
737
694
|
.capture()
|
|
738
695
|
.execute()
|
|
739
696
|
.then((captureResponse) => {
|
|
740
|
-
|
|
741
|
-
|
|
697
|
+
expect(captureResponse).toBeTruthy();
|
|
698
|
+
expect(captureResponse.responseCode).toBe("00");
|
|
742
699
|
});
|
|
743
700
|
}));
|
|
744
701
|
});
|
|
745
|
-
test("033 - authorize mastercard swipe", (
|
|
746
|
-
t.plan(4);
|
|
702
|
+
test.skip("033 - authorize mastercard swipe", () => {
|
|
747
703
|
const card = Data_1.TestCards.masterCardSwipe();
|
|
748
704
|
// 033a authorize
|
|
749
705
|
return (card
|
|
@@ -752,8 +708,8 @@ test("033 - authorize mastercard swipe", (t) => {
|
|
|
752
708
|
.withCurrency("USD")
|
|
753
709
|
.execute()
|
|
754
710
|
.then((response) => {
|
|
755
|
-
|
|
756
|
-
|
|
711
|
+
expect(response).toBeTruthy();
|
|
712
|
+
expect(response.responseCode).toBe("00");
|
|
757
713
|
return response;
|
|
758
714
|
})
|
|
759
715
|
// 033b capture
|
|
@@ -762,13 +718,12 @@ test("033 - authorize mastercard swipe", (t) => {
|
|
|
762
718
|
.capture()
|
|
763
719
|
.execute()
|
|
764
720
|
.then((captureResponse) => {
|
|
765
|
-
|
|
766
|
-
|
|
721
|
+
expect(captureResponse).toBeTruthy();
|
|
722
|
+
expect(captureResponse.responseCode).toBe("00");
|
|
767
723
|
});
|
|
768
724
|
}));
|
|
769
725
|
});
|
|
770
|
-
test("033a - authorize discover swipe", (
|
|
771
|
-
t.plan(2);
|
|
726
|
+
test("033a - authorize discover swipe", () => {
|
|
772
727
|
const card = Data_1.TestCards.discoverSwipe();
|
|
773
728
|
return card
|
|
774
729
|
.authorize(15.1)
|
|
@@ -776,13 +731,12 @@ test("033a - authorize discover swipe", (t) => {
|
|
|
776
731
|
.withAllowDuplicates(true)
|
|
777
732
|
.execute()
|
|
778
733
|
.then((response) => {
|
|
779
|
-
|
|
780
|
-
|
|
734
|
+
expect(response).toBeTruthy();
|
|
735
|
+
expect(response.responseCode).toBe("00");
|
|
781
736
|
});
|
|
782
737
|
});
|
|
783
738
|
/// AUTHORIZATION - Manually Entered, Card Present
|
|
784
|
-
test("034 - authorize visa manual card present", (
|
|
785
|
-
t.plan(4);
|
|
739
|
+
test.skip("034 - authorize visa manual card present", () => {
|
|
786
740
|
const address = new src_1.Address();
|
|
787
741
|
address.postalCode = "75024";
|
|
788
742
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -795,8 +749,8 @@ test("034 - authorize visa manual card present", (t) => {
|
|
|
795
749
|
.withAddress(address)
|
|
796
750
|
.execute()
|
|
797
751
|
.then((response) => {
|
|
798
|
-
|
|
799
|
-
|
|
752
|
+
expect(response).toBeTruthy();
|
|
753
|
+
expect(response.responseCode).toBe("00");
|
|
800
754
|
return response;
|
|
801
755
|
})
|
|
802
756
|
// 034b capture
|
|
@@ -805,13 +759,12 @@ test("034 - authorize visa manual card present", (t) => {
|
|
|
805
759
|
.capture()
|
|
806
760
|
.execute()
|
|
807
761
|
.then((captureResponse) => {
|
|
808
|
-
|
|
809
|
-
|
|
762
|
+
expect(captureResponse).toBeTruthy();
|
|
763
|
+
expect(captureResponse.responseCode).toBe("00");
|
|
810
764
|
});
|
|
811
765
|
}));
|
|
812
766
|
});
|
|
813
|
-
test("035 - authorize visa manual card present additional auth", (
|
|
814
|
-
t.plan(4);
|
|
767
|
+
test.skip("035 - authorize visa manual card present additional auth", () => {
|
|
815
768
|
const address = new src_1.Address();
|
|
816
769
|
address.postalCode = "75024";
|
|
817
770
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -824,8 +777,8 @@ test("035 - authorize visa manual card present additional auth", (t) => {
|
|
|
824
777
|
.withAddress(address)
|
|
825
778
|
.execute()
|
|
826
779
|
.then((response) => {
|
|
827
|
-
|
|
828
|
-
|
|
780
|
+
expect(response).toBeTruthy();
|
|
781
|
+
expect(response.responseCode).toBe("00");
|
|
829
782
|
return response;
|
|
830
783
|
})
|
|
831
784
|
// 035b Additional Auth (restaurant only)
|
|
@@ -835,13 +788,12 @@ test("035 - authorize visa manual card present additional auth", (t) => {
|
|
|
835
788
|
.capture()
|
|
836
789
|
.execute()
|
|
837
790
|
.then((captureResponse) => {
|
|
838
|
-
|
|
839
|
-
|
|
791
|
+
expect(captureResponse).toBeTruthy();
|
|
792
|
+
expect(captureResponse.responseCode).toBe("00");
|
|
840
793
|
});
|
|
841
794
|
}));
|
|
842
795
|
});
|
|
843
|
-
test("036 - authorize mastercard manual card present", (
|
|
844
|
-
t.plan(4);
|
|
796
|
+
test.skip("036 - authorize mastercard manual card present", () => {
|
|
845
797
|
const address = new src_1.Address();
|
|
846
798
|
address.postalCode = "75024";
|
|
847
799
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -854,8 +806,8 @@ test("036 - authorize mastercard manual card present", (t) => {
|
|
|
854
806
|
.withAddress(address)
|
|
855
807
|
.execute()
|
|
856
808
|
.then((response) => {
|
|
857
|
-
|
|
858
|
-
|
|
809
|
+
expect(response).toBeTruthy();
|
|
810
|
+
expect(response.responseCode).toBe("00");
|
|
859
811
|
return response;
|
|
860
812
|
})
|
|
861
813
|
// 036b capture
|
|
@@ -864,13 +816,12 @@ test("036 - authorize mastercard manual card present", (t) => {
|
|
|
864
816
|
.capture()
|
|
865
817
|
.execute()
|
|
866
818
|
.then((captureResponse) => {
|
|
867
|
-
|
|
868
|
-
|
|
819
|
+
expect(captureResponse).toBeTruthy();
|
|
820
|
+
expect(captureResponse.responseCode).toBe("00");
|
|
869
821
|
});
|
|
870
822
|
}));
|
|
871
823
|
});
|
|
872
|
-
test("036a - authorize discover manual card present", (
|
|
873
|
-
t.plan(2);
|
|
824
|
+
test("036a - authorize discover manual card present", () => {
|
|
874
825
|
const address = new src_1.Address();
|
|
875
826
|
address.postalCode = "750241234";
|
|
876
827
|
const card = Data_1.TestCards.discoverManual(true, true);
|
|
@@ -881,13 +832,12 @@ test("036a - authorize discover manual card present", (t) => {
|
|
|
881
832
|
.withAddress(address)
|
|
882
833
|
.execute()
|
|
883
834
|
.then((response) => {
|
|
884
|
-
|
|
885
|
-
|
|
835
|
+
expect(response).toBeTruthy();
|
|
836
|
+
expect(response.responseCode).toBe("00");
|
|
886
837
|
});
|
|
887
838
|
});
|
|
888
839
|
/// AUTHORIZATION - Manually Entered, Card Not Present
|
|
889
|
-
test("037 - authorize visa manual", (
|
|
890
|
-
t.plan(4);
|
|
840
|
+
test.skip("037 - authorize visa manual", () => {
|
|
891
841
|
const address = new src_1.Address();
|
|
892
842
|
address.postalCode = "750241234";
|
|
893
843
|
address.streetAddress1 = "6860 Dallas Pkwy";
|
|
@@ -900,8 +850,8 @@ test("037 - authorize visa manual", (t) => {
|
|
|
900
850
|
.withAddress(address)
|
|
901
851
|
.execute()
|
|
902
852
|
.then((response) => {
|
|
903
|
-
|
|
904
|
-
|
|
853
|
+
expect(response).toBeTruthy();
|
|
854
|
+
expect(response.responseCode).toBe("00");
|
|
905
855
|
return response;
|
|
906
856
|
})
|
|
907
857
|
// 034b capture
|
|
@@ -910,13 +860,12 @@ test("037 - authorize visa manual", (t) => {
|
|
|
910
860
|
.capture()
|
|
911
861
|
.execute()
|
|
912
862
|
.then((captureResponse) => {
|
|
913
|
-
|
|
914
|
-
|
|
863
|
+
expect(captureResponse).toBeTruthy();
|
|
864
|
+
expect(captureResponse.responseCode).toBe("00");
|
|
915
865
|
});
|
|
916
866
|
}));
|
|
917
867
|
});
|
|
918
|
-
test("038 - authorize mastercard manual", (
|
|
919
|
-
t.plan(4);
|
|
868
|
+
test.skip("038 - authorize mastercard manual", () => {
|
|
920
869
|
const address = new src_1.Address();
|
|
921
870
|
address.postalCode = "750241234";
|
|
922
871
|
address.streetAddress1 = "6860";
|
|
@@ -929,8 +878,8 @@ test("038 - authorize mastercard manual", (t) => {
|
|
|
929
878
|
.withAddress(address)
|
|
930
879
|
.execute()
|
|
931
880
|
.then((response) => {
|
|
932
|
-
|
|
933
|
-
|
|
881
|
+
expect(response).toBeTruthy();
|
|
882
|
+
expect(response.responseCode).toBe("00");
|
|
934
883
|
return response;
|
|
935
884
|
})
|
|
936
885
|
// 036b capture
|
|
@@ -939,13 +888,12 @@ test("038 - authorize mastercard manual", (t) => {
|
|
|
939
888
|
.capture()
|
|
940
889
|
.execute()
|
|
941
890
|
.then((captureResponse) => {
|
|
942
|
-
|
|
943
|
-
|
|
891
|
+
expect(captureResponse).toBeTruthy();
|
|
892
|
+
expect(captureResponse.responseCode).toBe("00");
|
|
944
893
|
});
|
|
945
894
|
}));
|
|
946
895
|
});
|
|
947
|
-
test("038a - authorize discover manual", (
|
|
948
|
-
t.plan(2);
|
|
896
|
+
test("038a - authorize discover manual", () => {
|
|
949
897
|
const address = new src_1.Address();
|
|
950
898
|
address.postalCode = "750241234";
|
|
951
899
|
const card = Data_1.TestCards.discoverManual(false, true);
|
|
@@ -956,13 +904,12 @@ test("038a - authorize discover manual", (t) => {
|
|
|
956
904
|
.withAddress(address)
|
|
957
905
|
.execute()
|
|
958
906
|
.then((response) => {
|
|
959
|
-
|
|
960
|
-
|
|
907
|
+
expect(response).toBeTruthy();
|
|
908
|
+
expect(response.responseCode).toBe("00");
|
|
961
909
|
});
|
|
962
910
|
});
|
|
963
911
|
/// PARTIALLY APPROVED SALE (Required)
|
|
964
|
-
test("039 - charge discover swipe partial approval", (
|
|
965
|
-
t.plan(3);
|
|
912
|
+
test("039 - charge discover swipe partial approval", () => {
|
|
966
913
|
const card = Data_1.TestCards.discoverSwipe();
|
|
967
914
|
return card
|
|
968
915
|
.charge(40.0)
|
|
@@ -971,13 +918,12 @@ test("039 - charge discover swipe partial approval", (t) => {
|
|
|
971
918
|
.withAllowPartialAuth(true)
|
|
972
919
|
.execute()
|
|
973
920
|
.then((response) => {
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
921
|
+
expect(response).toBeTruthy();
|
|
922
|
+
expect(response.responseCode).toBe("10");
|
|
923
|
+
expect(response.authorizedAmount).toBe("40.00");
|
|
977
924
|
});
|
|
978
925
|
});
|
|
979
|
-
test("040 - charge visa swipe partial approval", (
|
|
980
|
-
t.plan(3);
|
|
926
|
+
test("040 - charge visa swipe partial approval", () => {
|
|
981
927
|
const card = Data_1.TestCards.visaSwipe();
|
|
982
928
|
return card
|
|
983
929
|
.charge(130.0)
|
|
@@ -986,13 +932,12 @@ test("040 - charge visa swipe partial approval", (t) => {
|
|
|
986
932
|
.withAllowPartialAuth(true)
|
|
987
933
|
.execute()
|
|
988
934
|
.then((response) => {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
935
|
+
expect(response).toBeTruthy();
|
|
936
|
+
expect(response.responseCode).toBe("10");
|
|
937
|
+
expect(response.authorizedAmount).toBe("110.00");
|
|
992
938
|
});
|
|
993
939
|
});
|
|
994
|
-
test("041 - charge discover manual partial approval", (
|
|
995
|
-
t.plan(3);
|
|
940
|
+
test("041 - charge discover manual partial approval", () => {
|
|
996
941
|
const address = new src_1.Address();
|
|
997
942
|
address.postalCode = "75024";
|
|
998
943
|
const card = Data_1.TestCards.discoverManual(true, true);
|
|
@@ -1004,13 +949,12 @@ test("041 - charge discover manual partial approval", (t) => {
|
|
|
1004
949
|
.withAddress(address)
|
|
1005
950
|
.execute()
|
|
1006
951
|
.then((response) => {
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
952
|
+
expect(response).toBeTruthy();
|
|
953
|
+
expect(response.responseCode).toBe("10");
|
|
954
|
+
expect(response.authorizedAmount).toBe("65.00");
|
|
1010
955
|
});
|
|
1011
956
|
});
|
|
1012
|
-
test("042 - charge mastercard swipe partial approval", (
|
|
1013
|
-
t.plan(5);
|
|
957
|
+
test.skip("042 - charge mastercard swipe partial approval", () => {
|
|
1014
958
|
const card = Data_1.TestCards.masterCardSwipe();
|
|
1015
959
|
return (card
|
|
1016
960
|
.charge(155.0)
|
|
@@ -1019,9 +963,9 @@ test("042 - charge mastercard swipe partial approval", (t) => {
|
|
|
1019
963
|
.withAllowPartialAuth(true)
|
|
1020
964
|
.execute()
|
|
1021
965
|
.then((response) => {
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
966
|
+
expect(response).toBeTruthy();
|
|
967
|
+
expect(response.responseCode).toBe("10");
|
|
968
|
+
expect(response.authorizedAmount).toBe("100.00");
|
|
1025
969
|
return response;
|
|
1026
970
|
})
|
|
1027
971
|
// test case 62
|
|
@@ -1031,14 +975,14 @@ test("042 - charge mastercard swipe partial approval", (t) => {
|
|
|
1031
975
|
// .withAllowDuplicates(true)
|
|
1032
976
|
.execute()
|
|
1033
977
|
.then((reverseResponse) => {
|
|
1034
|
-
|
|
1035
|
-
|
|
978
|
+
expect(reverseResponse).toBeTruthy();
|
|
979
|
+
expect(reverseResponse.responseCode).toBe("00");
|
|
1036
980
|
}));
|
|
1037
981
|
}));
|
|
1038
982
|
});
|
|
1039
983
|
/// SALE WITH GRATUITY
|
|
1040
984
|
/// Tip Edit (Tip at Settlement)
|
|
1041
|
-
test("043 - charge visa swipe edit gratuity", (
|
|
985
|
+
test.skip("043 - charge visa swipe edit gratuity", () => {
|
|
1042
986
|
const card = Data_1.TestCards.visaSwipe();
|
|
1043
987
|
return card
|
|
1044
988
|
.charge(15.12)
|
|
@@ -1046,8 +990,8 @@ test("043 - charge visa swipe edit gratuity", (t) => {
|
|
|
1046
990
|
.withCurrency("USD")
|
|
1047
991
|
.execute()
|
|
1048
992
|
.then((response) => {
|
|
1049
|
-
|
|
1050
|
-
|
|
993
|
+
expect(response).toBeTruthy();
|
|
994
|
+
expect(response.responseCode).toBe("00");
|
|
1051
995
|
return response;
|
|
1052
996
|
})
|
|
1053
997
|
.then((response) => {
|
|
@@ -1058,13 +1002,12 @@ test("043 - charge visa swipe edit gratuity", (t) => {
|
|
|
1058
1002
|
.withGratuity(3.0)
|
|
1059
1003
|
.execute()
|
|
1060
1004
|
.then((editResponse) => {
|
|
1061
|
-
|
|
1062
|
-
|
|
1005
|
+
expect(editResponse).toBeTruthy();
|
|
1006
|
+
expect(editResponse.responseCode).toBe("00");
|
|
1063
1007
|
}));
|
|
1064
1008
|
});
|
|
1065
1009
|
});
|
|
1066
|
-
test("044 - charge mastercard manual edit gratuity", (
|
|
1067
|
-
t.plan(4);
|
|
1010
|
+
test.skip("044 - charge mastercard manual edit gratuity", () => {
|
|
1068
1011
|
const address = new src_1.Address();
|
|
1069
1012
|
address.postalCode = "75024";
|
|
1070
1013
|
const card = Data_1.TestCards.masterCardManual(true, true);
|
|
@@ -1075,8 +1018,8 @@ test("044 - charge mastercard manual edit gratuity", (t) => {
|
|
|
1075
1018
|
.withAddress(address)
|
|
1076
1019
|
.execute()
|
|
1077
1020
|
.then((response) => {
|
|
1078
|
-
|
|
1079
|
-
|
|
1021
|
+
expect(response).toBeTruthy();
|
|
1022
|
+
expect(response.responseCode).toBe("00");
|
|
1080
1023
|
return response;
|
|
1081
1024
|
})
|
|
1082
1025
|
.then((response) => {
|
|
@@ -1087,14 +1030,13 @@ test("044 - charge mastercard manual edit gratuity", (t) => {
|
|
|
1087
1030
|
.withGratuity(3.0)
|
|
1088
1031
|
.execute()
|
|
1089
1032
|
.then((editResponse) => {
|
|
1090
|
-
|
|
1091
|
-
|
|
1033
|
+
expect(editResponse).toBeTruthy();
|
|
1034
|
+
expect(editResponse.responseCode).toBe("00");
|
|
1092
1035
|
}));
|
|
1093
1036
|
});
|
|
1094
1037
|
});
|
|
1095
1038
|
/// Tip on Purchase
|
|
1096
|
-
test("045 - charge visa manual gratuity", (
|
|
1097
|
-
t.plan(2);
|
|
1039
|
+
test("045 - charge visa manual gratuity", () => {
|
|
1098
1040
|
const address = new src_1.Address();
|
|
1099
1041
|
address.postalCode = "75024";
|
|
1100
1042
|
const card = Data_1.TestCards.visaManual(true, true);
|
|
@@ -1106,12 +1048,11 @@ test("045 - charge visa manual gratuity", (t) => {
|
|
|
1106
1048
|
.withGratuity(3.5)
|
|
1107
1049
|
.execute()
|
|
1108
1050
|
.then((response) => {
|
|
1109
|
-
|
|
1110
|
-
|
|
1051
|
+
expect(response).toBeTruthy();
|
|
1052
|
+
expect(response.responseCode).toBe("00");
|
|
1111
1053
|
});
|
|
1112
1054
|
});
|
|
1113
|
-
test("046 - charge mastercard swipe gratuity", (
|
|
1114
|
-
t.plan(4);
|
|
1055
|
+
test.skip("046 - charge mastercard swipe gratuity", () => {
|
|
1115
1056
|
const card = Data_1.TestCards.masterCardSwipe();
|
|
1116
1057
|
return card
|
|
1117
1058
|
.charge(18.62)
|
|
@@ -1120,8 +1061,8 @@ test("046 - charge mastercard swipe gratuity", (t) => {
|
|
|
1120
1061
|
.withGratuity(3.5)
|
|
1121
1062
|
.execute()
|
|
1122
1063
|
.then((response) => {
|
|
1123
|
-
|
|
1124
|
-
|
|
1064
|
+
expect(response).toBeTruthy();
|
|
1065
|
+
expect(response.responseCode).toBe("00");
|
|
1125
1066
|
return response;
|
|
1126
1067
|
})
|
|
1127
1068
|
.then((response) => {
|
|
@@ -1132,14 +1073,13 @@ test("046 - charge mastercard swipe gratuity", (t) => {
|
|
|
1132
1073
|
.withGratuity(3.0)
|
|
1133
1074
|
.execute()
|
|
1134
1075
|
.then((editResponse) => {
|
|
1135
|
-
|
|
1136
|
-
|
|
1076
|
+
expect(editResponse).toBeTruthy();
|
|
1077
|
+
expect(editResponse.responseCode).toBe("00");
|
|
1137
1078
|
}));
|
|
1138
1079
|
});
|
|
1139
1080
|
});
|
|
1140
1081
|
/// LEVEL II CORPORATE PURCHASE CARD
|
|
1141
|
-
test("047 - level ii visa swipe response b", (
|
|
1142
|
-
t.plan(5);
|
|
1082
|
+
test.skip("047 - level ii visa swipe response b", () => {
|
|
1143
1083
|
const card = Data_1.TestCards.visaSwipe();
|
|
1144
1084
|
return card
|
|
1145
1085
|
.charge(112.34)
|
|
@@ -1148,9 +1088,9 @@ test("047 - level ii visa swipe response b", (t) => {
|
|
|
1148
1088
|
.withCommercialRequest(true)
|
|
1149
1089
|
.execute()
|
|
1150
1090
|
.then((response) => {
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1091
|
+
expect(response).toBeTruthy();
|
|
1092
|
+
expect(response.responseCode).toBe("00");
|
|
1093
|
+
expect(response.commercialIndicator).toBe("B");
|
|
1154
1094
|
return response;
|
|
1155
1095
|
})
|
|
1156
1096
|
.then((response) => {
|
|
@@ -1161,13 +1101,12 @@ test("047 - level ii visa swipe response b", (t) => {
|
|
|
1161
1101
|
.withTaxAmount(1)
|
|
1162
1102
|
.execute()
|
|
1163
1103
|
.then((cpcResponse) => {
|
|
1164
|
-
|
|
1165
|
-
|
|
1104
|
+
expect(cpcResponse).toBeTruthy();
|
|
1105
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1166
1106
|
}));
|
|
1167
1107
|
});
|
|
1168
1108
|
});
|
|
1169
|
-
test("047a - level ii visa swipe response b", (
|
|
1170
|
-
t.plan(5);
|
|
1109
|
+
test.skip("047a - level ii visa swipe response b", () => {
|
|
1171
1110
|
const card = Data_1.TestCards.visaSwipe();
|
|
1172
1111
|
return card
|
|
1173
1112
|
.charge(112.34)
|
|
@@ -1176,9 +1115,9 @@ test("047a - level ii visa swipe response b", (t) => {
|
|
|
1176
1115
|
.withCommercialRequest(true)
|
|
1177
1116
|
.execute()
|
|
1178
1117
|
.then((response) => {
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1118
|
+
expect(response).toBeTruthy();
|
|
1119
|
+
expect(response.responseCode).toBe("00");
|
|
1120
|
+
expect(response.commercialIndicator).toBe("B");
|
|
1182
1121
|
return response;
|
|
1183
1122
|
})
|
|
1184
1123
|
.then((response) => {
|
|
@@ -1188,13 +1127,12 @@ test("047a - level ii visa swipe response b", (t) => {
|
|
|
1188
1127
|
.withTaxType(src_1.TaxType.NotUsed)
|
|
1189
1128
|
.execute()
|
|
1190
1129
|
.then((cpcResponse) => {
|
|
1191
|
-
|
|
1192
|
-
|
|
1130
|
+
expect(cpcResponse).toBeTruthy();
|
|
1131
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1193
1132
|
}));
|
|
1194
1133
|
});
|
|
1195
1134
|
});
|
|
1196
|
-
test("048 - level ii visa swipe response r", (
|
|
1197
|
-
t.plan(5);
|
|
1135
|
+
test.skip("048 - level ii visa swipe response r", () => {
|
|
1198
1136
|
const card = Data_1.TestCards.visaSwipe();
|
|
1199
1137
|
return card
|
|
1200
1138
|
.charge(123.45)
|
|
@@ -1203,9 +1141,9 @@ test("048 - level ii visa swipe response r", (t) => {
|
|
|
1203
1141
|
.withCommercialRequest(true)
|
|
1204
1142
|
.execute()
|
|
1205
1143
|
.then((response) => {
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1144
|
+
expect(response).toBeTruthy();
|
|
1145
|
+
expect(response.responseCode).toBe("00");
|
|
1146
|
+
expect(response.commercialIndicator).toBe("R");
|
|
1209
1147
|
return response;
|
|
1210
1148
|
})
|
|
1211
1149
|
.then((response) => {
|
|
@@ -1215,13 +1153,12 @@ test("048 - level ii visa swipe response r", (t) => {
|
|
|
1215
1153
|
.withTaxType(src_1.TaxType.TaxExempt)
|
|
1216
1154
|
.execute()
|
|
1217
1155
|
.then((cpcResponse) => {
|
|
1218
|
-
|
|
1219
|
-
|
|
1156
|
+
expect(cpcResponse).toBeTruthy();
|
|
1157
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1220
1158
|
}));
|
|
1221
1159
|
});
|
|
1222
1160
|
});
|
|
1223
|
-
test("049 - level ii visa manual response s", (
|
|
1224
|
-
t.plan(5);
|
|
1161
|
+
test.skip("049 - level ii visa manual response s", () => {
|
|
1225
1162
|
const address = new src_1.Address();
|
|
1226
1163
|
address.postalCode = "75024";
|
|
1227
1164
|
const card = Data_1.TestCards.visaManual(true, true);
|
|
@@ -1233,9 +1170,9 @@ test("049 - level ii visa manual response s", (t) => {
|
|
|
1233
1170
|
.withCommercialRequest(true)
|
|
1234
1171
|
.execute()
|
|
1235
1172
|
.then((response) => {
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1173
|
+
expect(response).toBeTruthy();
|
|
1174
|
+
expect(response.responseCode).toBe("00");
|
|
1175
|
+
expect(response.commercialIndicator).toBe("S");
|
|
1239
1176
|
return response;
|
|
1240
1177
|
})
|
|
1241
1178
|
.then((response) => {
|
|
@@ -1247,13 +1184,12 @@ test("049 - level ii visa manual response s", (t) => {
|
|
|
1247
1184
|
.withTaxAmount(1)
|
|
1248
1185
|
.execute()
|
|
1249
1186
|
.then((cpcResponse) => {
|
|
1250
|
-
|
|
1251
|
-
|
|
1187
|
+
expect(cpcResponse).toBeTruthy();
|
|
1188
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1252
1189
|
}));
|
|
1253
1190
|
});
|
|
1254
1191
|
});
|
|
1255
|
-
test("050 - level ii mastercard swipe response s", (
|
|
1256
|
-
t.plan(5);
|
|
1192
|
+
test.skip("050 - level ii mastercard swipe response s", () => {
|
|
1257
1193
|
const card = Data_1.TestCards.masterCardSwipe();
|
|
1258
1194
|
return card
|
|
1259
1195
|
.charge(111.06)
|
|
@@ -1262,9 +1198,9 @@ test("050 - level ii mastercard swipe response s", (t) => {
|
|
|
1262
1198
|
.withCommercialRequest(true)
|
|
1263
1199
|
.execute()
|
|
1264
1200
|
.then((response) => {
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1201
|
+
expect(response).toBeTruthy();
|
|
1202
|
+
expect(response.responseCode).toBe("00");
|
|
1203
|
+
expect(response.commercialIndicator).toBe("S");
|
|
1268
1204
|
return response;
|
|
1269
1205
|
})
|
|
1270
1206
|
.then((response) => {
|
|
@@ -1275,13 +1211,12 @@ test("050 - level ii mastercard swipe response s", (t) => {
|
|
|
1275
1211
|
.withTaxType(src_1.TaxType.NotUsed)
|
|
1276
1212
|
.execute()
|
|
1277
1213
|
.then((cpcResponse) => {
|
|
1278
|
-
|
|
1279
|
-
|
|
1214
|
+
expect(cpcResponse).toBeTruthy();
|
|
1215
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1280
1216
|
}));
|
|
1281
1217
|
});
|
|
1282
1218
|
});
|
|
1283
|
-
test("051 - level ii mastercard manual response s", (
|
|
1284
|
-
t.plan(5);
|
|
1219
|
+
test.skip("051 - level ii mastercard manual response s", () => {
|
|
1285
1220
|
const address = new src_1.Address();
|
|
1286
1221
|
address.postalCode = "75024";
|
|
1287
1222
|
const card = Data_1.TestCards.masterCardManual(true, true);
|
|
@@ -1293,9 +1228,9 @@ test("051 - level ii mastercard manual response s", (t) => {
|
|
|
1293
1228
|
.withCommercialRequest(true)
|
|
1294
1229
|
.execute()
|
|
1295
1230
|
.then((response) => {
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1231
|
+
expect(response).toBeTruthy();
|
|
1232
|
+
expect(response.responseCode).toBe("00");
|
|
1233
|
+
expect(response.commercialIndicator).toBe("S");
|
|
1299
1234
|
return response;
|
|
1300
1235
|
})
|
|
1301
1236
|
.then((response) => {
|
|
@@ -1307,13 +1242,12 @@ test("051 - level ii mastercard manual response s", (t) => {
|
|
|
1307
1242
|
.withTaxAmount(1)
|
|
1308
1243
|
.execute()
|
|
1309
1244
|
.then((cpcResponse) => {
|
|
1310
|
-
|
|
1311
|
-
|
|
1245
|
+
expect(cpcResponse).toBeTruthy();
|
|
1246
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1312
1247
|
}));
|
|
1313
1248
|
});
|
|
1314
1249
|
});
|
|
1315
|
-
test("051a - level ii mastercard manual response s", (
|
|
1316
|
-
t.plan(5);
|
|
1250
|
+
test.skip("051a - level ii mastercard manual response s", () => {
|
|
1317
1251
|
const address = new src_1.Address();
|
|
1318
1252
|
address.postalCode = "75024";
|
|
1319
1253
|
const card = Data_1.TestCards.masterCardManual(true, true);
|
|
@@ -1325,9 +1259,9 @@ test("051a - level ii mastercard manual response s", (t) => {
|
|
|
1325
1259
|
.withCommercialRequest(true)
|
|
1326
1260
|
.execute()
|
|
1327
1261
|
.then((response) => {
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1262
|
+
expect(response).toBeTruthy();
|
|
1263
|
+
expect(response.responseCode).toBe("00");
|
|
1264
|
+
expect(response.commercialIndicator).toBe("S");
|
|
1331
1265
|
return response;
|
|
1332
1266
|
})
|
|
1333
1267
|
.then((response) => {
|
|
@@ -1339,13 +1273,12 @@ test("051a - level ii mastercard manual response s", (t) => {
|
|
|
1339
1273
|
.withTaxAmount(1)
|
|
1340
1274
|
.execute()
|
|
1341
1275
|
.then((cpcResponse) => {
|
|
1342
|
-
|
|
1343
|
-
|
|
1276
|
+
expect(cpcResponse).toBeTruthy();
|
|
1277
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1344
1278
|
}));
|
|
1345
1279
|
});
|
|
1346
1280
|
});
|
|
1347
|
-
test("052 - level ii mastercard manual response s", (
|
|
1348
|
-
t.plan(5);
|
|
1281
|
+
test.skip("052 - level ii mastercard manual response s", () => {
|
|
1349
1282
|
const address = new src_1.Address();
|
|
1350
1283
|
address.postalCode = "75024";
|
|
1351
1284
|
const card = Data_1.TestCards.masterCardManual(true, true);
|
|
@@ -1357,9 +1290,9 @@ test("052 - level ii mastercard manual response s", (t) => {
|
|
|
1357
1290
|
.withCommercialRequest(true)
|
|
1358
1291
|
.execute()
|
|
1359
1292
|
.then((response) => {
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1293
|
+
expect(response).toBeTruthy();
|
|
1294
|
+
expect(response.responseCode).toBe("00");
|
|
1295
|
+
expect(response.commercialIndicator).toBe("S");
|
|
1363
1296
|
return response;
|
|
1364
1297
|
})
|
|
1365
1298
|
.then((response) => {
|
|
@@ -1370,13 +1303,12 @@ test("052 - level ii mastercard manual response s", (t) => {
|
|
|
1370
1303
|
.withTaxType(src_1.TaxType.TaxExempt)
|
|
1371
1304
|
.execute()
|
|
1372
1305
|
.then((cpcResponse) => {
|
|
1373
|
-
|
|
1374
|
-
|
|
1306
|
+
expect(cpcResponse).toBeTruthy();
|
|
1307
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1375
1308
|
}));
|
|
1376
1309
|
});
|
|
1377
1310
|
});
|
|
1378
|
-
test("053 - level ii amex swipe no response", (
|
|
1379
|
-
t.plan(5);
|
|
1311
|
+
test.skip("053 - level ii amex swipe no response", () => {
|
|
1380
1312
|
const card = Data_1.TestCards.amexSwipe();
|
|
1381
1313
|
return card
|
|
1382
1314
|
.charge(111.1)
|
|
@@ -1385,9 +1317,9 @@ test("053 - level ii amex swipe no response", (t) => {
|
|
|
1385
1317
|
.withCommercialRequest(true)
|
|
1386
1318
|
.execute()
|
|
1387
1319
|
.then((response) => {
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1320
|
+
expect(response).toBeTruthy();
|
|
1321
|
+
expect(response.responseCode).toBe("00");
|
|
1322
|
+
expect(response.commercialIndicator).toBe("0");
|
|
1391
1323
|
return response;
|
|
1392
1324
|
})
|
|
1393
1325
|
.then((response) => {
|
|
@@ -1398,13 +1330,12 @@ test("053 - level ii amex swipe no response", (t) => {
|
|
|
1398
1330
|
.withTaxAmount(1)
|
|
1399
1331
|
.execute()
|
|
1400
1332
|
.then((cpcResponse) => {
|
|
1401
|
-
|
|
1402
|
-
|
|
1333
|
+
expect(cpcResponse).toBeTruthy();
|
|
1334
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1403
1335
|
}));
|
|
1404
1336
|
});
|
|
1405
1337
|
});
|
|
1406
|
-
test("054 - level ii amex manual no response", (
|
|
1407
|
-
t.plan(5);
|
|
1338
|
+
test.skip("054 - level ii amex manual no response", () => {
|
|
1408
1339
|
const address = new src_1.Address();
|
|
1409
1340
|
address.postalCode = "75024";
|
|
1410
1341
|
const card = Data_1.TestCards.amexManual(true, true);
|
|
@@ -1416,9 +1347,9 @@ test("054 - level ii amex manual no response", (t) => {
|
|
|
1416
1347
|
.withCommercialRequest(true)
|
|
1417
1348
|
.execute()
|
|
1418
1349
|
.then((response) => {
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1350
|
+
expect(response).toBeTruthy();
|
|
1351
|
+
expect(response.responseCode).toBe("00");
|
|
1352
|
+
expect(response.commercialIndicator).toBe("0");
|
|
1422
1353
|
return response;
|
|
1423
1354
|
})
|
|
1424
1355
|
.then((response) => {
|
|
@@ -1429,13 +1360,12 @@ test("054 - level ii amex manual no response", (t) => {
|
|
|
1429
1360
|
.withTaxType(src_1.TaxType.NotUsed)
|
|
1430
1361
|
.execute()
|
|
1431
1362
|
.then((cpcResponse) => {
|
|
1432
|
-
|
|
1433
|
-
|
|
1363
|
+
expect(cpcResponse).toBeTruthy();
|
|
1364
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1434
1365
|
}));
|
|
1435
1366
|
});
|
|
1436
1367
|
});
|
|
1437
|
-
test("055 - level ii amex manual no response", (
|
|
1438
|
-
t.plan(5);
|
|
1368
|
+
test.skip("055 - level ii amex manual no response", () => {
|
|
1439
1369
|
const address = new src_1.Address();
|
|
1440
1370
|
address.postalCode = "75024";
|
|
1441
1371
|
const card = Data_1.TestCards.amexManual(true, true);
|
|
@@ -1447,9 +1377,9 @@ test("055 - level ii amex manual no response", (t) => {
|
|
|
1447
1377
|
.withCommercialRequest(true)
|
|
1448
1378
|
.execute()
|
|
1449
1379
|
.then((response) => {
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1380
|
+
expect(response).toBeTruthy();
|
|
1381
|
+
expect(response.responseCode).toBe("00");
|
|
1382
|
+
expect(response.commercialIndicator).toBe("0");
|
|
1453
1383
|
return response;
|
|
1454
1384
|
})
|
|
1455
1385
|
.then((response) => {
|
|
@@ -1460,13 +1390,12 @@ test("055 - level ii amex manual no response", (t) => {
|
|
|
1460
1390
|
.withTaxType(src_1.TaxType.NotUsed)
|
|
1461
1391
|
.execute()
|
|
1462
1392
|
.then((cpcResponse) => {
|
|
1463
|
-
|
|
1464
|
-
|
|
1393
|
+
expect(cpcResponse).toBeTruthy();
|
|
1394
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1465
1395
|
}));
|
|
1466
1396
|
});
|
|
1467
1397
|
});
|
|
1468
|
-
test("055a - level ii amex manual no response", (
|
|
1469
|
-
t.plan(5);
|
|
1398
|
+
test.skip("055a - level ii amex manual no response", () => {
|
|
1470
1399
|
const address = new src_1.Address();
|
|
1471
1400
|
address.postalCode = "75024";
|
|
1472
1401
|
const card = Data_1.TestCards.amexManual(true, true);
|
|
@@ -1478,9 +1407,9 @@ test("055a - level ii amex manual no response", (t) => {
|
|
|
1478
1407
|
.withCommercialRequest(true)
|
|
1479
1408
|
.execute()
|
|
1480
1409
|
.then((response) => {
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1410
|
+
expect(response).toBeTruthy();
|
|
1411
|
+
expect(response.responseCode).toBe("00");
|
|
1412
|
+
expect(response.commercialIndicator).toBe("0");
|
|
1484
1413
|
return response;
|
|
1485
1414
|
})
|
|
1486
1415
|
.then((response) => {
|
|
@@ -1491,14 +1420,13 @@ test("055a - level ii amex manual no response", (t) => {
|
|
|
1491
1420
|
.withTaxType(src_1.TaxType.TaxExempt)
|
|
1492
1421
|
.execute()
|
|
1493
1422
|
.then((cpcResponse) => {
|
|
1494
|
-
|
|
1495
|
-
|
|
1423
|
+
expect(cpcResponse).toBeTruthy();
|
|
1424
|
+
expect(cpcResponse.responseCode).toBe("00");
|
|
1496
1425
|
}));
|
|
1497
1426
|
});
|
|
1498
1427
|
});
|
|
1499
1428
|
/// OFFLINE SALE / AUTHORIZATION
|
|
1500
|
-
test("056 - offline charge visa manual", (
|
|
1501
|
-
t.plan(2);
|
|
1429
|
+
test("056 - offline charge visa manual", () => {
|
|
1502
1430
|
const card = Data_1.TestCards.visaManual(false, true);
|
|
1503
1431
|
return card
|
|
1504
1432
|
.charge(15.12)
|
|
@@ -1507,12 +1435,11 @@ test("056 - offline charge visa manual", (t) => {
|
|
|
1507
1435
|
.withOfflineAuthCode("654321")
|
|
1508
1436
|
.execute()
|
|
1509
1437
|
.then((response) => {
|
|
1510
|
-
|
|
1511
|
-
|
|
1438
|
+
expect(response).toBeTruthy();
|
|
1439
|
+
expect(response.responseCode).toBe("00");
|
|
1512
1440
|
});
|
|
1513
1441
|
});
|
|
1514
|
-
test("056 - offline auth visa manual", (
|
|
1515
|
-
t.plan(2);
|
|
1442
|
+
test("056 - offline auth visa manual", () => {
|
|
1516
1443
|
const card = Data_1.TestCards.visaManual(false, true);
|
|
1517
1444
|
return card
|
|
1518
1445
|
.authorize(15.11)
|
|
@@ -1521,13 +1448,12 @@ test("056 - offline auth visa manual", (t) => {
|
|
|
1521
1448
|
.withOfflineAuthCode("654321")
|
|
1522
1449
|
.execute()
|
|
1523
1450
|
.then((response) => {
|
|
1524
|
-
|
|
1525
|
-
|
|
1451
|
+
expect(response).toBeTruthy();
|
|
1452
|
+
expect(response.responseCode).toBe("00");
|
|
1526
1453
|
});
|
|
1527
1454
|
});
|
|
1528
1455
|
/// RETURN
|
|
1529
|
-
test("057 - return mastercard", (
|
|
1530
|
-
t.plan(2);
|
|
1456
|
+
test("057 - return mastercard", () => {
|
|
1531
1457
|
const card = Data_1.TestCards.masterCardManual(false, true);
|
|
1532
1458
|
return card
|
|
1533
1459
|
.refund(15.11)
|
|
@@ -1535,12 +1461,11 @@ test("057 - return mastercard", (t) => {
|
|
|
1535
1461
|
.withCurrency("USD")
|
|
1536
1462
|
.execute()
|
|
1537
1463
|
.then((response) => {
|
|
1538
|
-
|
|
1539
|
-
|
|
1464
|
+
expect(response).toBeTruthy();
|
|
1465
|
+
expect(response.responseCode).toBe("00");
|
|
1540
1466
|
});
|
|
1541
1467
|
});
|
|
1542
|
-
test("057a - return mastercard swipe", (
|
|
1543
|
-
t.plan(2);
|
|
1468
|
+
test("057a - return mastercard swipe", () => {
|
|
1544
1469
|
const card = Data_1.TestCards.masterCardSwipe();
|
|
1545
1470
|
return card
|
|
1546
1471
|
.refund(15.15)
|
|
@@ -1548,35 +1473,34 @@ test("057a - return mastercard swipe", (t) => {
|
|
|
1548
1473
|
.withCurrency("USD")
|
|
1549
1474
|
.execute()
|
|
1550
1475
|
.then((response) => {
|
|
1551
|
-
|
|
1552
|
-
|
|
1476
|
+
expect(response).toBeTruthy();
|
|
1477
|
+
expect(response.responseCode).toBe("00");
|
|
1553
1478
|
});
|
|
1554
1479
|
});
|
|
1555
|
-
test("058 - return jcb transaction id", () => {
|
|
1556
|
-
|
|
1557
|
-
});
|
|
1480
|
+
// test("058 - return jcb transaction id", () => {
|
|
1481
|
+
// // see test 14
|
|
1482
|
+
// });
|
|
1558
1483
|
/// ONLINE VOID / REVERSAL (Required)
|
|
1559
|
-
test("059 - reversal visa", () => {
|
|
1560
|
-
|
|
1561
|
-
});
|
|
1562
|
-
test("060 - reversal mastercard", () => {
|
|
1563
|
-
|
|
1564
|
-
});
|
|
1565
|
-
test("061 - reversal mastercard", () => {
|
|
1566
|
-
|
|
1567
|
-
});
|
|
1568
|
-
test("062 - reversal mastercard", () => {
|
|
1569
|
-
|
|
1570
|
-
});
|
|
1571
|
-
test("063 - reversal visa partial", () => {
|
|
1572
|
-
|
|
1573
|
-
});
|
|
1574
|
-
test("064 - reversal discover partial", () => {
|
|
1575
|
-
|
|
1576
|
-
});
|
|
1484
|
+
// test("059 - reversal visa", () => {
|
|
1485
|
+
// // see test 10
|
|
1486
|
+
// });
|
|
1487
|
+
// test("060 - reversal mastercard", () => {
|
|
1488
|
+
// // see test case 17
|
|
1489
|
+
// });
|
|
1490
|
+
// test("061 - reversal mastercard", () => {
|
|
1491
|
+
// // see test case 23
|
|
1492
|
+
// });
|
|
1493
|
+
// test("062 - reversal mastercard", () => {
|
|
1494
|
+
// // see test case 42
|
|
1495
|
+
// });
|
|
1496
|
+
// test("063 - reversal visa partial", () => {
|
|
1497
|
+
// // see test case 15
|
|
1498
|
+
// });
|
|
1499
|
+
// test("064 - reversal discover partial", () => {
|
|
1500
|
+
// // see test 21
|
|
1501
|
+
// });
|
|
1577
1502
|
/// PIN DEBIT CARD FUNCTIONS
|
|
1578
|
-
test("065 - debit sale visa swipe", (
|
|
1579
|
-
t.plan(2);
|
|
1503
|
+
test("065 - debit sale visa swipe", () => {
|
|
1580
1504
|
const card = Data_1.TestCards.asDebit(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
|
|
1581
1505
|
return card
|
|
1582
1506
|
.charge(14.01)
|
|
@@ -1584,12 +1508,11 @@ test("065 - debit sale visa swipe", (t) => {
|
|
|
1584
1508
|
.withCurrency("USD")
|
|
1585
1509
|
.execute()
|
|
1586
1510
|
.then((response) => {
|
|
1587
|
-
|
|
1588
|
-
|
|
1511
|
+
expect(response).toBeTruthy();
|
|
1512
|
+
expect(response.responseCode).toBe("00");
|
|
1589
1513
|
});
|
|
1590
1514
|
});
|
|
1591
|
-
test("066 - debit sale mastercard swipe", (
|
|
1592
|
-
t.plan(4);
|
|
1515
|
+
test("066 - debit sale mastercard swipe", () => {
|
|
1593
1516
|
const card = Data_1.TestCards.asDebit(Data_1.TestCards.masterCardSwipe(), "F505AD81659AA42A3D123412324000AB");
|
|
1594
1517
|
return card
|
|
1595
1518
|
.charge(14.02)
|
|
@@ -1597,8 +1520,8 @@ test("066 - debit sale mastercard swipe", (t) => {
|
|
|
1597
1520
|
.withCurrency("USD")
|
|
1598
1521
|
.execute()
|
|
1599
1522
|
.then((response) => {
|
|
1600
|
-
|
|
1601
|
-
|
|
1523
|
+
expect(response).toBeTruthy();
|
|
1524
|
+
expect(response.responseCode).toBe("00");
|
|
1602
1525
|
return response;
|
|
1603
1526
|
})
|
|
1604
1527
|
.then(() => {
|
|
@@ -1608,13 +1531,12 @@ test("066 - debit sale mastercard swipe", (t) => {
|
|
|
1608
1531
|
// .withAllowDuplicates(true)
|
|
1609
1532
|
.execute()
|
|
1610
1533
|
.then((reverseResponse) => {
|
|
1611
|
-
|
|
1612
|
-
|
|
1534
|
+
expect(reverseResponse).toBeTruthy();
|
|
1535
|
+
expect(reverseResponse.responseCode).toBe("00");
|
|
1613
1536
|
}));
|
|
1614
1537
|
});
|
|
1615
1538
|
});
|
|
1616
|
-
test("067 - debit sale visa swipe cashback", (
|
|
1617
|
-
t.plan(2);
|
|
1539
|
+
test("067 - debit sale visa swipe cashback", () => {
|
|
1618
1540
|
const card = Data_1.TestCards.asDebit(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
|
|
1619
1541
|
return card
|
|
1620
1542
|
.charge(14.03)
|
|
@@ -1623,12 +1545,11 @@ test("067 - debit sale visa swipe cashback", (t) => {
|
|
|
1623
1545
|
.withCashBack(5.0)
|
|
1624
1546
|
.execute()
|
|
1625
1547
|
.then((response) => {
|
|
1626
|
-
|
|
1627
|
-
|
|
1548
|
+
expect(response).toBeTruthy();
|
|
1549
|
+
expect(response.responseCode).toBe("00");
|
|
1628
1550
|
});
|
|
1629
1551
|
});
|
|
1630
|
-
test("067a - debit sale mastercard", (
|
|
1631
|
-
t.plan(2);
|
|
1552
|
+
test("067a - debit sale mastercard", () => {
|
|
1632
1553
|
const card = Data_1.TestCards.asDebit(Data_1.TestCards.masterCardSwipe(), "F505AD81659AA42A3D123412324000AB");
|
|
1633
1554
|
return card
|
|
1634
1555
|
.charge(14.04)
|
|
@@ -1636,13 +1557,12 @@ test("067a - debit sale mastercard", (t) => {
|
|
|
1636
1557
|
.withCurrency("USD")
|
|
1637
1558
|
.execute()
|
|
1638
1559
|
.then((response) => {
|
|
1639
|
-
|
|
1640
|
-
|
|
1560
|
+
expect(response).toBeTruthy();
|
|
1561
|
+
expect(response.responseCode).toBe("00");
|
|
1641
1562
|
});
|
|
1642
1563
|
});
|
|
1643
1564
|
/// PARTIALLY APPROVED PURCHASE
|
|
1644
|
-
test("068 - debit sale mastercard partial approval", (
|
|
1645
|
-
t.plan(3);
|
|
1565
|
+
test("068 - debit sale mastercard partial approval", () => {
|
|
1646
1566
|
const card = Data_1.TestCards.asDebit(Data_1.TestCards.masterCardSwipe(), "F505AD81659AA42A3D123412324000AB");
|
|
1647
1567
|
return card
|
|
1648
1568
|
.charge(33.0)
|
|
@@ -1651,13 +1571,12 @@ test("068 - debit sale mastercard partial approval", (t) => {
|
|
|
1651
1571
|
.withAllowPartialAuth(true)
|
|
1652
1572
|
.execute()
|
|
1653
1573
|
.then((response) => {
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1574
|
+
expect(response).toBeTruthy();
|
|
1575
|
+
expect(response.responseCode).toBe("10");
|
|
1576
|
+
expect(response.authorizedAmount).toBe("22.00");
|
|
1657
1577
|
});
|
|
1658
1578
|
});
|
|
1659
|
-
test("069 - debit sale visa partial approval", (
|
|
1660
|
-
t.plan(5);
|
|
1579
|
+
test.skip("069 - debit sale visa partial approval", () => {
|
|
1661
1580
|
const card = Data_1.TestCards.asDebit(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
|
|
1662
1581
|
return card
|
|
1663
1582
|
.charge(44.0)
|
|
@@ -1666,9 +1585,9 @@ test("069 - debit sale visa partial approval", (t) => {
|
|
|
1666
1585
|
.withAllowPartialAuth(true)
|
|
1667
1586
|
.execute()
|
|
1668
1587
|
.then((response) => {
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1588
|
+
expect(response).toBeTruthy();
|
|
1589
|
+
expect(response.responseCode).toBe("10");
|
|
1590
|
+
expect(response.authorizedAmount).toBe("33.00");
|
|
1672
1591
|
return response;
|
|
1673
1592
|
})
|
|
1674
1593
|
.then(() => {
|
|
@@ -1678,14 +1597,13 @@ test("069 - debit sale visa partial approval", (t) => {
|
|
|
1678
1597
|
// .withAllowDuplicates(true)
|
|
1679
1598
|
.execute()
|
|
1680
1599
|
.then((reverseResponse) => {
|
|
1681
|
-
|
|
1682
|
-
|
|
1600
|
+
expect(reverseResponse).toBeTruthy();
|
|
1601
|
+
expect(reverseResponse.responseCode).toBe("00");
|
|
1683
1602
|
}));
|
|
1684
1603
|
});
|
|
1685
1604
|
});
|
|
1686
1605
|
/// RETURN
|
|
1687
|
-
test("070 - debit return visa swipe", (
|
|
1688
|
-
t.plan(2);
|
|
1606
|
+
test.skip("070 - debit return visa swipe", () => {
|
|
1689
1607
|
const card = Data_1.TestCards.asDebit(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
|
|
1690
1608
|
return card
|
|
1691
1609
|
.refund(14.07)
|
|
@@ -1693,12 +1611,11 @@ test("070 - debit return visa swipe", (t) => {
|
|
|
1693
1611
|
.withCurrency("USD")
|
|
1694
1612
|
.execute()
|
|
1695
1613
|
.then((response) => {
|
|
1696
|
-
|
|
1697
|
-
|
|
1614
|
+
expect(response).toBeTruthy();
|
|
1615
|
+
expect(response.responseCode).toBe("00");
|
|
1698
1616
|
});
|
|
1699
1617
|
});
|
|
1700
|
-
test("070a - debit return visa swipe", (
|
|
1701
|
-
t.plan(4);
|
|
1618
|
+
test("070a - debit return visa swipe", () => {
|
|
1702
1619
|
const card = Data_1.TestCards.asDebit(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
|
|
1703
1620
|
return card
|
|
1704
1621
|
.refund(14.08)
|
|
@@ -1706,8 +1623,8 @@ test("070a - debit return visa swipe", (t) => {
|
|
|
1706
1623
|
.withCurrency("USD")
|
|
1707
1624
|
.execute()
|
|
1708
1625
|
.then((response) => {
|
|
1709
|
-
|
|
1710
|
-
|
|
1626
|
+
expect(response).toBeTruthy();
|
|
1627
|
+
expect(response.responseCode).toBe("00");
|
|
1711
1628
|
return response;
|
|
1712
1629
|
})
|
|
1713
1630
|
.then(() => {
|
|
@@ -1716,22 +1633,21 @@ test("070a - debit return visa swipe", (t) => {
|
|
|
1716
1633
|
// .withAllowDuplicates(true)
|
|
1717
1634
|
.execute()
|
|
1718
1635
|
.then((reverseResponse) => {
|
|
1719
|
-
|
|
1720
|
-
|
|
1636
|
+
expect(reverseResponse).toBeTruthy();
|
|
1637
|
+
expect(reverseResponse.responseCode).toBe("00");
|
|
1721
1638
|
}));
|
|
1722
1639
|
});
|
|
1723
1640
|
});
|
|
1724
1641
|
/// REVERSAL
|
|
1725
|
-
test("071 - debit reversal mastercard", () => {
|
|
1726
|
-
|
|
1727
|
-
});
|
|
1728
|
-
test("072 - debit reversal visa", () => {
|
|
1729
|
-
|
|
1730
|
-
});
|
|
1642
|
+
// test("071 - debit reversal mastercard", () => {
|
|
1643
|
+
// // see test case 66
|
|
1644
|
+
// });
|
|
1645
|
+
// test("072 - debit reversal visa", () => {
|
|
1646
|
+
// // see test case 96
|
|
1647
|
+
// });
|
|
1731
1648
|
/// EBT FUNCTIONS
|
|
1732
1649
|
/// Food Stamp Purchase
|
|
1733
|
-
test("080 - ebt fs purchase visa swipe", (
|
|
1734
|
-
t.plan(2);
|
|
1650
|
+
test("080 - ebt fs purchase visa swipe", () => {
|
|
1735
1651
|
const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
|
|
1736
1652
|
return card
|
|
1737
1653
|
.charge(101.01)
|
|
@@ -1739,12 +1655,11 @@ test("080 - ebt fs purchase visa swipe", (t) => {
|
|
|
1739
1655
|
.withCurrency("USD")
|
|
1740
1656
|
.execute()
|
|
1741
1657
|
.then((response) => {
|
|
1742
|
-
|
|
1743
|
-
|
|
1658
|
+
expect(response).toBeTruthy();
|
|
1659
|
+
expect(response.responseCode).toBe("00");
|
|
1744
1660
|
});
|
|
1745
1661
|
});
|
|
1746
|
-
test("081 - ebt fs purchase visa manual", (
|
|
1747
|
-
t.plan(2);
|
|
1662
|
+
test("081 - ebt fs purchase visa manual", () => {
|
|
1748
1663
|
const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
|
|
1749
1664
|
return card
|
|
1750
1665
|
.charge(102.01)
|
|
@@ -1752,13 +1667,12 @@ test("081 - ebt fs purchase visa manual", (t) => {
|
|
|
1752
1667
|
.withCurrency("USD")
|
|
1753
1668
|
.execute()
|
|
1754
1669
|
.then((response) => {
|
|
1755
|
-
|
|
1756
|
-
|
|
1670
|
+
expect(response).toBeTruthy();
|
|
1671
|
+
expect(response.responseCode).toBe("00");
|
|
1757
1672
|
});
|
|
1758
1673
|
});
|
|
1759
1674
|
/// Food Stamp Electronic Voucher (Manual Entry Only)
|
|
1760
|
-
test("082 - ebt voucher purchase visa", (
|
|
1761
|
-
t.plan(2);
|
|
1675
|
+
test("082 - ebt voucher purchase visa", () => {
|
|
1762
1676
|
const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
|
|
1763
1677
|
card.serialNumber = "123456789012345";
|
|
1764
1678
|
card.approvalCode = "123456";
|
|
@@ -1768,13 +1682,12 @@ test("082 - ebt voucher purchase visa", (t) => {
|
|
|
1768
1682
|
.withCurrency("USD")
|
|
1769
1683
|
.execute()
|
|
1770
1684
|
.then((response) => {
|
|
1771
|
-
|
|
1772
|
-
|
|
1685
|
+
expect(response).toBeTruthy();
|
|
1686
|
+
expect(response.responseCode).toBe("00");
|
|
1773
1687
|
});
|
|
1774
1688
|
});
|
|
1775
1689
|
/// Food Stamp Balance Inquiry
|
|
1776
|
-
test("083 - ebt fs return visa swipe", (
|
|
1777
|
-
t.plan(2);
|
|
1690
|
+
test("083 - ebt fs return visa swipe", () => {
|
|
1778
1691
|
const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
|
|
1779
1692
|
return card
|
|
1780
1693
|
.refund(104.01)
|
|
@@ -1782,12 +1695,11 @@ test("083 - ebt fs return visa swipe", (t) => {
|
|
|
1782
1695
|
.withCurrency("USD")
|
|
1783
1696
|
.execute()
|
|
1784
1697
|
.then((response) => {
|
|
1785
|
-
|
|
1786
|
-
|
|
1698
|
+
expect(response).toBeTruthy();
|
|
1699
|
+
expect(response.responseCode).toBe("00");
|
|
1787
1700
|
});
|
|
1788
1701
|
});
|
|
1789
|
-
test("084 - ebt fs return visa manual", (
|
|
1790
|
-
t.plan(2);
|
|
1702
|
+
test("084 - ebt fs return visa manual", () => {
|
|
1791
1703
|
const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
|
|
1792
1704
|
return card
|
|
1793
1705
|
.refund(105.01)
|
|
@@ -1795,37 +1707,34 @@ test("084 - ebt fs return visa manual", (t) => {
|
|
|
1795
1707
|
.withCurrency("USD")
|
|
1796
1708
|
.execute()
|
|
1797
1709
|
.then((response) => {
|
|
1798
|
-
|
|
1799
|
-
|
|
1710
|
+
expect(response).toBeTruthy();
|
|
1711
|
+
expect(response.responseCode).toBe("00");
|
|
1800
1712
|
});
|
|
1801
1713
|
});
|
|
1802
1714
|
/// Food Stamp Balance Inquiry
|
|
1803
|
-
test("085 - ebt balance inquiry visa swipe", (
|
|
1804
|
-
t.plan(2);
|
|
1715
|
+
test("085 - ebt balance inquiry visa swipe", () => {
|
|
1805
1716
|
const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
|
|
1806
1717
|
return card
|
|
1807
1718
|
.balanceInquiry()
|
|
1808
1719
|
.execute()
|
|
1809
1720
|
.then((response) => {
|
|
1810
|
-
|
|
1811
|
-
|
|
1721
|
+
expect(response).toBeTruthy();
|
|
1722
|
+
expect(response.responseCode).toBe("00");
|
|
1812
1723
|
});
|
|
1813
1724
|
});
|
|
1814
|
-
test("086 - ebt balance inquiry visa manual", (
|
|
1815
|
-
t.plan(2);
|
|
1725
|
+
test("086 - ebt balance inquiry visa manual", () => {
|
|
1816
1726
|
const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(true, true), "32539F50C245A6A93D123412324000AA");
|
|
1817
1727
|
return card
|
|
1818
1728
|
.balanceInquiry()
|
|
1819
1729
|
.execute()
|
|
1820
1730
|
.then((response) => {
|
|
1821
|
-
|
|
1822
|
-
|
|
1731
|
+
expect(response).toBeTruthy();
|
|
1732
|
+
expect(response.responseCode).toBe("00");
|
|
1823
1733
|
});
|
|
1824
1734
|
});
|
|
1825
1735
|
/// EBT CASH BENEFITS
|
|
1826
1736
|
/// Cash Back Purchase
|
|
1827
|
-
test("087 - ebt cash back purchase visa swipe", (
|
|
1828
|
-
t.plan(2);
|
|
1737
|
+
test("087 - ebt cash back purchase visa swipe", () => {
|
|
1829
1738
|
const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
|
|
1830
1739
|
return card
|
|
1831
1740
|
.charge(106.01)
|
|
@@ -1834,12 +1743,11 @@ test("087 - ebt cash back purchase visa swipe", (t) => {
|
|
|
1834
1743
|
.withCashBack(5.0)
|
|
1835
1744
|
.execute()
|
|
1836
1745
|
.then((response) => {
|
|
1837
|
-
|
|
1838
|
-
|
|
1746
|
+
expect(response).toBeTruthy();
|
|
1747
|
+
expect(response.responseCode).toBe("00");
|
|
1839
1748
|
});
|
|
1840
1749
|
});
|
|
1841
|
-
test("088 - ebt cash back purchase visa manual", (
|
|
1842
|
-
t.plan(2);
|
|
1750
|
+
test("088 - ebt cash back purchase visa manual", () => {
|
|
1843
1751
|
const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
|
|
1844
1752
|
return card
|
|
1845
1753
|
.charge(107.01)
|
|
@@ -1848,13 +1756,12 @@ test("088 - ebt cash back purchase visa manual", (t) => {
|
|
|
1848
1756
|
.withCashBack(5.0)
|
|
1849
1757
|
.execute()
|
|
1850
1758
|
.then((response) => {
|
|
1851
|
-
|
|
1852
|
-
|
|
1759
|
+
expect(response).toBeTruthy();
|
|
1760
|
+
expect(response.responseCode).toBe("00");
|
|
1853
1761
|
});
|
|
1854
1762
|
});
|
|
1855
1763
|
/// No Cash Back Purchase
|
|
1856
|
-
test("089 - ebt cash back purchase visa swipe no cash back", (
|
|
1857
|
-
t.plan(2);
|
|
1764
|
+
test("089 - ebt cash back purchase visa swipe no cash back", () => {
|
|
1858
1765
|
const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
|
|
1859
1766
|
return card
|
|
1860
1767
|
.charge(108.01)
|
|
@@ -1863,12 +1770,11 @@ test("089 - ebt cash back purchase visa swipe no cash back", (t) => {
|
|
|
1863
1770
|
.withCashBack(0)
|
|
1864
1771
|
.execute()
|
|
1865
1772
|
.then((response) => {
|
|
1866
|
-
|
|
1867
|
-
|
|
1773
|
+
expect(response).toBeTruthy();
|
|
1774
|
+
expect(response.responseCode).toBe("00");
|
|
1868
1775
|
});
|
|
1869
1776
|
});
|
|
1870
|
-
test("090 - ebt cash back purchase visa manual no cash back", (
|
|
1871
|
-
t.plan(2);
|
|
1777
|
+
test("090 - ebt cash back purchase visa manual no cash back", () => {
|
|
1872
1778
|
const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
|
|
1873
1779
|
return card
|
|
1874
1780
|
.charge(109.01)
|
|
@@ -1877,36 +1783,33 @@ test("090 - ebt cash back purchase visa manual no cash back", (t) => {
|
|
|
1877
1783
|
.withCashBack(0)
|
|
1878
1784
|
.execute()
|
|
1879
1785
|
.then((response) => {
|
|
1880
|
-
|
|
1881
|
-
|
|
1786
|
+
expect(response).toBeTruthy();
|
|
1787
|
+
expect(response.responseCode).toBe("00");
|
|
1882
1788
|
});
|
|
1883
1789
|
});
|
|
1884
1790
|
/// Cash Back Balance Inquiry
|
|
1885
|
-
test("091 - ebt balance inquiry visa swipe cash", (
|
|
1886
|
-
t.plan(2);
|
|
1791
|
+
test("091 - ebt balance inquiry visa swipe cash", () => {
|
|
1887
1792
|
const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
|
|
1888
1793
|
return card
|
|
1889
1794
|
.balanceInquiry(src_1.InquiryType.Cash)
|
|
1890
1795
|
.execute()
|
|
1891
1796
|
.then((response) => {
|
|
1892
|
-
|
|
1893
|
-
|
|
1797
|
+
expect(response).toBeTruthy();
|
|
1798
|
+
expect(response.responseCode).toBe("00");
|
|
1894
1799
|
});
|
|
1895
1800
|
});
|
|
1896
|
-
test("092 - ebt balance inquiry visa manual cash", (
|
|
1897
|
-
t.plan(2);
|
|
1801
|
+
test("092 - ebt balance inquiry visa manual cash", () => {
|
|
1898
1802
|
const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(true, true), "32539F50C245A6A93D123412324000AA");
|
|
1899
1803
|
return card
|
|
1900
1804
|
.balanceInquiry(src_1.InquiryType.Cash)
|
|
1901
1805
|
.execute()
|
|
1902
1806
|
.then((response) => {
|
|
1903
|
-
|
|
1904
|
-
|
|
1807
|
+
expect(response).toBeTruthy();
|
|
1808
|
+
expect(response.responseCode).toBe("00");
|
|
1905
1809
|
});
|
|
1906
1810
|
});
|
|
1907
1811
|
/// Cash Benefits Withdrawal
|
|
1908
|
-
test("093 - ebt benefit withdrawal visa swipe", (
|
|
1909
|
-
t.plan(2);
|
|
1812
|
+
test("093 - ebt benefit withdrawal visa swipe", () => {
|
|
1910
1813
|
const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
|
|
1911
1814
|
return card
|
|
1912
1815
|
.charge(110.01)
|
|
@@ -1914,12 +1817,11 @@ test("093 - ebt benefit withdrawal visa swipe", (t) => {
|
|
|
1914
1817
|
.withCurrency("USD")
|
|
1915
1818
|
.execute()
|
|
1916
1819
|
.then((response) => {
|
|
1917
|
-
|
|
1918
|
-
|
|
1820
|
+
expect(response).toBeTruthy();
|
|
1821
|
+
expect(response.responseCode).toBe("00");
|
|
1919
1822
|
});
|
|
1920
1823
|
});
|
|
1921
|
-
test("094 - ebt benefit withdrawal visa manual", (
|
|
1922
|
-
t.plan(2);
|
|
1824
|
+
test("094 - ebt benefit withdrawal visa manual", () => {
|
|
1923
1825
|
const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
|
|
1924
1826
|
return card
|
|
1925
1827
|
.charge(111.01)
|
|
@@ -1928,145 +1830,134 @@ test("094 - ebt benefit withdrawal visa manual", (t) => {
|
|
|
1928
1830
|
.withCashBack(0)
|
|
1929
1831
|
.execute()
|
|
1930
1832
|
.then((response) => {
|
|
1931
|
-
|
|
1932
|
-
|
|
1833
|
+
expect(response).toBeTruthy();
|
|
1834
|
+
expect(response.responseCode).toBe("00");
|
|
1933
1835
|
});
|
|
1934
1836
|
});
|
|
1935
1837
|
/// HMS GIFT - REWARDS
|
|
1936
1838
|
/// GIFT
|
|
1937
1839
|
/// ACTIVATE
|
|
1938
|
-
test("095 - activate gift 1 swipe", (
|
|
1939
|
-
t.plan(2);
|
|
1840
|
+
test("095 - activate gift 1 swipe", () => {
|
|
1940
1841
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1941
1842
|
return card
|
|
1942
1843
|
.activate(6.0)
|
|
1943
1844
|
.execute()
|
|
1944
1845
|
.then((response) => {
|
|
1945
|
-
|
|
1946
|
-
|
|
1846
|
+
expect(response).toBeTruthy();
|
|
1847
|
+
expect(response.responseCode).toBe("00");
|
|
1947
1848
|
});
|
|
1948
1849
|
});
|
|
1949
|
-
test("096 - activate gift 2 manual", (
|
|
1950
|
-
t.plan(2);
|
|
1850
|
+
test("096 - activate gift 2 manual", () => {
|
|
1951
1851
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1952
1852
|
return card
|
|
1953
1853
|
.activate(7.0)
|
|
1954
1854
|
.execute()
|
|
1955
1855
|
.then((response) => {
|
|
1956
|
-
|
|
1957
|
-
|
|
1856
|
+
expect(response).toBeTruthy();
|
|
1857
|
+
expect(response.responseCode).toBe("00");
|
|
1958
1858
|
});
|
|
1959
1859
|
});
|
|
1960
1860
|
/// ADD VALUE
|
|
1961
|
-
test("097 - add value gift 1 swipe", (
|
|
1962
|
-
t.plan(2);
|
|
1861
|
+
test("097 - add value gift 1 swipe", () => {
|
|
1963
1862
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1964
1863
|
return card
|
|
1965
1864
|
.addValue(8.0)
|
|
1966
1865
|
.withCurrency("USD")
|
|
1967
1866
|
.execute()
|
|
1968
1867
|
.then((response) => {
|
|
1969
|
-
|
|
1970
|
-
|
|
1868
|
+
expect(response).toBeTruthy();
|
|
1869
|
+
expect(response.responseCode).toBe("00");
|
|
1971
1870
|
});
|
|
1972
1871
|
});
|
|
1973
|
-
test("098 - add value gift 2 manual", (
|
|
1974
|
-
t.plan(2);
|
|
1872
|
+
test("098 - add value gift 2 manual", () => {
|
|
1975
1873
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
1976
1874
|
return card
|
|
1977
1875
|
.addValue(9.0)
|
|
1978
1876
|
.withCurrency("USD")
|
|
1979
1877
|
.execute()
|
|
1980
1878
|
.then((response) => {
|
|
1981
|
-
|
|
1982
|
-
|
|
1879
|
+
expect(response).toBeTruthy();
|
|
1880
|
+
expect(response.responseCode).toBe("00");
|
|
1983
1881
|
});
|
|
1984
1882
|
});
|
|
1985
1883
|
/// BALANCE INQUIRY
|
|
1986
|
-
test("099 - balance inquiry gift 1 swipe", (
|
|
1987
|
-
t.plan(3);
|
|
1884
|
+
test("099 - balance inquiry gift 1 swipe", () => {
|
|
1988
1885
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
1989
1886
|
return card
|
|
1990
1887
|
.balanceInquiry()
|
|
1991
1888
|
.execute()
|
|
1992
1889
|
.then((response) => {
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1890
|
+
expect(response).toBeTruthy();
|
|
1891
|
+
expect(response.responseCode).toBe("00");
|
|
1892
|
+
expect(response.balanceAmount).toBe("10.00");
|
|
1996
1893
|
});
|
|
1997
1894
|
});
|
|
1998
|
-
test("100 - balance inquiry gift 2 manual", (
|
|
1999
|
-
t.plan(3);
|
|
1895
|
+
test("100 - balance inquiry gift 2 manual", () => {
|
|
2000
1896
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
2001
1897
|
return card
|
|
2002
1898
|
.balanceInquiry()
|
|
2003
1899
|
.execute()
|
|
2004
1900
|
.then((response) => {
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
1901
|
+
expect(response).toBeTruthy();
|
|
1902
|
+
expect(response.responseCode).toBe("00");
|
|
1903
|
+
expect(response.balanceAmount).toBe("10.00");
|
|
2008
1904
|
});
|
|
2009
1905
|
});
|
|
2010
1906
|
/// REPLACE / TRANSFER
|
|
2011
|
-
test("101 - replace gift 1 swipe", (
|
|
2012
|
-
t.plan(2);
|
|
1907
|
+
test("101 - replace gift 1 swipe", () => {
|
|
2013
1908
|
const oldCard = Data_1.TestCards.giftCard1Swipe();
|
|
2014
1909
|
const newCard = Data_1.TestCards.giftCard2Manual();
|
|
2015
1910
|
return oldCard
|
|
2016
1911
|
.replaceWith(newCard)
|
|
2017
1912
|
.execute()
|
|
2018
1913
|
.then((response) => {
|
|
2019
|
-
|
|
2020
|
-
|
|
1914
|
+
expect(response).toBeTruthy();
|
|
1915
|
+
expect(response.responseCode).toBe("00");
|
|
2021
1916
|
});
|
|
2022
1917
|
});
|
|
2023
|
-
test("102 - replace gift 2 manual", (
|
|
2024
|
-
t.plan(2);
|
|
1918
|
+
test("102 - replace gift 2 manual", () => {
|
|
2025
1919
|
const newCard = Data_1.TestCards.giftCard1Swipe();
|
|
2026
1920
|
const oldCard = Data_1.TestCards.giftCard2Manual();
|
|
2027
1921
|
return oldCard
|
|
2028
1922
|
.replaceWith(newCard)
|
|
2029
1923
|
.execute()
|
|
2030
1924
|
.then((response) => {
|
|
2031
|
-
|
|
2032
|
-
|
|
1925
|
+
expect(response).toBeTruthy();
|
|
1926
|
+
expect(response.responseCode).toBe("00");
|
|
2033
1927
|
});
|
|
2034
1928
|
});
|
|
2035
1929
|
/// SALE / REDEEM
|
|
2036
|
-
test("103 - sale gift 1 swipe", (
|
|
2037
|
-
t.plan(2);
|
|
1930
|
+
test("103 - sale gift 1 swipe", () => {
|
|
2038
1931
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
2039
1932
|
return card
|
|
2040
1933
|
.charge(1.0)
|
|
2041
1934
|
.withCurrency("USD")
|
|
2042
1935
|
.execute()
|
|
2043
1936
|
.then((response) => {
|
|
2044
|
-
|
|
2045
|
-
|
|
1937
|
+
expect(response).toBeTruthy();
|
|
1938
|
+
expect(response.responseCode).toBe("00");
|
|
2046
1939
|
});
|
|
2047
1940
|
});
|
|
2048
|
-
test("104 - sale gift 2 manual", (
|
|
2049
|
-
t.plan(2);
|
|
1941
|
+
test("104 - sale gift 2 manual", () => {
|
|
2050
1942
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
2051
1943
|
return card
|
|
2052
1944
|
.charge(2.0)
|
|
2053
1945
|
.withCurrency("USD")
|
|
2054
1946
|
.execute()
|
|
2055
1947
|
.then((response) => {
|
|
2056
|
-
|
|
2057
|
-
|
|
1948
|
+
expect(response).toBeTruthy();
|
|
1949
|
+
expect(response.responseCode).toBe("00");
|
|
2058
1950
|
});
|
|
2059
1951
|
});
|
|
2060
|
-
test("105 - sale gift 1 void swipe", (
|
|
2061
|
-
t.plan(4);
|
|
1952
|
+
test.skip("105 - sale gift 1 void swipe", () => {
|
|
2062
1953
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
2063
1954
|
return card
|
|
2064
1955
|
.charge(3.0)
|
|
2065
1956
|
.withCurrency("USD")
|
|
2066
1957
|
.execute()
|
|
2067
1958
|
.then((response) => {
|
|
2068
|
-
|
|
2069
|
-
|
|
1959
|
+
expect(response).toBeTruthy();
|
|
1960
|
+
expect(response.responseCode).toBe("00");
|
|
2070
1961
|
return response;
|
|
2071
1962
|
})
|
|
2072
1963
|
.then((response) => {
|
|
@@ -2075,21 +1966,20 @@ test("105 - sale gift 1 void swipe", (t) => {
|
|
|
2075
1966
|
.void()
|
|
2076
1967
|
.execute()
|
|
2077
1968
|
.then((voidResponse) => {
|
|
2078
|
-
|
|
2079
|
-
|
|
1969
|
+
expect(voidResponse).toBeTruthy();
|
|
1970
|
+
expect(voidResponse.responseCode).toBe("00");
|
|
2080
1971
|
});
|
|
2081
1972
|
});
|
|
2082
1973
|
});
|
|
2083
|
-
test("106 - sale gift 2 reversal manual", (
|
|
2084
|
-
t.plan(4);
|
|
1974
|
+
test.skip("106 - sale gift 2 reversal manual", () => {
|
|
2085
1975
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
2086
1976
|
return card
|
|
2087
1977
|
.charge(4.0)
|
|
2088
1978
|
.withCurrency("USD")
|
|
2089
1979
|
.execute()
|
|
2090
1980
|
.then((response) => {
|
|
2091
|
-
|
|
2092
|
-
|
|
1981
|
+
expect(response).toBeTruthy();
|
|
1982
|
+
expect(response.responseCode).toBe("00");
|
|
2093
1983
|
return response;
|
|
2094
1984
|
})
|
|
2095
1985
|
.then((response) => {
|
|
@@ -2098,119 +1988,110 @@ test("106 - sale gift 2 reversal manual", (t) => {
|
|
|
2098
1988
|
.reverse(4.0)
|
|
2099
1989
|
.execute()
|
|
2100
1990
|
.then((voidResponse) => {
|
|
2101
|
-
|
|
2102
|
-
|
|
1991
|
+
expect(voidResponse).toBeTruthy();
|
|
1992
|
+
expect(voidResponse.responseCode).toBe("00");
|
|
2103
1993
|
});
|
|
2104
1994
|
});
|
|
2105
1995
|
});
|
|
2106
1996
|
/// VOID
|
|
2107
|
-
test("107 - void gift", () => {
|
|
2108
|
-
|
|
2109
|
-
});
|
|
2110
|
-
/// REVERSAL
|
|
2111
|
-
test("108 - reversal gift", () => {
|
|
2112
|
-
|
|
2113
|
-
});
|
|
1997
|
+
// test("107 - void gift", () => {
|
|
1998
|
+
// // see test case 105
|
|
1999
|
+
// });
|
|
2000
|
+
// /// REVERSAL
|
|
2001
|
+
// test("108 - reversal gift", () => {
|
|
2002
|
+
// // see test case 106
|
|
2003
|
+
// });
|
|
2114
2004
|
/// DEACTIVATE
|
|
2115
|
-
test("109 - deactivate gift 1", (
|
|
2116
|
-
t.plan(2);
|
|
2005
|
+
test("109 - deactivate gift 1", () => {
|
|
2117
2006
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
2118
2007
|
return card
|
|
2119
2008
|
.deactivate()
|
|
2120
2009
|
.execute()
|
|
2121
2010
|
.then((response) => {
|
|
2122
|
-
|
|
2123
|
-
|
|
2011
|
+
expect(response).toBeTruthy();
|
|
2012
|
+
expect(response.responseCode).toBe("00");
|
|
2124
2013
|
});
|
|
2125
2014
|
});
|
|
2126
2015
|
/// RECEIPTS MESSAGING
|
|
2127
|
-
test("110 - receipts messaging", () => {
|
|
2128
|
-
|
|
2129
|
-
});
|
|
2016
|
+
// test("110 - receipts messaging", () => {
|
|
2017
|
+
// /// PRINT AND SCAN RECEIPT FOR TEST 107
|
|
2018
|
+
// });
|
|
2130
2019
|
/// REWARDS
|
|
2131
2020
|
/// BALANCE INQUIRY
|
|
2132
|
-
test("111 - balance inquiry rewards 1", (
|
|
2133
|
-
t.plan(3);
|
|
2021
|
+
test("111 - balance inquiry rewards 1", () => {
|
|
2134
2022
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
2135
2023
|
return card
|
|
2136
2024
|
.balanceInquiry()
|
|
2137
2025
|
.execute()
|
|
2138
2026
|
.then((response) => {
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2027
|
+
expect(response).toBeTruthy();
|
|
2028
|
+
expect(response.responseCode).toBe("00");
|
|
2029
|
+
expect(response.pointsBalanceAmount > "0").toBeTruthy();
|
|
2142
2030
|
});
|
|
2143
2031
|
});
|
|
2144
|
-
test("112 - balance inquiry rewards 2", (
|
|
2145
|
-
t.plan(3);
|
|
2032
|
+
test("112 - balance inquiry rewards 2", () => {
|
|
2146
2033
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
2147
2034
|
return card
|
|
2148
2035
|
.balanceInquiry()
|
|
2149
2036
|
.execute()
|
|
2150
2037
|
.then((response) => {
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2038
|
+
expect(response).toBeTruthy();
|
|
2039
|
+
expect(response.responseCode).toBe("00");
|
|
2040
|
+
expect(response.pointsBalanceAmount > "0").toBeTruthy();
|
|
2154
2041
|
});
|
|
2155
2042
|
});
|
|
2156
2043
|
/// ALIAS
|
|
2157
|
-
test("113 - create alias gift 1", (
|
|
2158
|
-
t.plan(1);
|
|
2044
|
+
test("113 - create alias gift 1", () => {
|
|
2159
2045
|
return src_1.GiftCard.create("9725550100").then((card) => {
|
|
2160
|
-
|
|
2046
|
+
expect(card).toBeTruthy();
|
|
2161
2047
|
});
|
|
2162
2048
|
});
|
|
2163
|
-
test("114 - create alias gift 2", (
|
|
2164
|
-
t.plan(1);
|
|
2049
|
+
test("114 - create alias gift 2", () => {
|
|
2165
2050
|
return src_1.GiftCard.create("9725550100").then((card) => {
|
|
2166
|
-
|
|
2051
|
+
expect(card).toBeTruthy();
|
|
2167
2052
|
});
|
|
2168
2053
|
});
|
|
2169
|
-
test("115 - add alias gift 1", (
|
|
2170
|
-
t.plan(2);
|
|
2054
|
+
test("115 - add alias gift 1", () => {
|
|
2171
2055
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
2172
2056
|
return card
|
|
2173
2057
|
.addAlias("2145550199")
|
|
2174
2058
|
.execute()
|
|
2175
2059
|
.then((response) => {
|
|
2176
|
-
|
|
2177
|
-
|
|
2060
|
+
expect(response).toBeTruthy();
|
|
2061
|
+
expect(response.responseCode).toBe("00");
|
|
2178
2062
|
});
|
|
2179
2063
|
});
|
|
2180
|
-
test("116 - add alias gift 2", (
|
|
2181
|
-
t.plan(2);
|
|
2064
|
+
test("116 - add alias gift 2", () => {
|
|
2182
2065
|
const card = Data_1.TestCards.giftCard2Manual();
|
|
2183
2066
|
return card
|
|
2184
2067
|
.addAlias("2145550199")
|
|
2185
2068
|
.execute()
|
|
2186
2069
|
.then((response) => {
|
|
2187
|
-
|
|
2188
|
-
|
|
2070
|
+
expect(response).toBeTruthy();
|
|
2071
|
+
expect(response.responseCode).toBe("00");
|
|
2189
2072
|
});
|
|
2190
2073
|
});
|
|
2191
|
-
test("117 - delete alias gift 1", (
|
|
2192
|
-
t.plan(2);
|
|
2074
|
+
test("117 - delete alias gift 1", () => {
|
|
2193
2075
|
const card = Data_1.TestCards.giftCard1Swipe();
|
|
2194
2076
|
return card
|
|
2195
2077
|
.removeAlias("2145550199")
|
|
2196
2078
|
.execute()
|
|
2197
2079
|
.then((response) => {
|
|
2198
|
-
|
|
2199
|
-
|
|
2080
|
+
expect(response).toBeTruthy();
|
|
2081
|
+
expect(response.responseCode).toBe("00");
|
|
2200
2082
|
});
|
|
2201
2083
|
});
|
|
2202
|
-
|
|
2203
|
-
|
|
2084
|
+
afterAll(() => {
|
|
2085
|
+
expect.assertions(1);
|
|
2204
2086
|
return new Promise((resolve, reject) => {
|
|
2205
2087
|
src_1.BatchService.closeBatch()
|
|
2206
2088
|
.then((response) => {
|
|
2207
|
-
|
|
2089
|
+
expect(response).toBeTruthy();
|
|
2208
2090
|
resolve();
|
|
2209
2091
|
})
|
|
2210
2092
|
.catch((e) => {
|
|
2211
2093
|
if (e.message.indexOf(BATCH_NOT_OPEN) !== -1 ||
|
|
2212
2094
|
e.message.indexOf(BATCH_EMPTY) !== -1) {
|
|
2213
|
-
t.pass();
|
|
2214
2095
|
resolve();
|
|
2215
2096
|
return;
|
|
2216
2097
|
}
|
|
@@ -2218,4 +2099,4 @@ test.after("999 - close batch", (t) => {
|
|
|
2218
2099
|
});
|
|
2219
2100
|
});
|
|
2220
2101
|
});
|
|
2221
|
-
//# sourceMappingURL=
|
|
2102
|
+
//# sourceMappingURL=Retail.test.js.map
|