globalpayments-api 3.10.0 → 3.10.2
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 +184 -170
- package/appsec.properties +8 -0
- package/lib/src/Entities/index.d.ts +4 -0
- package/lib/src/Entities/index.js +4 -0
- package/lib/src/Entities/index.js.map +1 -1
- package/lib/src/Gateways/PorticoConnector.d.ts +3 -3
- package/lib/src/Gateways/PorticoConnector.js +24 -0
- package/lib/src/Gateways/PorticoConnector.js.map +1 -1
- package/lib/src/Gateways/RealexConnector.d.ts +30 -0
- package/lib/src/Gateways/RealexConnector.js +523 -0
- package/lib/src/PaymentMethods/Credit.d.ts +2 -1
- package/lib/src/PaymentMethods/Credit.js +1 -0
- package/lib/src/PaymentMethods/Credit.js.map +1 -1
- package/lib/src/ServicesConfig.d.ts +27 -0
- package/lib/src/ServicesConfig.js +50 -0
- package/lib/test/Integration/Gateways/GpApiConnector/3DS2.test.js +15 -15
- package/lib/test/Integration/Gateways/GpApiConnector/3DSecure.test.js +5 -5
- package/lib/test/Integration/Gateways/GpEcomConnector/Credit.test.js +4 -4
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +112 -59
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +483 -378
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +83 -86
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +1720 -1723
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +83 -86
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +1757 -1760
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +682 -420
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +2218 -2221
- package/lib/test/Integration/Gateways/PorticoConnector/Credit.test.js +36 -8
- package/lib/test/Integration/Gateways/PorticoConnector/Credit.test.js.map +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +707 -392
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +151 -88
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +171 -72
- package/lib/test/Integration/Gateways/PorticoConnector/Ecommerce.test.js +8 -8
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +192 -143
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +377 -147
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +196 -101
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +53 -50
- package/lib/test/Integration/Gateways/{GpApiConnector/3DS2Test.d.ts → ProPayConnector/Certifications/GetInformationCertificationTests.d.ts} +1 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js +100 -0
- package/lib/test/Integration/Gateways/{GpApiConnector/AccessTokenTest.d.ts → ProPayConnector/Certifications/ProPayAccountCertificationTests.d.ts} +1 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js +352 -0
- package/lib/test/Integration/Gateways/{GpApiConnector/CreditCardNotPresentTest.d.ts → ProPayConnector/Certifications/ProPayFundCertificationTests.d.ts} +1 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js +123 -0
- package/lib/test/Integration/Gateways/{GpApiConnector/3DSecureTest.d.ts → ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.d.ts} +1 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js +142 -0
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js +100 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js +535 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js +124 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js +144 -0
- package/lib/test/Integration/Gateways/{GpEcomConnector → RealexConnector}/Certification/AuthTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js +4373 -0
- package/lib/test/Integration/Gateways/{GpEcomConnector → RealexConnector}/Certification/AvsTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js +758 -0
- package/lib/test/Integration/Gateways/{GpEcomConnector → RealexConnector}/Certification/CreditTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js +2399 -0
- package/lib/test/Integration/Gateways/{GpEcomConnector → RealexConnector}/Certification/HoldTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js +1656 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js +5650 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js +1985 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js +2369 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js +1703 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js +2053 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js +2469 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js +3116 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.d.ts +1 -0
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js +2031 -0
- package/lib/test/Integration/Gateways/{GpEcomConnector → RealexConnector}/CreditTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js +322 -0
- package/lib/test/Integration/Gateways/{GpEcomConnector → RealexConnector}/HppTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/RealexConnector/HppTest.js +98 -0
- package/lib/test/Integration/Gateways/{GpEcomConnector → RealexConnector}/RecurringTest.d.ts +1 -1
- package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js +263 -0
- package/lib/test/Integration/Services/CheckServiceTest.d.ts +1 -1
- package/lib/test/Integration/Services/CheckServiceTest.js +98 -45
- package/lib/test/Integration/Services/CreditServiceTest.d.ts +1 -1
- package/lib/test/Integration/Services/CreditServiceTest.js +313 -174
- package/lib/test/Integration/Services/DebitServiceTest.d.ts +1 -1
- package/lib/test/Integration/Services/DebitServiceTest.js +154 -81
- package/lib/test/Integration/Services/EBTServiceTest.d.ts +1 -1
- package/lib/test/Integration/Services/EBTServiceTest.js +135 -64
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +1 -1
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +161 -111
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +1 -1
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +139 -62
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +1 -1
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +202 -125
- package/lib/test/Unit/Gateways/{GpEcomConnector → RealexConnector}/CreditTest.d.ts +1 -1
- package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js +29 -0
- package/package.json +62 -62
- package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js +0 -1029
- package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js +0 -649
- 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.d.ts +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.d.ts +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js +0 -143
- package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertificationTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertificationTest.js +0 -639
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagementTest.d.ts +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.d.ts +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingDepositsTest.js +0 -226
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingDepositsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js +0 -434
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js +0 -217
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js +0 -338
- package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js +0 -2446
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js +0 -506
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js +0 -1296
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js +0 -847
- package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js.map +0 -1
- package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js +0 -215
- 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.map +0 -1
- 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.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +0 -1
- 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.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementTokenTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementTokenTest.js +0 -48
- package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementTokenTest.js.map +0 -1
- 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.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js +0 -44
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js +0 -221
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js +0 -60
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js +0 -80
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js +0 -44
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js +0 -330
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js +0 -60
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js +0 -80
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js.map +0 -1
- package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.d.ts +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.map +0 -1
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +0 -1
- package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js +0 -34
- package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +0 -1
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +0 -1
|
@@ -1,125 +1,202 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
(0
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var ava_1 = require("ava");
|
|
40
|
+
var src_1 = require("../../../../src/");
|
|
41
|
+
var InputValidation_1 = require("../../../../src/Utils/InputValidation");
|
|
42
|
+
var config = new src_1.ServicesConfig();
|
|
43
|
+
config.secretApiKey = "skapi_cert_MTeSAQAfG1UA9qQDrzl-kz4toXvARyieptFwSKP24w";
|
|
44
|
+
config.serviceUrl = "https://cert.api2-c.heartlandportico.com";
|
|
45
|
+
var card = new src_1.CreditCardData();
|
|
46
|
+
card.number = "4111111111111111";
|
|
47
|
+
card.expMonth = "12";
|
|
48
|
+
card.expYear = "2025";
|
|
49
|
+
card.cvn = "123";
|
|
50
|
+
card.cardHolderName = "Joe Smith";
|
|
51
|
+
ava_1.default.before(function (_t) {
|
|
52
|
+
src_1.ServicesContainer.configure(config);
|
|
53
|
+
});
|
|
54
|
+
ava_1.default("correctable postal code - hyphen", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
+
var address, response;
|
|
56
|
+
return __generator(this, function (_a) {
|
|
57
|
+
switch (_a.label) {
|
|
58
|
+
case 0:
|
|
59
|
+
address = new src_1.Address();
|
|
60
|
+
address.postalCode = "12345-6789";
|
|
61
|
+
return [4 /*yield*/, card.charge(10)
|
|
62
|
+
.withCurrency("USD")
|
|
63
|
+
.withAddress(address)
|
|
64
|
+
.withAllowDuplicates(true)
|
|
65
|
+
.execute()];
|
|
66
|
+
case 1:
|
|
67
|
+
response = _a.sent();
|
|
68
|
+
t.truthy(response);
|
|
69
|
+
t.is(response.responseCode, "00");
|
|
70
|
+
return [2 /*return*/];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}); });
|
|
74
|
+
ava_1.default("correctable postal code - space", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
75
|
+
var address, response;
|
|
76
|
+
return __generator(this, function (_a) {
|
|
77
|
+
switch (_a.label) {
|
|
78
|
+
case 0:
|
|
79
|
+
address = new src_1.Address();
|
|
80
|
+
address.postalCode = "12345 6789";
|
|
81
|
+
return [4 /*yield*/, card.charge(10)
|
|
82
|
+
.withCurrency("USD")
|
|
83
|
+
.withAddress(address)
|
|
84
|
+
.withAllowDuplicates(true)
|
|
85
|
+
.execute()];
|
|
86
|
+
case 1:
|
|
87
|
+
response = _a.sent();
|
|
88
|
+
t.truthy(response);
|
|
89
|
+
t.is(response.responseCode, "00");
|
|
90
|
+
return [2 /*return*/];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}); });
|
|
94
|
+
ava_1.default("invalid postal code - length", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
95
|
+
var address, error;
|
|
96
|
+
return __generator(this, function (_a) {
|
|
97
|
+
address = new src_1.Address();
|
|
98
|
+
address.postalCode = "1234567890";
|
|
99
|
+
error = t.throws(function () {
|
|
100
|
+
return card.charge(10)
|
|
101
|
+
.withCurrency("USD")
|
|
102
|
+
.withAddress(address)
|
|
103
|
+
.withAllowDuplicates(true)
|
|
104
|
+
.execute();
|
|
105
|
+
}, Error);
|
|
106
|
+
t.is(error.name, Error.name);
|
|
107
|
+
t.true(-1 !==
|
|
108
|
+
error.message.indexOf("length greater than the configured gateway's maximum length"));
|
|
109
|
+
return [2 /*return*/];
|
|
110
|
+
});
|
|
111
|
+
}); });
|
|
112
|
+
ava_1.default("invalid city - length", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
113
|
+
var address, error;
|
|
114
|
+
return __generator(this, function (_a) {
|
|
115
|
+
address = new src_1.Address();
|
|
116
|
+
address.city = "abcdefghijklmnopqrstuvwxyz";
|
|
117
|
+
error = t.throws(function () {
|
|
118
|
+
return card.charge(10)
|
|
119
|
+
.withCurrency("USD")
|
|
120
|
+
.withAddress(address)
|
|
121
|
+
.withAllowDuplicates(true)
|
|
122
|
+
.execute();
|
|
123
|
+
}, Error);
|
|
124
|
+
t.is(error.name, Error.name);
|
|
125
|
+
t.true(-1 !==
|
|
126
|
+
error.message.indexOf("length greater than the configured gateway's maximum length"));
|
|
127
|
+
return [2 /*return*/];
|
|
128
|
+
});
|
|
129
|
+
}); });
|
|
130
|
+
ava_1.default("invalid state - length", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
131
|
+
var address, error;
|
|
132
|
+
return __generator(this, function (_a) {
|
|
133
|
+
address = new src_1.Address();
|
|
134
|
+
address.state = "abcdefghijklmnopqrstuvwxyz";
|
|
135
|
+
error = t.throws(function () {
|
|
136
|
+
return card.charge(10)
|
|
137
|
+
.withCurrency("USD")
|
|
138
|
+
.withAddress(address)
|
|
139
|
+
.withAllowDuplicates(true)
|
|
140
|
+
.execute();
|
|
141
|
+
}, Error);
|
|
142
|
+
t.is(error.name, Error.name);
|
|
143
|
+
t.true(-1 !==
|
|
144
|
+
error.message.indexOf("length greater than the configured gateway's maximum length"));
|
|
145
|
+
return [2 /*return*/];
|
|
146
|
+
});
|
|
147
|
+
}); });
|
|
148
|
+
ava_1.default("invalid first name - length", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
149
|
+
var c, error;
|
|
150
|
+
return __generator(this, function (_a) {
|
|
151
|
+
c = new src_1.CreditCardData();
|
|
152
|
+
c.number = card.number;
|
|
153
|
+
c.expMonth = card.expMonth;
|
|
154
|
+
c.expYear = card.expYear;
|
|
155
|
+
c.cvn = card.cvn;
|
|
156
|
+
c.cardHolderName = "abcdefghijklmnopqrstuvwxyza smith";
|
|
157
|
+
error = t.throws(function () {
|
|
158
|
+
return c.charge(10)
|
|
159
|
+
.withCurrency("USD")
|
|
160
|
+
.withAllowDuplicates(true)
|
|
161
|
+
.execute();
|
|
162
|
+
}, Error);
|
|
163
|
+
t.is(error.name, Error.name);
|
|
164
|
+
t.true(-1 !==
|
|
165
|
+
error.message.indexOf("length greater than the configured gateway's maximum length"));
|
|
166
|
+
return [2 /*return*/];
|
|
167
|
+
});
|
|
168
|
+
}); });
|
|
169
|
+
ava_1.default("invalid last name - length", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
170
|
+
var c, error;
|
|
171
|
+
return __generator(this, function (_a) {
|
|
172
|
+
c = new src_1.CreditCardData();
|
|
173
|
+
c.number = card.number;
|
|
174
|
+
c.expMonth = card.expMonth;
|
|
175
|
+
c.expYear = card.expYear;
|
|
176
|
+
c.cvn = card.cvn;
|
|
177
|
+
c.cardHolderName = "john abcdefghijklmnopqrstuvwxyza";
|
|
178
|
+
error = t.throws(function () {
|
|
179
|
+
return c.charge(10)
|
|
180
|
+
.withCurrency("USD")
|
|
181
|
+
.withAllowDuplicates(true)
|
|
182
|
+
.execute();
|
|
183
|
+
}, Error);
|
|
184
|
+
t.is(error.name, Error.name);
|
|
185
|
+
t.true(-1 !==
|
|
186
|
+
error.message.indexOf("length greater than the configured gateway's maximum length"));
|
|
187
|
+
return [2 /*return*/];
|
|
188
|
+
});
|
|
189
|
+
}); });
|
|
190
|
+
ava_1.default("floating point math", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
191
|
+
return __generator(this, function (_a) {
|
|
192
|
+
t.is(InputValidation_1.validateAmount("portico", 15.01), "15.01");
|
|
193
|
+
t.is(InputValidation_1.validateAmount("portico", 15.0100000000001), "15.01");
|
|
194
|
+
t.is(InputValidation_1.validateAmount("portico", "15.01"), "15.01");
|
|
195
|
+
t.is(InputValidation_1.validateAmount("portico", "15.0100000000001"), "15.01");
|
|
196
|
+
t.is(InputValidation_1.validateAmount("portico", 76.68), "76.68");
|
|
197
|
+
t.is(InputValidation_1.validateAmount("portico", 76.6800000000001), "76.68");
|
|
198
|
+
t.is(InputValidation_1.validateAmount("portico", "76.68"), "76.68");
|
|
199
|
+
t.is(InputValidation_1.validateAmount("portico", "76.6800000000001"), "76.68");
|
|
200
|
+
return [2 /*return*/];
|
|
201
|
+
});
|
|
202
|
+
}); });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var ava_1 = require("ava");
|
|
4
|
+
var src_1 = require("../../../../src/");
|
|
5
|
+
var config = new src_1.ServicesConfig();
|
|
6
|
+
config.merchantId = "realexsandbox";
|
|
7
|
+
config.accountId = "internet";
|
|
8
|
+
config.sharedSecret = "Po8lRRT67a";
|
|
9
|
+
config.serviceUrl = "https://test.realexpayments.com/epage-remote.cgi";
|
|
10
|
+
var card = new src_1.CreditCardData();
|
|
11
|
+
card.number = "4111111111111111";
|
|
12
|
+
card.expMonth = "12";
|
|
13
|
+
card.expYear = "2025";
|
|
14
|
+
card.cvn = "123";
|
|
15
|
+
card.cardHolderName = "Joe Smith";
|
|
16
|
+
ava_1.default.before(function (_t) {
|
|
17
|
+
src_1.ServicesContainer.configure(config);
|
|
18
|
+
});
|
|
19
|
+
ava_1.default("credit reverse", function (t) {
|
|
20
|
+
var error = t.throws(function () {
|
|
21
|
+
return card
|
|
22
|
+
.reverse(15)
|
|
23
|
+
.withAllowDuplicates(true)
|
|
24
|
+
.execute();
|
|
25
|
+
}, src_1.UnsupportedTransactionError);
|
|
26
|
+
t.is(error.name, "UnsupportedTransactionError");
|
|
27
|
+
t.true(-1 !==
|
|
28
|
+
error.message.indexOf("selected gateway does not support this transaction type"));
|
|
29
|
+
});
|
package/package.json
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "globalpayments-api",
|
|
3
|
-
"version"
|
|
4
|
-
"description": "Global Payments SDK for NodeJS for Heartland and Global Payments eCommerce gateways",
|
|
5
|
-
"author": "Heartland Payment Systems",
|
|
6
|
-
"license": "GPL-2.0",
|
|
7
|
-
"engines": {
|
|
8
|
-
"node": ">=16.20.2"
|
|
9
|
-
},
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/globalpayments/node-sdk.git"
|
|
13
|
-
},
|
|
14
|
-
"main": "./lib/src/index.js",
|
|
15
|
-
"typings": "./lib/src/index",
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "tsc",
|
|
18
|
-
"test:jest": "jest",
|
|
19
|
-
"test:serial": "jest --runInBand put/path/to-your file here",
|
|
20
|
-
"build:netsuite": "webpack --env.GP_NETSUITE_BUILD --config config/webpack.netsuite.js && node bin/netsuite-post.js",
|
|
21
|
-
"build:clean": "rimraf lib",
|
|
22
|
-
"docs": "typedoc --mode file --name \"GlobalPayments.Api\" --project tsconfig.json --out docs src",
|
|
23
|
-
"format": "prettier --write --config .prettierrc 'src/**/*.ts' 'test/**/*.ts' '*.md'",
|
|
24
|
-
"prebuild": "npm-run-all test:lint",
|
|
25
|
-
"prepublish": "npm-run-all build",
|
|
26
|
-
"prepublishOnly": "npm-run-all build",
|
|
27
|
-
"pretest": "npm-run-all build:clean test:lint build",
|
|
28
|
-
"test:lint": "eslint \"src/**/*.ts*\" \"test/**/*.ts\" --fix"
|
|
29
|
-
},
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"@azz/elementtree": "^0.1.6",
|
|
32
|
-
"es6-promise": "^4.2.8",
|
|
33
|
-
"eslint-config-prettier": "^9.0.0",
|
|
34
|
-
"sha1": "^1.1.1",
|
|
35
|
-
"typedarray": "^0.0.6",
|
|
36
|
-
"url": "^0.11.0"
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@hitc/netsuite-types": "^2017.2.32",
|
|
40
|
-
"@types/jest": "^29.5.12",
|
|
41
|
-
"@types/node": "20.6.0",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
|
43
|
-
"@typescript-eslint/parser": "^6.7.3",
|
|
44
|
-
"eslint": "^8.50.0",
|
|
45
|
-
"eslint-plugin-prettier": "^5.0.0",
|
|
46
|
-
"jest": "^29.7.0",
|
|
47
|
-
"npm-run-all": "^4.1.5",
|
|
48
|
-
"prettier": "3.0.3",
|
|
49
|
-
"rimraf": "^2.6.3",
|
|
50
|
-
"ts-jest": "^29.1.5",
|
|
51
|
-
"tslint": "^6.1.3",
|
|
52
|
-
"typedoc": "0.25.1",
|
|
53
|
-
"typescript": "5.2.2",
|
|
54
|
-
"webpack": "^5.
|
|
55
|
-
},
|
|
56
|
-
"files": [
|
|
57
|
-
"lib/src/**",
|
|
58
|
-
"lib/test/**",
|
|
59
|
-
"appsec.properties",
|
|
60
|
-
"CHANGELOG.md"
|
|
61
|
-
]
|
|
62
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "globalpayments-api",
|
|
3
|
+
"version": "3.10.2",
|
|
4
|
+
"description": "Global Payments SDK for NodeJS for Heartland and Global Payments eCommerce gateways",
|
|
5
|
+
"author": "Heartland Payment Systems",
|
|
6
|
+
"license": "GPL-2.0",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=16.20.2"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/globalpayments/node-sdk.git"
|
|
13
|
+
},
|
|
14
|
+
"main": "./lib/src/index.js",
|
|
15
|
+
"typings": "./lib/src/index",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"test:jest": "jest",
|
|
19
|
+
"test:serial": "jest --runInBand put/path/to-your file here",
|
|
20
|
+
"build:netsuite": "webpack --env.GP_NETSUITE_BUILD --config config/webpack.netsuite.js && node bin/netsuite-post.js",
|
|
21
|
+
"build:clean": "rimraf lib",
|
|
22
|
+
"docs": "typedoc --mode file --name \"GlobalPayments.Api\" --project tsconfig.json --out docs src",
|
|
23
|
+
"format": "prettier --write --config .prettierrc 'src/**/*.ts' 'test/**/*.ts' '*.md'",
|
|
24
|
+
"prebuild": "npm-run-all test:lint",
|
|
25
|
+
"prepublish": "npm-run-all build",
|
|
26
|
+
"prepublishOnly": "npm-run-all build",
|
|
27
|
+
"pretest": "npm-run-all build:clean test:lint build",
|
|
28
|
+
"test:lint": "eslint \"src/**/*.ts*\" \"test/**/*.ts\" --fix"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@azz/elementtree": "^0.1.6",
|
|
32
|
+
"es6-promise": "^4.2.8",
|
|
33
|
+
"eslint-config-prettier": "^9.0.0",
|
|
34
|
+
"sha1": "^1.1.1",
|
|
35
|
+
"typedarray": "^0.0.6",
|
|
36
|
+
"url": "^0.11.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@hitc/netsuite-types": "^2017.2.32",
|
|
40
|
+
"@types/jest": "^29.5.12",
|
|
41
|
+
"@types/node": "20.6.0",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
|
43
|
+
"@typescript-eslint/parser": "^6.7.3",
|
|
44
|
+
"eslint": "^8.50.0",
|
|
45
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
46
|
+
"jest": "^29.7.0",
|
|
47
|
+
"npm-run-all": "^4.1.5",
|
|
48
|
+
"prettier": "3.0.3",
|
|
49
|
+
"rimraf": "^2.6.3",
|
|
50
|
+
"ts-jest": "^29.1.5",
|
|
51
|
+
"tslint": "^6.1.3",
|
|
52
|
+
"typedoc": "0.25.1",
|
|
53
|
+
"typescript": "5.2.2",
|
|
54
|
+
"webpack": "^5.94.0"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"lib/src/**",
|
|
58
|
+
"lib/test/**",
|
|
59
|
+
"appsec.properties",
|
|
60
|
+
"CHANGELOG.md"
|
|
61
|
+
]
|
|
62
|
+
}
|