Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 6f3497c

Browse files
Release 4.10.0.
1 parent 28aa46c commit 6f3497c

File tree

6 files changed

+37
-10
lines changed

6 files changed

+37
-10
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "connect-sdk-nodejs",
3-
"version": "4.9.0",
3+
"version": "4.10.0",
44
"description": "SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API",
55
"homepage": "https://github.com/Ingenico-ePayments/connect-sdk-nodejs#readme",
66
"bugs": {

schemas/payment/CreatePaymentRequest.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,9 @@
470470
"merchantInitiatedReasonIndicator" : {
471471
"type" : "string"
472472
},
473+
"networkTokenData" : {
474+
"$ref" : "#/definitions/SchemeTokenData"
475+
},
473476
"paymentProductId" : {
474477
"type" : "integer",
475478
"maximum" : 2147483647
@@ -1898,6 +1901,24 @@
18981901
},
18991902
"additionalProperties" : false
19001903
},
1904+
"SchemeTokenData" : {
1905+
"type" : "object",
1906+
"properties" : {
1907+
"cryptogram" : {
1908+
"type" : "string"
1909+
},
1910+
"eci" : {
1911+
"type" : "string"
1912+
},
1913+
"networkToken" : {
1914+
"type" : "string"
1915+
},
1916+
"tokenExpiryDate" : {
1917+
"type" : "string"
1918+
}
1919+
},
1920+
"additionalProperties" : false
1921+
},
19011922
"SdkDataInput" : {
19021923
"type" : "object",
19031924
"properties" : {

src/model/domain/payment/definitions/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ export interface CardPaymentMethodSpecificInput extends AbstractCardPaymentMetho
189189
externalCardholderAuthenticationData?: ExternalCardholderAuthenticationData | null;
190190
isRecurring?: boolean | null;
191191
merchantInitiatedReasonIndicator?: string | null;
192+
networkTokenData?: SchemeTokenData | null;
192193
/**
193194
* @deprecated Use threeDSecure.redirectionData.returnUrl instead
194195
*/
@@ -902,6 +903,13 @@ export interface RefundPaymentProduct840SpecificOutput {
902903
customerAccount?: RefundPaymentProduct840CustomerAccount | null;
903904
}
904905

906+
export interface SchemeTokenData {
907+
cryptogram?: string | null;
908+
eci?: string | null;
909+
networkToken?: string | null;
910+
tokenExpiryDate?: string | null;
911+
}
912+
905913
export interface SdkDataInput {
906914
/**
907915
* @deprecated No replacement

src/utils/connection.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import http = require("http");
22
import https = require("https");
33
import uuid = require("uuid");
4-
import formData = require("form-data");
4+
import FormData = require("form-data");
55
import obfuscate = require("../utils/obfuscate");
66
import headers = require("../utils/headers");
77
import { ConnectionCallback, Logger, MultipartFormDataObject, SdkContext } from "../model";
@@ -78,11 +78,9 @@ export function sendMultipart(options: https.RequestOptions, postData: Multipart
7878
handleError(e, context, logger, uuidString, cb);
7979
});
8080

81-
const form = new formData();
82-
// overwrite getBoundary to use the provided boundary instead of letting the form generate one
83-
form.getBoundary = (): string => {
84-
return boundary;
85-
};
81+
const form = new FormData();
82+
// Use the provided boundary instead of letting the form generate one
83+
form.setBoundary(boundary);
8684
if (postData) {
8785
for (const key in postData) {
8886
const item = postData[key];
@@ -99,7 +97,7 @@ export function sendMultipart(options: https.RequestOptions, postData: Multipart
9997
cb(new Error(key + ": content is required"), null);
10098
return;
10199
}
102-
const opts: formData.AppendOptions = {
100+
const opts: FormData.AppendOptions = {
103101
filename: item.fileName,
104102
contentType: item.contentType
105103
};

src/utils/headers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface ServerMetaInfo {
1818
export function serverMetaInfo(sdkContext: SdkContext): Header {
1919
const info: ServerMetaInfo = {
2020
sdkCreator: "Ingenico",
21-
sdkIdentifier: "NodejsServerSDK/v4.9.0",
21+
sdkIdentifier: "NodejsServerSDK/v4.10.0",
2222
platformIdentifier: process.env["OS"] + " Node.js/" + process.versions.node
2323
};
2424
if (sdkContext.getIntegrator() !== null) {

0 commit comments

Comments
 (0)