globalpayments-api 1.4.7 → 1.4.9

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.
Files changed (89) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/lib/src/Builders/PayFacBuilder.d.ts +96 -0
  3. package/lib/src/Builders/PayFacBuilder.js +184 -0
  4. package/lib/src/Entities/DocumentUploadData.d.ts +13 -0
  5. package/lib/src/Entities/DocumentUploadData.js +48 -0
  6. package/lib/src/Entities/Enums.d.ts +44 -1
  7. package/lib/src/Entities/Enums.js +119 -1
  8. package/lib/src/Entities/ProFac/AccountBalanceResponseData.d.ts +7 -0
  9. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js +9 -0
  10. package/lib/src/Entities/ProFac/AccountPermissions.d.ts +15 -0
  11. package/lib/src/Entities/ProFac/AccountPermissions.js +9 -0
  12. package/lib/src/Entities/ProFac/BankAccountData.d.ts +10 -0
  13. package/lib/src/Entities/ProFac/BankAccountData.js +9 -0
  14. package/lib/src/Entities/ProFac/BankAccountOwnershipData.d.ts +8 -0
  15. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js +11 -0
  16. package/lib/src/Entities/ProFac/BeneficialOwnerData.d.ts +6 -0
  17. package/lib/src/Entities/ProFac/BeneficialOwnerData.js +10 -0
  18. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.d.ts +5 -0
  19. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js +9 -0
  20. package/lib/src/Entities/ProFac/BusinessData.d.ts +14 -0
  21. package/lib/src/Entities/ProFac/BusinessData.js +11 -0
  22. package/lib/src/Entities/ProFac/DeviceAttributeInfo.d.ts +4 -0
  23. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js +9 -0
  24. package/lib/src/Entities/ProFac/DeviceData.d.ts +5 -0
  25. package/lib/src/Entities/ProFac/DeviceData.js +10 -0
  26. package/lib/src/Entities/ProFac/DeviceInfo.d.ts +6 -0
  27. package/lib/src/Entities/ProFac/DeviceInfo.js +9 -0
  28. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.d.ts +7 -0
  29. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js +13 -0
  30. package/lib/src/Entities/ProFac/GrossBillingInformation.d.ts +8 -0
  31. package/lib/src/Entities/ProFac/GrossBillingInformation.js +9 -0
  32. package/lib/src/Entities/ProFac/OrderDevice.d.ts +18 -0
  33. package/lib/src/Entities/ProFac/OrderDevice.js +9 -0
  34. package/lib/src/Entities/ProFac/OwnersData.d.ts +12 -0
  35. package/lib/src/Entities/ProFac/OwnersData.js +11 -0
  36. package/lib/src/Entities/ProFac/PayFacResponseData.d.ts +55 -0
  37. package/lib/src/Entities/ProFac/PayFacResponseData.js +9 -0
  38. package/lib/src/Entities/ProFac/RenewAccountData.d.ts +10 -0
  39. package/lib/src/Entities/ProFac/RenewAccountData.js +11 -0
  40. package/lib/src/Entities/ProFac/SignificantOwnerData.d.ts +8 -0
  41. package/lib/src/Entities/ProFac/SignificantOwnerData.js +11 -0
  42. package/lib/src/Entities/ProFac/ThreatRiskData.d.ts +5 -0
  43. package/lib/src/Entities/ProFac/ThreatRiskData.js +9 -0
  44. package/lib/src/Entities/ProFac/UserPersonalData.d.ts +26 -0
  45. package/lib/src/Entities/ProFac/UserPersonalData.js +14 -0
  46. package/lib/src/Entities/SSORequestData.d.ts +5 -0
  47. package/lib/src/Entities/SSORequestData.js +9 -0
  48. package/lib/src/Entities/Transaction.d.ts +2 -0
  49. package/lib/src/Gateways/IPayFacProvider.d.ts +5 -0
  50. package/lib/src/Gateways/IPayFacProvider.js +2 -0
  51. package/lib/src/Gateways/PayPlanConnector.d.ts +1 -0
  52. package/lib/src/Gateways/PayPlanConnector.js +13 -1
  53. package/lib/src/Gateways/PorticoConnector.d.ts +1 -0
  54. package/lib/src/Gateways/PorticoConnector.js +6 -0
  55. package/lib/src/Gateways/ProPayConnector.d.ts +41 -0
  56. package/lib/src/Gateways/ProPayConnector.js +698 -0
  57. package/lib/src/Gateways/XmlGateway.d.ts +1 -0
  58. package/lib/src/Gateways/XmlGateway.js +9 -0
  59. package/lib/src/PaymentMethods/CreditCardData.d.ts +1 -0
  60. package/lib/src/PaymentMethods/CreditCardData.js +6 -0
  61. package/lib/src/Services/PayFacService.d.ts +26 -0
  62. package/lib/src/Services/PayFacService.js +77 -0
  63. package/lib/src/ServicesConfig.d.ts +5 -0
  64. package/lib/src/ServicesContainer.d.ts +4 -1
  65. package/lib/src/ServicesContainer.js +17 -2
  66. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.d.ts +1 -0
  67. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js +100 -0
  68. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.d.ts +1 -0
  69. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js +352 -0
  70. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.d.ts +1 -0
  71. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js +123 -0
  72. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.d.ts +1 -0
  73. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js +146 -0
  74. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +39 -0
  75. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +371 -0
  76. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.d.ts +1 -0
  77. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js +100 -0
  78. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.d.ts +1 -0
  79. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js +535 -0
  80. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.d.ts +1 -0
  81. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js +124 -0
  82. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.d.ts +1 -0
  83. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js +144 -0
  84. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.d.ts +33 -0
  85. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +268 -0
  86. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +4 -0
  87. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +30 -0
  88. package/logger.txt +478 -5
  89. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## Latest
4
4
 
5
+ #### Profac Enhancements
6
+
7
+ - Profac Implementation - Implement profac functionality.
8
+
9
+ ## v1.4.9 (05/17/23)
10
+
11
+ #### Reporting Enhancements
12
+
13
+ - SdkNameVersion Identifier: Name and Version of the SDK used for integration, where applicable.
14
+
15
+ ## v1.4.8 (12/13/22)
16
+
5
17
  #### Enhancements
6
18
 
7
19
  - Portico Connector: WalletData element added to process ApplePay/GooglePay Transactions using
@@ -0,0 +1,96 @@
1
+ import { BaseBuilder } from "./";
2
+ import { CreditCardData } from "../PaymentMethods";
3
+ import { DocumentUploadData } from "../Entities/DocumentUploadData";
4
+ import { AccountPermissions } from "../Entities/ProFac/AccountPermissions";
5
+ import { BankAccountData } from "../Entities/ProFac/BankAccountData";
6
+ import { BankAccountOwnershipData } from "../Entities/ProFac/BankAccountOwnershipData";
7
+ import { BeneficialOwnerData } from "../Entities/ProFac/BeneficialOwnerData";
8
+ import { BusinessData } from "../Entities/ProFac/BusinessData";
9
+ import { DeviceData } from "../Entities/ProFac/DeviceData";
10
+ import { FlashFundsPaymentCardData } from "../Entities/ProFac/FlashFundsPaymentCardData";
11
+ import { GrossBillingInformation } from "../Entities/ProFac/GrossBillingInformation";
12
+ import { RenewAccountData } from "../Entities/ProFac/RenewAccountData";
13
+ import { SignificantOwnerData } from "../Entities/ProFac/SignificantOwnerData";
14
+ import { ThreatRiskData } from "../Entities/ProFac/ThreatRiskData";
15
+ import { UserPersonalData } from "../Entities/ProFac/UserPersonalData";
16
+ import { SSORequestData } from "../Entities/SSORequestData";
17
+ import { Address, Transaction, TransactionModifier, TransactionType } from "../";
18
+ import { OrderDevice } from "../Entities/ProFac/OrderDevice";
19
+ export declare class PayFacBuilder extends BaseBuilder<Transaction> {
20
+ protected setupValidations(): void;
21
+ transactionType: TransactionType;
22
+ transactionModifier: TransactionModifier;
23
+ bankAccountData: BankAccountData;
24
+ beneficialOwnerData: BeneficialOwnerData;
25
+ deviceData: DeviceData;
26
+ timeZone: string;
27
+ businessData: BusinessData;
28
+ significantOwnerData: SignificantOwnerData;
29
+ threatRiskData: ThreatRiskData;
30
+ userPersonalData: UserPersonalData;
31
+ creditCardInformation: CreditCardData;
32
+ aCHInformation: BankAccountData;
33
+ mailingAddressInformation: Address;
34
+ secondaryBankInformation: BankAccountData;
35
+ grossBillingInformation: GrossBillingInformation;
36
+ negativeLimit: string;
37
+ renewalAccountData: RenewAccountData;
38
+ accountNumber: string;
39
+ password: string;
40
+ accountPermissions: AccountPermissions;
41
+ primaryBankAccountOwner: BankAccountOwnershipData;
42
+ secondaryBankAccountOwner: BankAccountOwnershipData;
43
+ documentUploadData: DocumentUploadData;
44
+ sSORequestData: SSORequestData;
45
+ amount: string;
46
+ receivingAccountNumber: string;
47
+ allowPending: boolean;
48
+ cCAmount: string;
49
+ requireCCRefund: boolean;
50
+ transNum: string;
51
+ externalID: string;
52
+ sourceEmail: string;
53
+ gatewayTransactionId: string;
54
+ cardBrandTransactionId: string;
55
+ globaltransId: string;
56
+ globalTransSource: string;
57
+ orderDevice: OrderDevice;
58
+ constructor(type: TransactionType, modifer?: TransactionModifier);
59
+ execute(): Promise<Transaction>;
60
+ withBankAccountData(bankAccountData: BankAccountData): this;
61
+ withBeneficialOwnerData(beneficialOwnerData: BeneficialOwnerData): this;
62
+ withDeviceData(deviceData: DeviceData): this;
63
+ withTimeZone(timezone: string): this;
64
+ withBusinessData(businessData: BusinessData): this;
65
+ withSignificantOwnerData(significantOwnerData: SignificantOwnerData): this;
66
+ withThreatRiskData(threatRiskData: ThreatRiskData): this;
67
+ withUserPersonalData(userPersonalData: UserPersonalData): this;
68
+ withCreditCardData(creditCardInformation: CreditCardData): this;
69
+ withACHData(achInformation: BankAccountData): this;
70
+ withMailingAddress(mailingAddressInformation: Address): this;
71
+ withSecondaryBankAccountData(secondaryBankInformation: BankAccountData): this;
72
+ withGrossBillingSettleData(grossBillingInformation: GrossBillingInformation): this;
73
+ withAccountNumber(accountNumber: string): this;
74
+ withPassword(password: string): this;
75
+ withAccountPermissions(accountPermissions: AccountPermissions): this;
76
+ withPrimaryBankAccountOwner(primaryBankAccountOwner: BankAccountOwnershipData): this;
77
+ withSecondaryBankAccountOwner(secondaryBankAccountOwner: BankAccountOwnershipData): this;
78
+ withDocumentUploadData(docUploadData: DocumentUploadData): this;
79
+ withSSORequestData(ssoRequestData: SSORequestData): this;
80
+ withNegativeLimit(negativeLimit: string): this;
81
+ withRenewalAccountData(renewalAccountData: RenewAccountData): this;
82
+ withAmount(amount: string): this;
83
+ withFlashFundsPaymentCardData(cardData: FlashFundsPaymentCardData): this;
84
+ withReceivingAccountNumber(receivingAccountNumber: string): this;
85
+ withAllowPending(allowPending: boolean): this;
86
+ withCCAmount(ccAmount: string): this;
87
+ withRequireCCRefund(requireCCRefund: boolean): this;
88
+ withTransNum(transNum: string): this;
89
+ withGatewayTransactionId(gatewayTransactionId: string): this;
90
+ withCardBrandTransactionId(cardBrandTransactionId: string): this;
91
+ withGlobaltransId(globaltransId: string): this;
92
+ withGlobalTransSource(globalTransSource: string): this;
93
+ withExternalID(externalId: string): this;
94
+ withSourceEmail(sourceEmail: string): this;
95
+ withOrderDevice(orderDevice: OrderDevice): this;
96
+ }
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.PayFacBuilder = void 0;
19
+ var _1 = require("./");
20
+ var __1 = require("../");
21
+ var PayFacBuilder = /** @class */ (function (_super) {
22
+ __extends(PayFacBuilder, _super);
23
+ function PayFacBuilder(type, modifer) {
24
+ if (modifer === void 0) { modifer = __1.TransactionModifier.None; }
25
+ var _this = _super.call(this) || this;
26
+ _this.transactionType = type;
27
+ _this.transactionModifier = modifer;
28
+ return _this;
29
+ }
30
+ PayFacBuilder.prototype.setupValidations = function () { };
31
+ PayFacBuilder.prototype.execute = function () {
32
+ _super.prototype.execute.call(this);
33
+ return __1.ServicesContainer.instance().getXmlClient().processPayFac(this);
34
+ };
35
+ PayFacBuilder.prototype.withBankAccountData = function (bankAccountData) {
36
+ this.bankAccountData = bankAccountData;
37
+ return this;
38
+ };
39
+ PayFacBuilder.prototype.withBeneficialOwnerData = function (beneficialOwnerData) {
40
+ this.beneficialOwnerData = beneficialOwnerData;
41
+ return this;
42
+ };
43
+ PayFacBuilder.prototype.withDeviceData = function (deviceData) {
44
+ this.deviceData = deviceData;
45
+ return this;
46
+ };
47
+ /// <summary>
48
+ /// Required for partners ordering Portico devices. Valid values: [ UTC, PT, MST, MT, CT, ET, HST, AT, AST, AKST, ACT, EET, EAT, MET, NET, PLT, IST, BST, VST, CTT, JST, ACT, AET, SST, NST, MIT, CNT, AGT, CAT ]
49
+ /// </summary>
50
+ PayFacBuilder.prototype.withTimeZone = function (timezone) {
51
+ this.timeZone = timezone;
52
+ return this;
53
+ };
54
+ PayFacBuilder.prototype.withBusinessData = function (businessData) {
55
+ this.businessData = businessData;
56
+ return this;
57
+ };
58
+ PayFacBuilder.prototype.withSignificantOwnerData = function (significantOwnerData) {
59
+ this.significantOwnerData = significantOwnerData;
60
+ return this;
61
+ };
62
+ PayFacBuilder.prototype.withThreatRiskData = function (threatRiskData) {
63
+ this.threatRiskData = threatRiskData;
64
+ return this;
65
+ };
66
+ PayFacBuilder.prototype.withUserPersonalData = function (userPersonalData) {
67
+ this.userPersonalData = userPersonalData;
68
+ return this;
69
+ };
70
+ PayFacBuilder.prototype.withCreditCardData = function (creditCardInformation) {
71
+ this.creditCardInformation = creditCardInformation;
72
+ return this;
73
+ };
74
+ PayFacBuilder.prototype.withACHData = function (achInformation) {
75
+ this.aCHInformation = achInformation;
76
+ return this;
77
+ };
78
+ PayFacBuilder.prototype.withMailingAddress = function (mailingAddressInformation) {
79
+ this.mailingAddressInformation = mailingAddressInformation;
80
+ return this;
81
+ };
82
+ PayFacBuilder.prototype.withSecondaryBankAccountData = function (secondaryBankInformation) {
83
+ this.secondaryBankInformation = secondaryBankInformation;
84
+ return this;
85
+ };
86
+ PayFacBuilder.prototype.withGrossBillingSettleData = function (grossBillingInformation) {
87
+ this.grossBillingInformation = grossBillingInformation;
88
+ return this;
89
+ };
90
+ PayFacBuilder.prototype.withAccountNumber = function (accountNumber) {
91
+ this.accountNumber = accountNumber;
92
+ return this;
93
+ };
94
+ PayFacBuilder.prototype.withPassword = function (password) {
95
+ this.password = password;
96
+ return this;
97
+ };
98
+ PayFacBuilder.prototype.withAccountPermissions = function (accountPermissions) {
99
+ this.accountPermissions = accountPermissions;
100
+ return this;
101
+ };
102
+ PayFacBuilder.prototype.withPrimaryBankAccountOwner = function (primaryBankAccountOwner) {
103
+ this.primaryBankAccountOwner = primaryBankAccountOwner;
104
+ return this;
105
+ };
106
+ PayFacBuilder.prototype.withSecondaryBankAccountOwner = function (secondaryBankAccountOwner) {
107
+ this.secondaryBankAccountOwner = secondaryBankAccountOwner;
108
+ return this;
109
+ };
110
+ PayFacBuilder.prototype.withDocumentUploadData = function (docUploadData) {
111
+ this.documentUploadData = docUploadData;
112
+ return this;
113
+ };
114
+ PayFacBuilder.prototype.withSSORequestData = function (ssoRequestData) {
115
+ this.sSORequestData = ssoRequestData;
116
+ return this;
117
+ };
118
+ PayFacBuilder.prototype.withNegativeLimit = function (negativeLimit) {
119
+ this.negativeLimit = negativeLimit;
120
+ return this;
121
+ };
122
+ PayFacBuilder.prototype.withRenewalAccountData = function (renewalAccountData) {
123
+ this.renewalAccountData = renewalAccountData;
124
+ return this;
125
+ };
126
+ PayFacBuilder.prototype.withAmount = function (amount) {
127
+ this.amount = amount;
128
+ return this;
129
+ };
130
+ PayFacBuilder.prototype.withFlashFundsPaymentCardData = function (cardData) {
131
+ this.FlashFundsPaymentCardData = cardData;
132
+ return this;
133
+ };
134
+ PayFacBuilder.prototype.withReceivingAccountNumber = function (receivingAccountNumber) {
135
+ this.receivingAccountNumber = receivingAccountNumber;
136
+ return this;
137
+ };
138
+ PayFacBuilder.prototype.withAllowPending = function (allowPending) {
139
+ this.allowPending = allowPending;
140
+ return this;
141
+ };
142
+ PayFacBuilder.prototype.withCCAmount = function (ccAmount) {
143
+ this.cCAmount = ccAmount;
144
+ return this;
145
+ };
146
+ PayFacBuilder.prototype.withRequireCCRefund = function (requireCCRefund) {
147
+ this.requireCCRefund = requireCCRefund;
148
+ return this;
149
+ };
150
+ PayFacBuilder.prototype.withTransNum = function (transNum) {
151
+ this.transNum = transNum;
152
+ return this;
153
+ };
154
+ PayFacBuilder.prototype.withGatewayTransactionId = function (gatewayTransactionId) {
155
+ this.gatewayTransactionId = gatewayTransactionId;
156
+ return this;
157
+ };
158
+ PayFacBuilder.prototype.withCardBrandTransactionId = function (cardBrandTransactionId) {
159
+ this.cardBrandTransactionId = cardBrandTransactionId;
160
+ return this;
161
+ };
162
+ PayFacBuilder.prototype.withGlobaltransId = function (globaltransId) {
163
+ this.globaltransId = globaltransId;
164
+ return this;
165
+ };
166
+ PayFacBuilder.prototype.withGlobalTransSource = function (globalTransSource) {
167
+ this.globalTransSource = globalTransSource;
168
+ return this;
169
+ };
170
+ PayFacBuilder.prototype.withExternalID = function (externalId) {
171
+ this.externalID = externalId;
172
+ return this;
173
+ };
174
+ PayFacBuilder.prototype.withSourceEmail = function (sourceEmail) {
175
+ this.sourceEmail = sourceEmail;
176
+ return this;
177
+ };
178
+ PayFacBuilder.prototype.withOrderDevice = function (orderDevice) {
179
+ this.orderDevice = orderDevice;
180
+ return this;
181
+ };
182
+ return PayFacBuilder;
183
+ }(_1.BaseBuilder));
184
+ exports.PayFacBuilder = PayFacBuilder;
@@ -0,0 +1,13 @@
1
+ export declare class DocumentUploadData {
2
+ documentName: string;
3
+ transactionReference: string;
4
+ docType: string;
5
+ get DocType(): string;
6
+ set DocType(value: string);
7
+ document: string;
8
+ docCategory: string;
9
+ documentPath: string;
10
+ DocumentPath(value: string): void;
11
+ private getByteArray;
12
+ _validDocTypes: Array<string>;
13
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DocumentUploadData = void 0;
4
+ var fs = require("fs");
5
+ var DocumentUploadData = /** @class */ (function () {
6
+ function DocumentUploadData() {
7
+ this._validDocTypes = ['tif', 'tiff', 'bmp', 'jpg', 'jpeg', 'gif', 'png', 'doc', 'docx'];
8
+ }
9
+ Object.defineProperty(DocumentUploadData.prototype, "DocType", {
10
+ get: function () {
11
+ return this.docType;
12
+ },
13
+ set: function (value) {
14
+ if (this._validDocTypes.includes(value)) {
15
+ this.docType = value;
16
+ }
17
+ else {
18
+ throw new Error("The provided file type is not supported.");
19
+ }
20
+ },
21
+ enumerable: false,
22
+ configurable: true
23
+ });
24
+ DocumentUploadData.prototype.DocumentPath = function (value) {
25
+ var docPath = value;
26
+ if (docPath != null) {
27
+ var documentType = docPath.substring(docPath.lastIndexOf('.') + 1);
28
+ if (this._validDocTypes.includes(documentType)) {
29
+ this.docType = documentType;
30
+ this.document = String(this.getByteArray(docPath));
31
+ }
32
+ else {
33
+ throw new Error("The document provided is not a valid file type.");
34
+ }
35
+ }
36
+ else {
37
+ throw new Error("DocumentPath has not been set");
38
+ }
39
+ };
40
+ DocumentUploadData.prototype.getByteArray = function (filePath) {
41
+ var fileData = fs.readFileSync(filePath);
42
+ var buff = Buffer.from(fileData);
43
+ var base64data = buff.toString('base64');
44
+ return base64data;
45
+ };
46
+ return DocumentUploadData;
47
+ }());
48
+ exports.DocumentUploadData = DocumentUploadData;
@@ -214,7 +214,43 @@ export declare enum TransactionType {
214
214
  Fetch = 1048576,
215
215
  Search = 2097152,
216
216
  Hold = 4194304,
217
- Release = 8388608
217
+ Release = 8388608,
218
+ CreateAccount = 256,
219
+ EditAccount = 512,
220
+ ResetPassword = 1024,
221
+ RenewAccount = 2048,
222
+ UpdateBeneficialOwnership = 4096,
223
+ DisownAccount = 8192,
224
+ UploadDocumentChargeback = 16384,
225
+ UploadDocument = 32768,
226
+ ObtainSSOKey = 65536,
227
+ UpdateBankAccountOwnership = 131072,
228
+ AddFunds = 262144,
229
+ SweepFunds = 524288,
230
+ AddCardFlashFunds = 1048576,
231
+ PushMoneyFlashFunds = 2097152,
232
+ DisburseFunds = 4194304,
233
+ SpendBack = 8388608,
234
+ ReverseSplitPay = 16777216,
235
+ SplitFunds = 33554432,
236
+ GetAccountDetails = 67108864,
237
+ GetAccountBalance = 134217728,
238
+ Reauth = 268435456,
239
+ SiteConfig = 536870912,
240
+ TimeRequest = 1073741824,
241
+ GetTokenInfo = -2147483648,
242
+ PayLinkUpdate = -2147483648,
243
+ OrderDevice = 1
244
+ }
245
+ export declare enum ProPayAccountStatus {
246
+ ReadyToProcess = 0,
247
+ FraudAccount = 1,
248
+ RiskwiseDeclined = 2,
249
+ Hold = 3,
250
+ Canceled = 4,
251
+ FraudVictim = 5,
252
+ ClosedEula = 6,
253
+ ClosedExcessiveChargeback = 7
218
254
  }
219
255
  export declare enum MobilePaymentMethodType {
220
256
  APPLEPAY = "apple-pay",
@@ -228,3 +264,10 @@ export declare enum PaymentDataSourceType {
228
264
  GOOGLEPAYWEB = "GooglePayWeb",
229
265
  DISCOVER3DSECURE = "Discover 3DSecure"
230
266
  }
267
+ export declare enum PropayTermsVersion {
268
+ merchantUS = 1,
269
+ paymentUS = 2,
270
+ merchantCA = 3,
271
+ merchantUK = 4,
272
+ merchantAU = 5
273
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentDataSourceType = exports.MobilePaymentMethodType = exports.TransactionType = exports.TransactionModifier = exports.TimeZoneConversion = exports.TaxType = exports.StoredCredentialInitiator = exports.SecCode = exports.ScheduleFrequency = exports.ReportType = exports.RecurringType = exports.RecurringSequence = exports.ReasonCode = exports.PaymentSchedule = exports.PaymentMethodType = exports.InquiryType = exports.HppVersion = exports.GiftEntryMethod = exports.FraudFilterMode = exports.ExceptionCodes = exports.EntryMethod = exports.EmailReceipt = exports.EcommerceChannel = exports.CvnPresenceIndicator = exports.CurrencyType = exports.CheckType = exports.AliasAction = exports.AddressType = exports.AccountType = void 0;
3
+ exports.PropayTermsVersion = exports.PaymentDataSourceType = exports.MobilePaymentMethodType = exports.ProPayAccountStatus = exports.TransactionType = exports.TransactionModifier = exports.TimeZoneConversion = exports.TaxType = exports.StoredCredentialInitiator = exports.SecCode = exports.ScheduleFrequency = exports.ReportType = exports.RecurringType = exports.RecurringSequence = exports.ReasonCode = exports.PaymentSchedule = exports.PaymentMethodType = exports.InquiryType = exports.HppVersion = exports.GiftEntryMethod = exports.FraudFilterMode = exports.ExceptionCodes = exports.EntryMethod = exports.EmailReceipt = exports.EcommerceChannel = exports.CvnPresenceIndicator = exports.CurrencyType = exports.CheckType = exports.AliasAction = exports.AddressType = exports.AccountType = void 0;
4
4
  var AccountType;
5
5
  (function (AccountType) {
6
6
  AccountType["Checking"] = "CHECKING";
@@ -250,7 +250,117 @@ var TransactionType;
250
250
  TransactionType[TransactionType["Search"] = 2097152] = "Search";
251
251
  TransactionType[TransactionType["Hold"] = 4194304] = "Hold";
252
252
  TransactionType[TransactionType["Release"] = 8388608] = "Release";
253
+ /// <summary>
254
+ ///
255
+ /// ProPay: Create Account
256
+ /// </summary>
257
+ TransactionType[TransactionType["CreateAccount"] = 256] = "CreateAccount";
258
+ /// <summary>
259
+ /// ProPay: Edit Account
260
+ /// </summary>
261
+ TransactionType[TransactionType["EditAccount"] = 512] = "EditAccount";
262
+ /// <summary>
263
+ /// ProPay: Reset Account Password
264
+ /// </summary>
265
+ TransactionType[TransactionType["ResetPassword"] = 1024] = "ResetPassword";
266
+ /// <summary>
267
+ /// ProPay: Renew Account
268
+ /// </summary>
269
+ TransactionType[TransactionType["RenewAccount"] = 2048] = "RenewAccount";
270
+ /// <summary>
271
+ /// ProPay: Update Beneficial Ownership Information
272
+ /// </summary>
273
+ TransactionType[TransactionType["UpdateBeneficialOwnership"] = 4096] = "UpdateBeneficialOwnership";
274
+ /// <summary>
275
+ /// ProPay: Disown an account
276
+ /// </summary>
277
+ TransactionType[TransactionType["DisownAccount"] = 8192] = "DisownAccount";
278
+ /// <summary>
279
+ /// ProPay: Upload a document to a ProPay account related to a chargeback
280
+ /// </summary>
281
+ TransactionType[TransactionType["UploadDocumentChargeback"] = 16384] = "UploadDocumentChargeback";
282
+ /// <summary>
283
+ /// ProPay: Upload a document to a ProPay account
284
+ /// </summary>
285
+ TransactionType[TransactionType["UploadDocument"] = 32768] = "UploadDocument";
286
+ /// <summary>
287
+ /// ProPay: Obtain a single-sign-on key
288
+ /// </summary>
289
+ TransactionType[TransactionType["ObtainSSOKey"] = 65536] = "ObtainSSOKey";
290
+ /// <summary>
291
+ /// ProPay: Update bank account ownership information
292
+ /// </summary>
293
+ TransactionType[TransactionType["UpdateBankAccountOwnership"] = 131072] = "UpdateBankAccountOwnership";
294
+ /// <summary>
295
+ /// ProPay: Add funds to a ProPay account (EFT)
296
+ /// </summary>
297
+ TransactionType[TransactionType["AddFunds"] = 262144] = "AddFunds";
298
+ /// <summary>
299
+ /// ProPay: Sweep funds from a ProPay account (EFT)
300
+ /// </summary>
301
+ TransactionType[TransactionType["SweepFunds"] = 524288] = "SweepFunds";
302
+ /// <summary>
303
+ /// ProPay: Add a card for Flash Funds
304
+ /// </summary>
305
+ TransactionType[TransactionType["AddCardFlashFunds"] = 1048576] = "AddCardFlashFunds";
306
+ /// <summary>
307
+ /// ProPay: Move money out via Flash Funds
308
+ /// </summary>
309
+ TransactionType[TransactionType["PushMoneyFlashFunds"] = 2097152] = "PushMoneyFlashFunds";
310
+ /// <summary>
311
+ /// ProPay: Disburse funds to a ProPay account
312
+ /// </summary>
313
+ TransactionType[TransactionType["DisburseFunds"] = 4194304] = "DisburseFunds";
314
+ /// <summary>
315
+ /// ProPay: SpendBack Transaction
316
+ /// </summary>
317
+ TransactionType[TransactionType["SpendBack"] = 8388608] = "SpendBack";
318
+ /// <summary>
319
+ /// ProPay: Roll back a SplitPay transaction
320
+ /// </summary>
321
+ TransactionType[TransactionType["ReverseSplitPay"] = 16777216] = "ReverseSplitPay";
322
+ /// <summary>
323
+ /// ProPay: Split funds from an existing transaction
324
+ /// </summary>
325
+ TransactionType[TransactionType["SplitFunds"] = 33554432] = "SplitFunds";
326
+ /// <summary>
327
+ /// ProPay: Get Account details
328
+ /// </summary>
329
+ TransactionType[TransactionType["GetAccountDetails"] = 67108864] = "GetAccountDetails";
330
+ /// <summary>
331
+ /// ProPay: Get Account balance
332
+ /// </summary>
333
+ TransactionType[TransactionType["GetAccountBalance"] = 134217728] = "GetAccountBalance";
334
+ /// <summary>
335
+ /// Indicates a transaction reauthorization
336
+ /// </summary>
337
+ TransactionType[TransactionType["Reauth"] = 268435456] = "Reauth";
338
+ /// <summary>
339
+ ///
340
+ /// </summary>
341
+ TransactionType[TransactionType["SiteConfig"] = 536870912] = "SiteConfig";
342
+ /// <summary>
343
+ ///
344
+ /// </summary>
345
+ TransactionType[TransactionType["TimeRequest"] = 1073741824] = "TimeRequest";
346
+ /// <summary>
347
+ /// Get Token Information for the given token
348
+ /// </summary>
349
+ TransactionType[TransactionType["GetTokenInfo"] = -2147483648] = "GetTokenInfo";
350
+ TransactionType[TransactionType["PayLinkUpdate"] = -2147483648] = "PayLinkUpdate";
351
+ TransactionType[TransactionType["OrderDevice"] = 1] = "OrderDevice";
253
352
  })(TransactionType = exports.TransactionType || (exports.TransactionType = {}));
353
+ var ProPayAccountStatus;
354
+ (function (ProPayAccountStatus) {
355
+ ProPayAccountStatus[ProPayAccountStatus["ReadyToProcess"] = 0] = "ReadyToProcess";
356
+ ProPayAccountStatus[ProPayAccountStatus["FraudAccount"] = 1] = "FraudAccount";
357
+ ProPayAccountStatus[ProPayAccountStatus["RiskwiseDeclined"] = 2] = "RiskwiseDeclined";
358
+ ProPayAccountStatus[ProPayAccountStatus["Hold"] = 3] = "Hold";
359
+ ProPayAccountStatus[ProPayAccountStatus["Canceled"] = 4] = "Canceled";
360
+ ProPayAccountStatus[ProPayAccountStatus["FraudVictim"] = 5] = "FraudVictim";
361
+ ProPayAccountStatus[ProPayAccountStatus["ClosedEula"] = 6] = "ClosedEula";
362
+ ProPayAccountStatus[ProPayAccountStatus["ClosedExcessiveChargeback"] = 7] = "ClosedExcessiveChargeback";
363
+ })(ProPayAccountStatus = exports.ProPayAccountStatus || (exports.ProPayAccountStatus = {}));
254
364
  var MobilePaymentMethodType;
255
365
  (function (MobilePaymentMethodType) {
256
366
  MobilePaymentMethodType["APPLEPAY"] = "apple-pay";
@@ -265,3 +375,11 @@ var PaymentDataSourceType;
265
375
  PaymentDataSourceType["GOOGLEPAYWEB"] = "GooglePayWeb";
266
376
  PaymentDataSourceType["DISCOVER3DSECURE"] = "Discover 3DSecure";
267
377
  })(PaymentDataSourceType = exports.PaymentDataSourceType || (exports.PaymentDataSourceType = {}));
378
+ var PropayTermsVersion;
379
+ (function (PropayTermsVersion) {
380
+ PropayTermsVersion[PropayTermsVersion["merchantUS"] = 1] = "merchantUS";
381
+ PropayTermsVersion[PropayTermsVersion["paymentUS"] = 2] = "paymentUS";
382
+ PropayTermsVersion[PropayTermsVersion["merchantCA"] = 3] = "merchantCA";
383
+ PropayTermsVersion[PropayTermsVersion["merchantUK"] = 4] = "merchantUK";
384
+ PropayTermsVersion[PropayTermsVersion["merchantAU"] = 5] = "merchantAU";
385
+ })(PropayTermsVersion = exports.PropayTermsVersion || (exports.PropayTermsVersion = {}));
@@ -0,0 +1,7 @@
1
+ export declare class AccountBalanceResponseData {
2
+ enabled: string;
3
+ limitRemaining: string;
4
+ transferFee: string;
5
+ feeType: string;
6
+ accountLastFour: string;
7
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountBalanceResponseData = void 0;
4
+ var AccountBalanceResponseData = /** @class */ (function () {
5
+ function AccountBalanceResponseData() {
6
+ }
7
+ return AccountBalanceResponseData;
8
+ }());
9
+ exports.AccountBalanceResponseData = AccountBalanceResponseData;
@@ -0,0 +1,15 @@
1
+ import { ProPayAccountStatus } from "../../Entities";
2
+ export declare class AccountPermissions {
3
+ aCHIn: boolean;
4
+ aCHOut: boolean;
5
+ cCProcessing: boolean;
6
+ proPayIn: boolean;
7
+ proPayOut: boolean;
8
+ creditCardMonthLimit: string;
9
+ creditCardTransactionLimit: string;
10
+ merchantOverallStatus: ProPayAccountStatus;
11
+ softLimitEnabled: boolean;
12
+ aCHPaymentSoftLimitEnabled: boolean;
13
+ softLimitACHOffPercent: string;
14
+ aCHPaymentACHOffPercent: string;
15
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountPermissions = void 0;
4
+ var AccountPermissions = /** @class */ (function () {
5
+ function AccountPermissions() {
6
+ }
7
+ return AccountPermissions;
8
+ }());
9
+ exports.AccountPermissions = AccountPermissions;
@@ -0,0 +1,10 @@
1
+ export declare class BankAccountData {
2
+ accountCountryCode: string;
3
+ accountName: string;
4
+ accountNumber: string;
5
+ accountOwnershipType: string;
6
+ accountType: string;
7
+ bankName: string;
8
+ routingNumber: string;
9
+ accountHolderName: string;
10
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BankAccountData = void 0;
4
+ var BankAccountData = /** @class */ (function () {
5
+ function BankAccountData() {
6
+ }
7
+ return BankAccountData;
8
+ }());
9
+ exports.BankAccountData = BankAccountData;
@@ -0,0 +1,8 @@
1
+ import { Address } from "../../Entities";
2
+ export declare class BankAccountOwnershipData {
3
+ firstName: string;
4
+ lastName: string;
5
+ ownerAddress: Address;
6
+ phoneNumber: string;
7
+ constructor();
8
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BankAccountOwnershipData = void 0;
4
+ var Entities_1 = require("../../Entities");
5
+ var BankAccountOwnershipData = /** @class */ (function () {
6
+ function BankAccountOwnershipData() {
7
+ this.ownerAddress = new Entities_1.Address();
8
+ }
9
+ return BankAccountOwnershipData;
10
+ }());
11
+ exports.BankAccountOwnershipData = BankAccountOwnershipData;
@@ -0,0 +1,6 @@
1
+ import { OwnersData } from "./OwnersData";
2
+ export declare class BeneficialOwnerData {
3
+ ownersCount: string;
4
+ ownersList: Array<OwnersData>;
5
+ constructor();
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BeneficialOwnerData = void 0;
4
+ var BeneficialOwnerData = /** @class */ (function () {
5
+ function BeneficialOwnerData() {
6
+ this.ownersList = new Array();
7
+ }
8
+ return BeneficialOwnerData;
9
+ }());
10
+ exports.BeneficialOwnerData = BeneficialOwnerData;