globalpayments-api 1.4.8 → 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.
- package/CHANGELOG.md +6 -0
- package/lib/src/Builders/PayFacBuilder.d.ts +96 -0
- package/lib/src/Builders/PayFacBuilder.js +184 -0
- package/lib/src/Entities/DocumentUploadData.d.ts +13 -0
- package/lib/src/Entities/DocumentUploadData.js +48 -0
- package/lib/src/Entities/Enums.d.ts +44 -1
- package/lib/src/Entities/Enums.js +119 -1
- package/lib/src/Entities/ProFac/AccountBalanceResponseData.d.ts +7 -0
- package/lib/src/Entities/ProFac/AccountBalanceResponseData.js +9 -0
- package/lib/src/Entities/ProFac/AccountPermissions.d.ts +15 -0
- package/lib/src/Entities/ProFac/AccountPermissions.js +9 -0
- package/lib/src/Entities/ProFac/BankAccountData.d.ts +10 -0
- package/lib/src/Entities/ProFac/BankAccountData.js +9 -0
- package/lib/src/Entities/ProFac/BankAccountOwnershipData.d.ts +8 -0
- package/lib/src/Entities/ProFac/BankAccountOwnershipData.js +11 -0
- package/lib/src/Entities/ProFac/BeneficialOwnerData.d.ts +6 -0
- package/lib/src/Entities/ProFac/BeneficialOwnerData.js +10 -0
- package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.d.ts +5 -0
- package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js +9 -0
- package/lib/src/Entities/ProFac/BusinessData.d.ts +14 -0
- package/lib/src/Entities/ProFac/BusinessData.js +11 -0
- package/lib/src/Entities/ProFac/DeviceAttributeInfo.d.ts +4 -0
- package/lib/src/Entities/ProFac/DeviceAttributeInfo.js +9 -0
- package/lib/src/Entities/ProFac/DeviceData.d.ts +5 -0
- package/lib/src/Entities/ProFac/DeviceData.js +10 -0
- package/lib/src/Entities/ProFac/DeviceInfo.d.ts +6 -0
- package/lib/src/Entities/ProFac/DeviceInfo.js +9 -0
- package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.d.ts +7 -0
- package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js +13 -0
- package/lib/src/Entities/ProFac/GrossBillingInformation.d.ts +8 -0
- package/lib/src/Entities/ProFac/GrossBillingInformation.js +9 -0
- package/lib/src/Entities/ProFac/OrderDevice.d.ts +18 -0
- package/lib/src/Entities/ProFac/OrderDevice.js +9 -0
- package/lib/src/Entities/ProFac/OwnersData.d.ts +12 -0
- package/lib/src/Entities/ProFac/OwnersData.js +11 -0
- package/lib/src/Entities/ProFac/PayFacResponseData.d.ts +55 -0
- package/lib/src/Entities/ProFac/PayFacResponseData.js +9 -0
- package/lib/src/Entities/ProFac/RenewAccountData.d.ts +10 -0
- package/lib/src/Entities/ProFac/RenewAccountData.js +11 -0
- package/lib/src/Entities/ProFac/SignificantOwnerData.d.ts +8 -0
- package/lib/src/Entities/ProFac/SignificantOwnerData.js +11 -0
- package/lib/src/Entities/ProFac/ThreatRiskData.d.ts +5 -0
- package/lib/src/Entities/ProFac/ThreatRiskData.js +9 -0
- package/lib/src/Entities/ProFac/UserPersonalData.d.ts +26 -0
- package/lib/src/Entities/ProFac/UserPersonalData.js +14 -0
- package/lib/src/Entities/SSORequestData.d.ts +5 -0
- package/lib/src/Entities/SSORequestData.js +9 -0
- package/lib/src/Entities/Transaction.d.ts +2 -0
- package/lib/src/Gateways/IPayFacProvider.d.ts +5 -0
- package/lib/src/Gateways/IPayFacProvider.js +2 -0
- package/lib/src/Gateways/PayPlanConnector.d.ts +1 -0
- package/lib/src/Gateways/PayPlanConnector.js +13 -1
- package/lib/src/Gateways/PorticoConnector.js +0 -1
- package/lib/src/Gateways/ProPayConnector.d.ts +41 -0
- package/lib/src/Gateways/ProPayConnector.js +698 -0
- package/lib/src/Gateways/XmlGateway.js +1 -0
- package/lib/src/PaymentMethods/CreditCardData.d.ts +1 -0
- package/lib/src/PaymentMethods/CreditCardData.js +6 -0
- package/lib/src/Services/PayFacService.d.ts +26 -0
- package/lib/src/Services/PayFacService.js +77 -0
- package/lib/src/ServicesConfig.d.ts +4 -0
- package/lib/src/ServicesContainer.d.ts +4 -1
- package/lib/src/ServicesContainer.js +16 -2
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +1 -2
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js +100 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js +352 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js +123 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.d.ts +1 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js +146 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +39 -0
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +371 -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/ProPayConnector/TestData/TestAccountData.d.ts +33 -0
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +268 -0
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +4 -0
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +30 -0
- package/logger.txt +481 -2
- package/package.json +1 -1
package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TestAccountData = void 0;
|
|
4
|
+
var AccountPermissions_1 = require("../../../../../../src/Entities/ProFac/AccountPermissions");
|
|
5
|
+
var BankAccountData_1 = require("../../../../../../src/Entities/ProFac/BankAccountData");
|
|
6
|
+
var BeneficialOwnerData_1 = require("../../../../../../src/Entities/ProFac/BeneficialOwnerData");
|
|
7
|
+
var BusinessData_1 = require("../../../../../../src/Entities/ProFac/BusinessData");
|
|
8
|
+
var DeviceData_1 = require("../../../../../../src/Entities/ProFac/DeviceData");
|
|
9
|
+
var DeviceInfo_1 = require("../../../../../../src/Entities/ProFac/DeviceInfo");
|
|
10
|
+
var GrossBillingInformation_1 = require("../../../../../../src/Entities/ProFac/GrossBillingInformation");
|
|
11
|
+
var OwnersData_1 = require("../../../../../../src/Entities/ProFac/OwnersData");
|
|
12
|
+
var RenewAccountData_1 = require("../../../../../../src/Entities/ProFac/RenewAccountData");
|
|
13
|
+
var SignificantOwnerData_1 = require("../../../../../../src/Entities/ProFac/SignificantOwnerData");
|
|
14
|
+
var ThreatRiskData_1 = require("../../../../../../src/Entities/ProFac/ThreatRiskData");
|
|
15
|
+
var UserPersonalData_1 = require("../../../../../../src/Entities/ProFac/UserPersonalData");
|
|
16
|
+
var PaymentMethods_1 = require("../../../../../../src/PaymentMethods");
|
|
17
|
+
var fs = require("fs");
|
|
18
|
+
var DeviceAttributeInfo_1 = require("../../../../../../src/Entities/ProFac/DeviceAttributeInfo");
|
|
19
|
+
var Address_1 = require("../../../../../../src/Entities/Address");
|
|
20
|
+
var src_1 = require("../../../../../../src");
|
|
21
|
+
var OrderDevice_1 = require("../../../../../../src/Entities/ProFac/OrderDevice");
|
|
22
|
+
var TestAccountData = /** @class */ (function () {
|
|
23
|
+
function TestAccountData() {
|
|
24
|
+
}
|
|
25
|
+
TestAccountData.GetBankAccountForBoardingData = function () {
|
|
26
|
+
var bankAccountInformation = new BankAccountData_1.BankAccountData();
|
|
27
|
+
bankAccountInformation.accountCountryCode = "USA";
|
|
28
|
+
bankAccountInformation.accountName = "Account Name";
|
|
29
|
+
bankAccountInformation.accountNumber = "123456";
|
|
30
|
+
bankAccountInformation.accountOwnershipType = "Personal";
|
|
31
|
+
bankAccountInformation.accountType = "Checking";
|
|
32
|
+
bankAccountInformation.bankName = "First Union";
|
|
33
|
+
bankAccountInformation.routingNumber = "083908420";
|
|
34
|
+
return bankAccountInformation;
|
|
35
|
+
};
|
|
36
|
+
TestAccountData.GetBankAccountData = function () {
|
|
37
|
+
var bankAccountInformation = new BankAccountData_1.BankAccountData();
|
|
38
|
+
bankAccountInformation.accountCountryCode = "USA";
|
|
39
|
+
bankAccountInformation.accountName = "MyBankAccount";
|
|
40
|
+
bankAccountInformation.accountNumber = "123456789";
|
|
41
|
+
bankAccountInformation.accountOwnershipType = "C";
|
|
42
|
+
bankAccountInformation.routingNumber = "102000076";
|
|
43
|
+
return bankAccountInformation;
|
|
44
|
+
};
|
|
45
|
+
TestAccountData.GetBusinessForBoardingData = function () {
|
|
46
|
+
var businessData = new BusinessData_1.BusinessData();
|
|
47
|
+
businessData.businessLegalName = "A Legal Business LLC";
|
|
48
|
+
businessData.doingBusinessAs = "DBA";
|
|
49
|
+
businessData.employerIdentificationNumber = String(this.getRandomInt(100000000, 999999999)); //987654321
|
|
50
|
+
businessData.businessDescription = "My eBusiness";
|
|
51
|
+
businessData.websiteURL = "wwwbusinessweb";
|
|
52
|
+
businessData.merchantCategoryCode = ""; //"5399";
|
|
53
|
+
businessData.monthlyBankCardVolume = "2000000";
|
|
54
|
+
businessData.averageTicket = "15000";
|
|
55
|
+
businessData.highestTicket = "80000";
|
|
56
|
+
var businessAddress = new Address_1.Address();
|
|
57
|
+
businessAddress.streetAddress1 = "120";
|
|
58
|
+
businessAddress.streetAddress2 = "Apt 3";
|
|
59
|
+
businessAddress.city = "Atlanta";
|
|
60
|
+
businessAddress.state = "GA";
|
|
61
|
+
businessAddress.postalCode = "30346";
|
|
62
|
+
businessAddress.country = "USA";
|
|
63
|
+
businessData.businessAddress = businessAddress;
|
|
64
|
+
return businessData;
|
|
65
|
+
};
|
|
66
|
+
TestAccountData.GetOrderNewDeviceData = function () {
|
|
67
|
+
var orderDevice = new OrderDevice_1.OrderDevice();
|
|
68
|
+
orderDevice.accountNum = 718576800; // 718576953;//718576800;// 718576798;// 718576799;
|
|
69
|
+
orderDevice.shipTo = "Test Company";
|
|
70
|
+
orderDevice.shipToContact = "John Q. Public";
|
|
71
|
+
orderDevice.shipToAddress = "2675 W 600 N";
|
|
72
|
+
orderDevice.shipToAddress2 = "Apt G";
|
|
73
|
+
orderDevice.shipToCity = "Lindon";
|
|
74
|
+
orderDevice.shipToState = "UT";
|
|
75
|
+
orderDevice.shipToZip = "84042";
|
|
76
|
+
orderDevice.shipToPhone = "801-555-1212";
|
|
77
|
+
orderDevice.cardholderName = "Johnny Cage";
|
|
78
|
+
orderDevice.ccNum = "4111111111111111";
|
|
79
|
+
orderDevice.expDate = "0427";
|
|
80
|
+
orderDevice.cVV2 = "999";
|
|
81
|
+
orderDevice.billingZip = "84003";
|
|
82
|
+
return orderDevice;
|
|
83
|
+
};
|
|
84
|
+
TestAccountData.GetBusinessData = function () {
|
|
85
|
+
var businessData = new BusinessData_1.BusinessData();
|
|
86
|
+
businessData.businessLegalName = "LegalName";
|
|
87
|
+
businessData.doingBusinessAs = "PPA";
|
|
88
|
+
businessData.employerIdentificationNumber = String(this.getRandomInt(100000000, 999999999));
|
|
89
|
+
businessData.businessDescription = "Accounting Services";
|
|
90
|
+
businessData.websiteURL = "https://www.propay.com";
|
|
91
|
+
businessData.merchantCategoryCode = "5399";
|
|
92
|
+
businessData.monthlyBankCardVolume = "50000";
|
|
93
|
+
businessData.averageTicket = "100";
|
|
94
|
+
businessData.highestTicket = "300";
|
|
95
|
+
var businessAddress = new Address_1.Address();
|
|
96
|
+
businessAddress.streetAddress1 = "123 Main St.";
|
|
97
|
+
businessAddress.city = "Downtown";
|
|
98
|
+
businessAddress.state = "NJ";
|
|
99
|
+
businessAddress.postalCode = "12345";
|
|
100
|
+
businessAddress.country = "USA";
|
|
101
|
+
businessData.businessAddress = businessAddress;
|
|
102
|
+
return businessData;
|
|
103
|
+
};
|
|
104
|
+
TestAccountData.GetUserPersonalForBoadingData = function (dob) {
|
|
105
|
+
if (dob === void 0) { dob = "01-01-1981"; }
|
|
106
|
+
var accountPersonalInformation = new UserPersonalData_1.UserPersonalData();
|
|
107
|
+
accountPersonalInformation.dayPhone = "4464464464";
|
|
108
|
+
accountPersonalInformation.eveningPhone = "4464464464";
|
|
109
|
+
accountPersonalInformation.firstName = "John";
|
|
110
|
+
accountPersonalInformation.lastName = "Doe";
|
|
111
|
+
accountPersonalInformation.phonePIN = "1234";
|
|
112
|
+
accountPersonalInformation.sourceEmail = 'userA' + this.getRandomInt(1, 10000) + '@user.com';
|
|
113
|
+
accountPersonalInformation.sSN = "123456789";
|
|
114
|
+
accountPersonalInformation.dateOfBirth = dob;
|
|
115
|
+
accountPersonalInformation.tier = "test";
|
|
116
|
+
accountPersonalInformation.notificationEmail = "Partner@partner.com";
|
|
117
|
+
accountPersonalInformation.currencyCode = "USD";
|
|
118
|
+
accountPersonalInformation.ipSignup = "4.14.150.145";
|
|
119
|
+
accountPersonalInformation.uSCitizen = true;
|
|
120
|
+
accountPersonalInformation.bOAttestation = true;
|
|
121
|
+
accountPersonalInformation.termsAcceptanceIP = "4.14.150.145";
|
|
122
|
+
accountPersonalInformation.termsAcceptanceTimeStamp = "2022-10-27 12:57:08.2021237";
|
|
123
|
+
accountPersonalInformation.termsVersion = src_1.PropayTermsVersion.merchantUS;
|
|
124
|
+
var userAddress = new Address_1.Address();
|
|
125
|
+
userAddress.streetAddress1 = "123 Main St.";
|
|
126
|
+
userAddress.city = "Atlanta";
|
|
127
|
+
userAddress.state = "GA";
|
|
128
|
+
userAddress.postalCode = "30346";
|
|
129
|
+
userAddress.country = "USA";
|
|
130
|
+
accountPersonalInformation.userAddress = userAddress;
|
|
131
|
+
return accountPersonalInformation;
|
|
132
|
+
};
|
|
133
|
+
TestAccountData.GetUserPersonalData = function () {
|
|
134
|
+
var accountPersonalInformation = new UserPersonalData_1.UserPersonalData();
|
|
135
|
+
accountPersonalInformation.dayPhone = "4464464464";
|
|
136
|
+
accountPersonalInformation.eveningPhone = "4464464464";
|
|
137
|
+
accountPersonalInformation.externalID = String(this.getRandomInt(1000000, 999999999));
|
|
138
|
+
accountPersonalInformation.firstName = "John";
|
|
139
|
+
accountPersonalInformation.lastName = "Doe";
|
|
140
|
+
accountPersonalInformation.phonePIN = "1234";
|
|
141
|
+
accountPersonalInformation.sourceEmail = 'user' + this.getRandomInt(1, 10000) + '@user.com';
|
|
142
|
+
accountPersonalInformation.sSN = "123456789";
|
|
143
|
+
accountPersonalInformation.dateOfBirth = "01-01-1981";
|
|
144
|
+
accountPersonalInformation.tier = "CardOnly";
|
|
145
|
+
var userAddress = new Address_1.Address();
|
|
146
|
+
userAddress.streetAddress1 = "123 Main St.";
|
|
147
|
+
userAddress.city = "Downtown";
|
|
148
|
+
userAddress.state = "NJ";
|
|
149
|
+
userAddress.postalCode = "12345";
|
|
150
|
+
userAddress.country = "USA";
|
|
151
|
+
accountPersonalInformation.userAddress = userAddress;
|
|
152
|
+
return accountPersonalInformation;
|
|
153
|
+
};
|
|
154
|
+
TestAccountData.GetUserPersonalDeviceOrderTestData = function () {
|
|
155
|
+
var accountPersonalInformation = new UserPersonalData_1.UserPersonalData();
|
|
156
|
+
accountPersonalInformation.dayPhone = "4464464464";
|
|
157
|
+
accountPersonalInformation.eveningPhone = "4464464464";
|
|
158
|
+
accountPersonalInformation.externalID = String(this.getRandomInt(1000000, 999999999));
|
|
159
|
+
accountPersonalInformation.firstName = "John";
|
|
160
|
+
accountPersonalInformation.lastName = "Doe";
|
|
161
|
+
accountPersonalInformation.phonePIN = "1234";
|
|
162
|
+
accountPersonalInformation.sourceEmail = 'user' + this.getRandomInt(1, 10000) + '@user.com';
|
|
163
|
+
accountPersonalInformation.sSN = "123456789";
|
|
164
|
+
accountPersonalInformation.dateOfBirth = "01-01-1981";
|
|
165
|
+
accountPersonalInformation.tier = "test";
|
|
166
|
+
accountPersonalInformation.notificationEmail = "";
|
|
167
|
+
accountPersonalInformation.currencyCode = "";
|
|
168
|
+
var userAddress = new Address_1.Address();
|
|
169
|
+
userAddress.streetAddress1 = "123 Main St.";
|
|
170
|
+
userAddress.city = "Downtown";
|
|
171
|
+
userAddress.state = "NJ";
|
|
172
|
+
userAddress.postalCode = "12345";
|
|
173
|
+
userAddress.country = "USA";
|
|
174
|
+
accountPersonalInformation.userAddress = userAddress;
|
|
175
|
+
return accountPersonalInformation;
|
|
176
|
+
};
|
|
177
|
+
TestAccountData.GetThreatRiskData = function () {
|
|
178
|
+
var threatRiskData = new ThreatRiskData_1.ThreatRiskData();
|
|
179
|
+
threatRiskData.merchantSourceIP = "8.8.8.8";
|
|
180
|
+
threatRiskData.threatMetrixPolicy = "Default";
|
|
181
|
+
threatRiskData.threatMetrixSessionID = "dad889c1-1ca4-4fq71-8f6f-807eb4408bc7";
|
|
182
|
+
return threatRiskData;
|
|
183
|
+
};
|
|
184
|
+
TestAccountData.GetSignificantOwnerData = function () {
|
|
185
|
+
var significantOwnerData = new SignificantOwnerData_1.SignificantOwnerData();
|
|
186
|
+
significantOwnerData.authorizedSignerFirstName = "John";
|
|
187
|
+
significantOwnerData.authorizedSignerLastName = "Doe";
|
|
188
|
+
significantOwnerData.authorizedSignerTitle = "Director";
|
|
189
|
+
significantOwnerData.significantOwner.firstName = "John";
|
|
190
|
+
return significantOwnerData;
|
|
191
|
+
};
|
|
192
|
+
TestAccountData.GetBeneficialOwnerData = function () {
|
|
193
|
+
var ownersInformation = new BeneficialOwnerData_1.BeneficialOwnerData();
|
|
194
|
+
ownersInformation.ownersCount = "2";
|
|
195
|
+
var firstOwner = new OwnersData_1.OwnersData();
|
|
196
|
+
firstOwner.firstName = "First1";
|
|
197
|
+
firstOwner.lastName = "Last1";
|
|
198
|
+
firstOwner.title = "CEO";
|
|
199
|
+
firstOwner.email = "abc@qamail.com";
|
|
200
|
+
firstOwner.DateOfBirth = "11-11-1988";
|
|
201
|
+
firstOwner.sSN = "123545677";
|
|
202
|
+
var firstOwnerAddress = new Address_1.Address();
|
|
203
|
+
firstOwnerAddress.streetAddress1 = "123 Main St.";
|
|
204
|
+
firstOwnerAddress.city = "Downtown";
|
|
205
|
+
firstOwnerAddress.state = "NJ";
|
|
206
|
+
firstOwnerAddress.postalCode = "12345";
|
|
207
|
+
firstOwnerAddress.country = "USA";
|
|
208
|
+
firstOwner.ownerAddress = firstOwnerAddress;
|
|
209
|
+
//Second Owner
|
|
210
|
+
var secondOwner = new OwnersData_1.OwnersData();
|
|
211
|
+
secondOwner.firstName = "First2";
|
|
212
|
+
secondOwner.lastName = "Last2";
|
|
213
|
+
secondOwner.title = "Director";
|
|
214
|
+
secondOwner.email = "abc1@qamail.com";
|
|
215
|
+
secondOwner.DateOfBirth = "11-11-1989";
|
|
216
|
+
secondOwner.sSN = "123545677";
|
|
217
|
+
var secondOwnerAddress = new Address_1.Address();
|
|
218
|
+
secondOwnerAddress.streetAddress1 = "123 Main St.";
|
|
219
|
+
secondOwnerAddress.city = "Downtown";
|
|
220
|
+
secondOwnerAddress.state = "NJ";
|
|
221
|
+
secondOwnerAddress.postalCode = "12345";
|
|
222
|
+
secondOwnerAddress.country = "USA";
|
|
223
|
+
secondOwner.ownerAddress = secondOwnerAddress;
|
|
224
|
+
ownersInformation.ownersList = [firstOwner]; //, secondOwner]
|
|
225
|
+
return ownersInformation;
|
|
226
|
+
};
|
|
227
|
+
TestAccountData.GetCreditCardData = function () {
|
|
228
|
+
var card = new PaymentMethods_1.CreditCardData();
|
|
229
|
+
card.number = "4111111111111111";
|
|
230
|
+
card.expMonth = "12";
|
|
231
|
+
card.expYear = "2025";
|
|
232
|
+
card.cvn = "123";
|
|
233
|
+
card.cardHolderName = "Joe Smith";
|
|
234
|
+
return card;
|
|
235
|
+
};
|
|
236
|
+
TestAccountData.GetACHData = function () {
|
|
237
|
+
var bankAccountInformation = new BankAccountData_1.BankAccountData();
|
|
238
|
+
bankAccountInformation.accountNumber = "123456789";
|
|
239
|
+
bankAccountInformation.accountType = "C";
|
|
240
|
+
bankAccountInformation.routingNumber = "102000076";
|
|
241
|
+
return bankAccountInformation;
|
|
242
|
+
};
|
|
243
|
+
TestAccountData.GetMailingAddressForBoarding = function () {
|
|
244
|
+
var address = new Address_1.Address();
|
|
245
|
+
address.streetAddress1 = "123 Main St.";
|
|
246
|
+
address.city = "Downtown";
|
|
247
|
+
address.state = "NJ";
|
|
248
|
+
address.postalCode = "12345";
|
|
249
|
+
address.country = "USA";
|
|
250
|
+
return address;
|
|
251
|
+
};
|
|
252
|
+
TestAccountData.GetMailingAddress = function () {
|
|
253
|
+
var address = new Address_1.Address();
|
|
254
|
+
address.streetAddress1 = "123 Main St.";
|
|
255
|
+
address.city = "Downtown";
|
|
256
|
+
address.state = "NJ";
|
|
257
|
+
address.postalCode = "12345";
|
|
258
|
+
address.country = "USA";
|
|
259
|
+
return address;
|
|
260
|
+
};
|
|
261
|
+
TestAccountData.GetSecondaryBankAccountData = function () {
|
|
262
|
+
var bankAccountInformation = new BankAccountData_1.BankAccountData();
|
|
263
|
+
bankAccountInformation.accountCountryCode = "USA",
|
|
264
|
+
bankAccountInformation.accountName = "MyBankAccount",
|
|
265
|
+
bankAccountInformation.accountNumber = "123456788",
|
|
266
|
+
bankAccountInformation.accountOwnershipType = "Personal",
|
|
267
|
+
bankAccountInformation.accountType = "C",
|
|
268
|
+
bankAccountInformation.routingNumber = "102000076";
|
|
269
|
+
return bankAccountInformation;
|
|
270
|
+
};
|
|
271
|
+
TestAccountData.GetGrossBillingSettleData = function () {
|
|
272
|
+
var grossBillingInformation = new GrossBillingInformation_1.GrossBillingInformation();
|
|
273
|
+
var grossSettleBankData = new BankAccountData_1.BankAccountData();
|
|
274
|
+
grossSettleBankData.accountCountryCode = "USA";
|
|
275
|
+
grossSettleBankData.accountName = "MyBankAccount";
|
|
276
|
+
grossSettleBankData.accountNumber = "123456788";
|
|
277
|
+
grossSettleBankData.accountOwnershipType = "Personal";
|
|
278
|
+
grossSettleBankData.accountType = "C";
|
|
279
|
+
grossSettleBankData.routingNumber = "102000076";
|
|
280
|
+
grossSettleBankData.accountHolderName = "John";
|
|
281
|
+
grossBillingInformation.grossSettleBankData = grossSettleBankData;
|
|
282
|
+
var grossSettleAddress = new Address_1.Address();
|
|
283
|
+
grossSettleAddress.streetAddress1 = "123 Main St.";
|
|
284
|
+
grossSettleAddress.city = "Downtown";
|
|
285
|
+
grossSettleAddress.state = "NJ";
|
|
286
|
+
grossSettleAddress.postalCode = "12345";
|
|
287
|
+
grossSettleAddress.country = "USA";
|
|
288
|
+
grossBillingInformation.grossSettleAddress = grossSettleAddress;
|
|
289
|
+
var grossSettleCreditCardData = new PaymentMethods_1.CreditCardData();
|
|
290
|
+
grossSettleCreditCardData.number = "4111111111111111";
|
|
291
|
+
grossSettleCreditCardData.expMonth = "12";
|
|
292
|
+
grossSettleCreditCardData.expYear = "2025";
|
|
293
|
+
grossSettleCreditCardData.cvn = "123";
|
|
294
|
+
grossSettleCreditCardData.cardHolderName = "Joe Smith";
|
|
295
|
+
grossBillingInformation.grossSettleCreditCardData = grossSettleCreditCardData;
|
|
296
|
+
return grossBillingInformation;
|
|
297
|
+
};
|
|
298
|
+
TestAccountData.GetAccountPermissions = function () {
|
|
299
|
+
var accountPermissions = new AccountPermissions_1.AccountPermissions();
|
|
300
|
+
accountPermissions.cCProcessing = true;
|
|
301
|
+
return accountPermissions;
|
|
302
|
+
};
|
|
303
|
+
TestAccountData.GetRenewAccountDetails = function () {
|
|
304
|
+
var renewAccountData = new RenewAccountData_1.RenewAccountData();
|
|
305
|
+
renewAccountData.tier = "CardOnly";
|
|
306
|
+
return renewAccountData;
|
|
307
|
+
};
|
|
308
|
+
TestAccountData.GetDeviceDataForPhysicalDevice = function (numDeviceTypes, withAttributes) {
|
|
309
|
+
if (numDeviceTypes === void 0) { numDeviceTypes = 1; }
|
|
310
|
+
if (withAttributes === void 0) { withAttributes = true; }
|
|
311
|
+
var deviceTypes = ["Secure Submit", "TestDevice"];
|
|
312
|
+
var deviceData = new DeviceData_1.DeviceData();
|
|
313
|
+
deviceData.devices = Array();
|
|
314
|
+
for (var i = 0; i < numDeviceTypes; i++) {
|
|
315
|
+
var deviceInfo = new DeviceInfo_1.DeviceInfo();
|
|
316
|
+
if (i >= deviceTypes.length)
|
|
317
|
+
break;
|
|
318
|
+
deviceInfo.name = deviceTypes[i];
|
|
319
|
+
deviceInfo.quantity = 1;
|
|
320
|
+
if (withAttributes) {
|
|
321
|
+
var deviceAtrributeInfo = new DeviceAttributeInfo_1.DeviceAttributeInfo();
|
|
322
|
+
deviceAtrributeInfo.name = "Heartland.AMD.OfficeKey",
|
|
323
|
+
deviceAtrributeInfo.value = "123456";
|
|
324
|
+
deviceInfo.attributes = [deviceAtrributeInfo];
|
|
325
|
+
}
|
|
326
|
+
deviceData.devices = [deviceInfo];
|
|
327
|
+
}
|
|
328
|
+
return deviceData;
|
|
329
|
+
};
|
|
330
|
+
TestAccountData.GetDeviceData = function (numDeviceTypes, withAttributes) {
|
|
331
|
+
if (numDeviceTypes === void 0) { numDeviceTypes = 1; }
|
|
332
|
+
if (withAttributes === void 0) { withAttributes = true; }
|
|
333
|
+
var deviceTypes = ["Secure Submit"];
|
|
334
|
+
var deviceData = new DeviceData_1.DeviceData();
|
|
335
|
+
deviceData.devices = Array();
|
|
336
|
+
for (var i = 0; i < numDeviceTypes; i++) {
|
|
337
|
+
var deviceInfo = new DeviceInfo_1.DeviceInfo();
|
|
338
|
+
if (i >= deviceTypes.length)
|
|
339
|
+
break;
|
|
340
|
+
deviceInfo.name = deviceTypes[i];
|
|
341
|
+
deviceInfo.quantity = 1;
|
|
342
|
+
if (withAttributes) {
|
|
343
|
+
var deviceAtrributeInfo = new DeviceAttributeInfo_1.DeviceAttributeInfo();
|
|
344
|
+
deviceAtrributeInfo.name = "Heartland.AMD.OfficeKey",
|
|
345
|
+
deviceAtrributeInfo.value = "123456";
|
|
346
|
+
deviceInfo.attributes = [deviceAtrributeInfo];
|
|
347
|
+
}
|
|
348
|
+
deviceData.devices = [deviceInfo];
|
|
349
|
+
}
|
|
350
|
+
return deviceData;
|
|
351
|
+
};
|
|
352
|
+
TestAccountData.GetDocumentBase64String = function (filepath) {
|
|
353
|
+
return this.getByteArray(filepath);
|
|
354
|
+
};
|
|
355
|
+
TestAccountData.getByteArray = function (filePath) {
|
|
356
|
+
var fileData = fs.readFileSync(filePath);
|
|
357
|
+
var buff = Buffer.from(fileData);
|
|
358
|
+
var base64data = buff.toString('base64');
|
|
359
|
+
return base64data;
|
|
360
|
+
};
|
|
361
|
+
TestAccountData.getRandomInt = function (min, max) {
|
|
362
|
+
var floatRandom = Math.random();
|
|
363
|
+
var difference = max - min;
|
|
364
|
+
// random between 0 and the difference
|
|
365
|
+
var random = Math.round(difference * floatRandom);
|
|
366
|
+
var randomWithinRange = random + min;
|
|
367
|
+
return randomWithinRange;
|
|
368
|
+
};
|
|
369
|
+
return TestAccountData;
|
|
370
|
+
}());
|
|
371
|
+
exports.TestAccountData = TestAccountData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
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 PayFacService_1 = require("../../../../src/Services/PayFacService");
|
|
41
|
+
var src_1 = require("../../../../src/");
|
|
42
|
+
var config = new src_1.ServicesConfig();
|
|
43
|
+
config.serviceUrl = "https://xmltest.propay.com/API/PropayAPI.aspx";
|
|
44
|
+
config.certificationStr = "5dbacb0fc504dd7bdc2eadeb7039dd";
|
|
45
|
+
config.terminalID = "7039dd";
|
|
46
|
+
var _service = new PayFacService_1.PayFacService();
|
|
47
|
+
ava_1.default.before(function (_t) {
|
|
48
|
+
src_1.ServicesContainer.configure(config);
|
|
49
|
+
});
|
|
50
|
+
ava_1.default("get account balance", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
51
|
+
var response;
|
|
52
|
+
return __generator(this, function (_a) {
|
|
53
|
+
switch (_a.label) {
|
|
54
|
+
case 0:
|
|
55
|
+
t.plan(2);
|
|
56
|
+
return [4 /*yield*/, _service.getAccountBalance()
|
|
57
|
+
.withAccountNumber("718135687")
|
|
58
|
+
.execute()];
|
|
59
|
+
case 1:
|
|
60
|
+
response = _a.sent();
|
|
61
|
+
t.truthy(response);
|
|
62
|
+
t.is("00", response.responseCode);
|
|
63
|
+
return [2 /*return*/];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}); });
|
|
67
|
+
ava_1.default("get account info", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
68
|
+
var response;
|
|
69
|
+
return __generator(this, function (_a) {
|
|
70
|
+
switch (_a.label) {
|
|
71
|
+
case 0:
|
|
72
|
+
t.plan(2);
|
|
73
|
+
return [4 /*yield*/, _service.getAccountDetails()
|
|
74
|
+
.withAccountNumber("718135687")
|
|
75
|
+
.execute()];
|
|
76
|
+
case 1:
|
|
77
|
+
response = _a.sent();
|
|
78
|
+
t.truthy(response);
|
|
79
|
+
t.is("00", response.responseCode);
|
|
80
|
+
return [2 /*return*/];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}); });
|
|
84
|
+
ava_1.default("get account info enchance", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
85
|
+
var response;
|
|
86
|
+
return __generator(this, function (_a) {
|
|
87
|
+
switch (_a.label) {
|
|
88
|
+
case 0:
|
|
89
|
+
t.plan(2);
|
|
90
|
+
return [4 /*yield*/, _service.getAccountDetailsEnhanced()
|
|
91
|
+
.withAccountNumber("718135687")
|
|
92
|
+
.execute()];
|
|
93
|
+
case 1:
|
|
94
|
+
response = _a.sent();
|
|
95
|
+
t.truthy(response);
|
|
96
|
+
t.is("00", response.responseCode);
|
|
97
|
+
return [2 /*return*/];
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}); });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|