globalpayments-api 1.4.7 → 1.4.8
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/Gateways/PorticoConnector.d.ts +1 -0
- package/lib/src/Gateways/PorticoConnector.js +7 -0
- package/lib/src/Gateways/XmlGateway.d.ts +1 -0
- package/lib/src/Gateways/XmlGateway.js +8 -0
- package/lib/src/ServicesConfig.d.ts +1 -0
- package/lib/src/ServicesContainer.js +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +2 -1
- package/logger.txt +2 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Latest
|
|
4
4
|
|
|
5
|
+
#### Reporting Enhancements
|
|
6
|
+
|
|
7
|
+
- SdkNameVersion Identifier: Name and Version of the SDK used for integration, where applicable.
|
|
8
|
+
|
|
9
|
+
## v1.4.8 (12/13/22)
|
|
10
|
+
|
|
5
11
|
#### Enhancements
|
|
6
12
|
|
|
7
13
|
- Portico Connector: WalletData element added to process ApplePay/GooglePay Transactions using
|
|
@@ -11,6 +11,7 @@ export declare class PorticoConnector extends XmlGateway implements IPaymentGate
|
|
|
11
11
|
secretApiKey: string;
|
|
12
12
|
developerId: string;
|
|
13
13
|
versionNumber: string;
|
|
14
|
+
sdkNameVersion: string;
|
|
14
15
|
supportsHostedPayments: boolean;
|
|
15
16
|
processAuthorization(builder: AuthorizationBuilder): Promise<Transaction>;
|
|
16
17
|
serializeRequest(_builder: AuthorizationBuilder): string;
|
|
@@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.PorticoConnector = void 0;
|
|
19
19
|
var elementtree_1 = require("@azz/elementtree");
|
|
20
|
+
// var pjson = require('package.json')
|
|
20
21
|
var __1 = require("../");
|
|
21
22
|
var InputValidation_1 = require("../Utils/InputValidation");
|
|
22
23
|
var XmlGateway_1 = require("./XmlGateway");
|
|
@@ -437,6 +438,12 @@ var PorticoConnector = /** @class */ (function (_super) {
|
|
|
437
438
|
if (clientTransactionId) {
|
|
438
439
|
elementtree_1.SubElement(header, "ClientTxnId").append(elementtree_1.CData(clientTransactionId));
|
|
439
440
|
}
|
|
441
|
+
if (this.sdkNameVersion) {
|
|
442
|
+
elementtree_1.SubElement(header, "SDKNameVersion").append(elementtree_1.CData(this.sdkNameVersion));
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
elementtree_1.SubElement(header, "SDKNameVersion").append(elementtree_1.CData("nodejs-version:" + process.env.npm_package_version));
|
|
446
|
+
}
|
|
440
447
|
// transaction
|
|
441
448
|
elementtree_1.SubElement(version1, "Transaction").append(transaction);
|
|
442
449
|
return new elementtree_1.ElementTree(envelope).write();
|
|
@@ -17,14 +17,22 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.XmlGateway = void 0;
|
|
19
19
|
var Gateway_1 = require("./Gateway");
|
|
20
|
+
var fs = require("fs");
|
|
20
21
|
var XmlGateway = /** @class */ (function (_super) {
|
|
21
22
|
__extends(XmlGateway, _super);
|
|
22
23
|
function XmlGateway() {
|
|
23
24
|
return _super.call(this, "text/xml") || this;
|
|
24
25
|
}
|
|
25
26
|
XmlGateway.prototype.doTransaction = function (requestData) {
|
|
27
|
+
this.log(requestData);
|
|
26
28
|
return this.sendRequest("POST", "", requestData);
|
|
27
29
|
};
|
|
30
|
+
XmlGateway.prototype.log = function (text) {
|
|
31
|
+
fs.appendFile('logger.txt', text + '\n', function (err) {
|
|
32
|
+
if (err)
|
|
33
|
+
throw err;
|
|
34
|
+
});
|
|
35
|
+
};
|
|
28
36
|
return XmlGateway;
|
|
29
37
|
}(Gateway_1.Gateway));
|
|
30
38
|
exports.XmlGateway = XmlGateway;
|
|
@@ -43,6 +43,7 @@ var ServicesContainer = /** @class */ (function () {
|
|
|
43
43
|
gateway.secretApiKey = config.secretApiKey;
|
|
44
44
|
gateway.developerId = config.developerId;
|
|
45
45
|
gateway.versionNumber = config.versionNumber;
|
|
46
|
+
gateway.sdkNameVersion = config.sdkNameVersion;
|
|
46
47
|
gateway.timeout = config.timeout;
|
|
47
48
|
gateway.serviceUrl =
|
|
48
49
|
config.serviceUrl + "/Hps.Exchange.PosGateway/PosGatewayService.asmx";
|
|
@@ -41,6 +41,7 @@ var src_1 = require("../../../../src/");
|
|
|
41
41
|
var config = new src_1.ServicesConfig();
|
|
42
42
|
config.secretApiKey = "skapi_cert_MTeSAQAfG1UA9qQDrzl-kz4toXvARyieptFwSKP24w";
|
|
43
43
|
config.serviceUrl = "https://cert.api2-c.heartlandportico.com";
|
|
44
|
+
config.sdkNameVersion = "test";
|
|
44
45
|
var card = new src_1.CreditCardData();
|
|
45
46
|
card.number = "4111111111111111";
|
|
46
47
|
card.expMonth = "12";
|
|
@@ -170,7 +171,7 @@ ava_1.default("credit auth with cof", function (t) { return __awaiter(void 0, vo
|
|
|
170
171
|
}
|
|
171
172
|
});
|
|
172
173
|
}); });
|
|
173
|
-
ava_1.default("credit sale", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
174
|
+
ava_1.default.only("credit sale", function (t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
174
175
|
var response;
|
|
175
176
|
return __generator(this, function (_a) {
|
|
176
177
|
switch (_a.label) {
|
package/logger.txt
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><PosRequest xmlns="http://Hps.Exchange.PosGateway"><Ver1.0><Header><SecretAPIKey><![CDATA[
|
|
2
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><PosRequest xmlns="http://Hps.Exchange.PosGateway"><Ver1.0><Header><SecretAPIKey><![CDATA[skapi_cert_MTeSAQAfG1UA9qQDrzl-kz4toXvARyieptFwSKP24w]]></SecretAPIKey><SDKNameVersion><![CDATA[nodejs-version:1.4.7]]></SDKNameVersion></Header><Transaction><CreditSale><Block1><AllowDup><![CDATA[Y]]></AllowDup><AllowPartialAuth><![CDATA[N]]></AllowPartialAuth><Amt><![CDATA[15.00]]></Amt><CardHolderData><CardHolderFirstName><![CDATA[Joe]]></CardHolderFirstName><CardHolderLastName><![CDATA[Smith]]></CardHolderLastName></CardHolderData><CardData><ManualEntry><CardNbr><![CDATA[4111111111111111]]></CardNbr><ExpMonth><![CDATA[12]]></ExpMonth><ExpYear><![CDATA[2025]]></ExpYear><CVV2><![CDATA[123]]></CVV2><ReaderPresent><![CDATA[N]]></ReaderPresent><CardPresent><![CDATA[N]]></CardPresent></ManualEntry><TokenRequest><![CDATA[N]]></TokenRequest></CardData></Block1></CreditSale></Transaction></Ver1.0></PosRequest></soap:Body></soap:Envelope>
|
|
3
3
|
<?xml version="1.0" encoding="utf-8"?>
|
|
4
|
-
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><PosRequest xmlns="http://Hps.Exchange.PosGateway"><Ver1.0><Header><SecretAPIKey><![CDATA[
|
|
5
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
6
|
-
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><PosRequest xmlns="http://Hps.Exchange.PosGateway"><Ver1.0><Header><SecretAPIKey><![CDATA[skapi_cert_MY5OAAAQrmIF_IZDKbr1ecycRr7n1Q1SxNkVgzDhwg]]></SecretAPIKey></Header><Transaction><CreditSale><Block1><AllowDup><![CDATA[Y]]></AllowDup><AllowPartialAuth><![CDATA[N]]></AllowPartialAuth><Amt><![CDATA[10.00]]></Amt><WalletData><PaymentSource><![CDATA[GooglePayWeb]]></PaymentSource><DigitalPaymentToken><![CDATA[{"signature":"MEQCHx7idql+XsU3FYqlzhRZwXdwDvKdRCz291JHDG8yG4kCIQCoeqsM3XOyCNDuLhj4eM+dGo4MKhzDE1Jg8OpvaWYqyg\u003d\u003d","protocolVersion":"ECv1","signedMessage":"{\"encryptedMessage\":\"Z0cKUtDGx7EfsIktr5U39YsPNkbul/XQN+I/+y6JZkeh1fVurL6YuwGoWafmCv1b7+MW+deziMCyfQrhd6Z6yaiNr2i5fyWVYZwrh/XtsC+wEbM6loRSHYfuFJGXhE/SW1HOw6AmT5fatzD5OXyl9m5Hc22r6WQ5uqGLyR18DQVGtp9bcSJwtgTOfcYpoKkyQ+MjMfT9aGgBp20A1L9bHNDLVFPK+2RTSCsFHRmi2AsbYyhS17hj5rRmc5GFvQv0LywMrMHilcJnYVHnfZUJgxSNsh3N1mm/QbZ801b84aqmhVtNQbYxB99Ik6cu8cflUbb+IO+yQwUlyd+Kix0NgFOPlyAQXNGrR6eJ76u2Z4032Q2zAy9B88fEblTCHSkhct0FCMu95m30MGUBLhU6fpjobkYKpAvRvqfbO0smX0bRswi4qfVDgX9fLzZPyiTEox2yzx8CQw\\u003d\\u003d\",\"ephemeralPublicKey\":\"BGQVX8dPAbUUjUDYjoOD9iEB79b8yWHOr/UBTgYyW+1aBInr2NXSfr746ShMG9A8k5mHfDuNgXIEAkxyF3uwR5k\\u003d\",\"tag\":\"BaFs5WaszXIcQCgt2DI7oLu3jdZX3nhXz63ubt5CLiE\\u003d\"}"}]]></DigitalPaymentToken></WalletData><AdditionalTxnFields><CustomerID><![CDATA[]]></CustomerID><Description><![CDATA[]]></Description><InvoiceNbr><![CDATA[1234567890]]></InvoiceNbr></AdditionalTxnFields></Block1></CreditSale></Transaction></Ver1.0></PosRequest></soap:Body></soap:Envelope>
|
|
7
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
8
|
-
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><PosRequest xmlns="http://Hps.Exchange.PosGateway"><Ver1.0><Header><SecretAPIKey><![CDATA[skapi_cert_MY5OAAAQrmIF_IZDKbr1ecycRr7n1Q1SxNkVgzDhwg]]></SecretAPIKey></Header><Transaction><CreditSale><Block1><AllowDup><![CDATA[Y]]></AllowDup><AllowPartialAuth><![CDATA[N]]></AllowPartialAuth><Amt><![CDATA[10.00]]></Amt><WalletData><PaymentSource><![CDATA[GooglePayWeb]]></PaymentSource><DigitalPaymentToken><![CDATA[{"signature":"MEYCIQCHBX5VQQeLvC0I6KZbfzHHhPbZ3S/EiditRSWvWtIRsQIhAPOOkTMsQnfyo2OcGkEwIV1YsttmPQCLE+iehEo9bT3y","protocolVersion":"ECv1","signedMessage":"{\"encryptedMessage\":\"U3VSCo6nrVP/4+Szd67puCAdtDk/cqB/I8ffOBZm6YSjkFurSUgylbaiYkNq0KOMAQ6woJmx7eqKJo0cV2YXQr6ZZMZrASbIGaKmGHfwIG46oECDr/aHVFUDeWToIFOQ0PM4IcGVHTbsWG1dRupTYcQqw/+aw/JzOxrZn2OAnQdMHUkYjzD1gmQ800eeVssXjFSU6PYT93jPUHFlH5710CoSok+sJ+IPwITdFxSs+rXu2h4ljSRCS1MwMxR6bN5ldEsFJLKtyQpirulWQrW9qv1pBMd+hD5GlaMLmkbl7xA2x8w9547UPj5Ac7BlNc03Mdzyiy2DCcNjgrWTjADGwBGrwIN+F2pjAzFzA9cfiHz/uqbC8iYShTcRiW002ggNiz7Uokbj2U1RYSFSPazCdekezhM8rMptBiQLrdBC766gkjKFcGR+cbV48vsLkBGgozAGluNzIw\\u003d\\u003d\",\"ephemeralPublicKey\":\"BEmxeA2JnzUEHKxDStesjvQX+sJt//ZQ9C1X7L/nxQu6trcGqkYDVXjqxOLMc9oJ/MZU+9j6nmedFm2zKDpAyko\\u003d\",\"tag\":\"ngNe08/CVKiaj8zkVHKe6vgaqHpuumoqt02nWVYXIKI\\u003d\"}"}]]></DigitalPaymentToken></WalletData><AdditionalTxnFields><CustomerID><![CDATA[]]></CustomerID><Description><![CDATA[]]></Description><InvoiceNbr><![CDATA[1234567890]]></InvoiceNbr></AdditionalTxnFields></Block1></CreditSale></Transaction></Ver1.0></PosRequest></soap:Body></soap:Envelope>
|
|
9
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
10
|
-
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><PosRequest xmlns="http://Hps.Exchange.PosGateway"><Ver1.0><Header><SecretAPIKey><![CDATA[skapi_cert_MY5OAAAQrmIF_IZDKbr1ecycRr7n1Q1SxNkVgzDhwg]]></SecretAPIKey></Header><Transaction><CreditSale><Block1><AllowDup><![CDATA[Y]]></AllowDup><AllowPartialAuth><![CDATA[N]]></AllowPartialAuth><Amt><![CDATA[10.00]]></Amt><WalletData><PaymentSource><![CDATA[GooglePayWeb]]></PaymentSource><DigitalPaymentToken><![CDATA[{"signature":"MEYCIQChbD9dizRQSTaboSQmp3GD3TSSKLd8kupbOr0IlL+AVgIhAKAbqM0PPn7WPTXZf7nXJPqq29h0hTQiRfusScTToLg8","protocolVersion":"ECv1","signedMessage":"{\"encryptedMessage\":\"S3P/E0IEZ32pUM1u737Susaj2kQst7cAXUw1bK7Lp9VM8GEqXTD6uaSCKSggFwhV9XNnOMvt9QYgEY69PHc5EFJBR4n9cB6QGrVjARGbUtANTXgSSJy08FFYwjFQ+/CqkHllY3JpnNjGsY5lny5cimatjkB4laTqIZv05mqc0KIzb4aUSfYQzukx6hfmDRDdrEGOfrKHiSx2EOkBguJ7r69BwcBAq58SL6Wpuvh99d8MJyhGSZLyozpD4gmhEVpyDZX5vdG5k6V0e6O6/Y53RPsnaKOH5nourzCLBMm28YBUY8TcqGY/TzRr7SNBDTXkem339CPlRYrFJNYhPRYJcutcf/Akfcrrj9NMBUMQ+Ab4bzbbcAyR/mneNGoWh/W5HFW7n8aYieZwFO2Of8TMOaUxLqpMyZv2UTguCHfSQdSKHt/fv9JxKPszlF0JuGkZmiv7ONDEaw\\u003d\\u003d\",\"ephemeralPublicKey\":\"BE0mGDo9yPUYbC7ERwX3JBNmnyRXRvJ9Nwj/N7B5VE+aN3yKe5UcCgUi8eUfJCwapGu0C8Rf2/9y4+rIY+72s0c\\u003d\",\"tag\":\"SBp7NAyNPgZ7lfyi8lIFGbo8S1sf/6ADqOqD1ZYT6y0\\u003d\"}"}]]></DigitalPaymentToken></WalletData><AdditionalTxnFields><CustomerID><![CDATA[]]></CustomerID><Description><![CDATA[]]></Description><InvoiceNbr><![CDATA[1234567890]]></InvoiceNbr></AdditionalTxnFields></Block1></CreditSale></Transaction></Ver1.0></PosRequest></soap:Body></soap:Envelope>
|
|
4
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><PosRequest xmlns="http://Hps.Exchange.PosGateway"><Ver1.0><Header><SecretAPIKey><![CDATA[skapi_cert_MTeSAQAfG1UA9qQDrzl-kz4toXvARyieptFwSKP24w]]></SecretAPIKey><SDKNameVersion><![CDATA[test]]></SDKNameVersion></Header><Transaction><CreditSale><Block1><AllowDup><![CDATA[Y]]></AllowDup><AllowPartialAuth><![CDATA[N]]></AllowPartialAuth><Amt><![CDATA[15.00]]></Amt><CardHolderData><CardHolderFirstName><![CDATA[Joe]]></CardHolderFirstName><CardHolderLastName><![CDATA[Smith]]></CardHolderLastName></CardHolderData><CardData><ManualEntry><CardNbr><![CDATA[4111111111111111]]></CardNbr><ExpMonth><![CDATA[12]]></ExpMonth><ExpYear><![CDATA[2025]]></ExpYear><CVV2><![CDATA[123]]></CVV2><ReaderPresent><![CDATA[N]]></ReaderPresent><CardPresent><![CDATA[N]]></CardPresent></ManualEntry><TokenRequest><![CDATA[N]]></TokenRequest></CardData></Block1></CreditSale></Transaction></Ver1.0></PosRequest></soap:Body></soap:Envelope>
|
package/package.json
CHANGED