diff --git a/package-lock.json b/package-lock.json
index ba4cd76..3cc9807 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "connect-sdk-nodejs",
- "version": "4.17.0",
+ "version": "4.18.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 4c210e1..9544487 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "connect-sdk-nodejs",
- "version": "4.17.0",
+ "version": "4.18.0",
"description": "SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API",
"homepage": "https://github.com/Ingenico-ePayments/connect-sdk-nodejs#readme",
"bugs": {
diff --git a/schemas/hostedcheckout/CreateHostedCheckoutRequest.json b/schemas/hostedcheckout/CreateHostedCheckoutRequest.json
index 2f27912..ff333c2 100644
--- a/schemas/hostedcheckout/CreateHostedCheckoutRequest.json
+++ b/schemas/hostedcheckout/CreateHostedCheckoutRequest.json
@@ -435,6 +435,9 @@
"CardPaymentMethodSpecificInputBase" : {
"type" : "object",
"properties" : {
+ "acquirerPromotionCode" : {
+ "type" : "string"
+ },
"authorizationMode" : {
"type" : "string"
},
diff --git a/schemas/payment/CreatePaymentRequest.json b/schemas/payment/CreatePaymentRequest.json
index 110ddd4..2c40960 100644
--- a/schemas/payment/CreatePaymentRequest.json
+++ b/schemas/payment/CreatePaymentRequest.json
@@ -492,6 +492,9 @@
"CardPaymentMethodSpecificInput" : {
"type" : "object",
"properties" : {
+ "acquirerPromotionCode" : {
+ "type" : "string"
+ },
"authorizationMode" : {
"type" : "string"
},
diff --git a/src/captures/get.ts b/src/captures/get.ts
index 59dd6fc..8264f54 100644
--- a/src/captures/get.ts
+++ b/src/captures/get.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/captures/index.ts b/src/captures/index.ts
index 2c14a66..3d5722a 100644
--- a/src/captures/index.ts
+++ b/src/captures/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import get = require("./get");
import refund = require("./refund");
diff --git a/src/captures/refund.ts b/src/captures/refund.ts
index c34c328..b012890 100644
--- a/src/captures/refund.ts
+++ b/src/captures/refund.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/disputes/cancel.ts b/src/disputes/cancel.ts
index dd66b4a..124d5f5 100644
--- a/src/disputes/cancel.ts
+++ b/src/disputes/cancel.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/disputes/get.ts b/src/disputes/get.ts
index a234032..64a710f 100644
--- a/src/disputes/get.ts
+++ b/src/disputes/get.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/disputes/index.ts b/src/disputes/index.ts
index cacba04..556a3af 100644
--- a/src/disputes/index.ts
+++ b/src/disputes/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import get = require("./get");
import submit = require("./submit");
diff --git a/src/disputes/submit.ts b/src/disputes/submit.ts
index 5805624..fc763d9 100644
--- a/src/disputes/submit.ts
+++ b/src/disputes/submit.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/disputes/uploadFile.ts b/src/disputes/uploadFile.ts
index 4d351b4..5896761 100644
--- a/src/disputes/uploadFile.ts
+++ b/src/disputes/uploadFile.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/files/getFile.ts b/src/files/getFile.ts
index 8080fed..10cc1a9 100644
--- a/src/files/getFile.ts
+++ b/src/files/getFile.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/files/index.ts b/src/files/index.ts
index 8acd341..193ab6f 100644
--- a/src/files/index.ts
+++ b/src/files/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import getFile = require("./getFile");
import { FilesClient } from "../model/files";
diff --git a/src/hostedcheckouts/create.ts b/src/hostedcheckouts/create.ts
index fde1e43..4b9a27c 100644
--- a/src/hostedcheckouts/create.ts
+++ b/src/hostedcheckouts/create.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/hostedcheckouts/get.ts b/src/hostedcheckouts/get.ts
index 785efde..917995c 100644
--- a/src/hostedcheckouts/get.ts
+++ b/src/hostedcheckouts/get.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/hostedcheckouts/index.ts b/src/hostedcheckouts/index.ts
index 4c28636..345cd09 100644
--- a/src/hostedcheckouts/index.ts
+++ b/src/hostedcheckouts/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import create = require("./create");
import get = require("./get");
diff --git a/src/hostedcheckouts/remove.ts b/src/hostedcheckouts/remove.ts
index 161f6bd..87add1e 100644
--- a/src/hostedcheckouts/remove.ts
+++ b/src/hostedcheckouts/remove.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/hostedmandatemanagements/create.ts b/src/hostedmandatemanagements/create.ts
index 597c1c2..7622869 100644
--- a/src/hostedmandatemanagements/create.ts
+++ b/src/hostedmandatemanagements/create.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/hostedmandatemanagements/get.ts b/src/hostedmandatemanagements/get.ts
index 51a86d8..e0a598a 100644
--- a/src/hostedmandatemanagements/get.ts
+++ b/src/hostedmandatemanagements/get.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/hostedmandatemanagements/index.ts b/src/hostedmandatemanagements/index.ts
index e478eba..92d3b9a 100644
--- a/src/hostedmandatemanagements/index.ts
+++ b/src/hostedmandatemanagements/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import create = require("./create");
import get = require("./get");
diff --git a/src/index.ts b/src/index.ts
index 6c0b747..9b5eef7 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import https = require("https");
import { CommunicatorLogger, ConnectSdk, Context } from "./model";
@@ -90,6 +90,7 @@ const connectSdk: ConnectSdk = {
sessions: sessions,
installments: installments,
files: files,
+
context: sdkcontext,
webhooks: webhooks,
diff --git a/src/installments/getInstallmentsInfo.ts b/src/installments/getInstallmentsInfo.ts
index 8e00a83..dcf5a95 100644
--- a/src/installments/getInstallmentsInfo.ts
+++ b/src/installments/getInstallmentsInfo.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/installments/index.ts b/src/installments/index.ts
index 1b67049..13c25da 100644
--- a/src/installments/index.ts
+++ b/src/installments/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import getInstallmentsInfo = require("./getInstallmentsInfo");
import { InstallmentsClient } from "../model/installments";
diff --git a/src/mandates/block.ts b/src/mandates/block.ts
index 490d327..8564187 100644
--- a/src/mandates/block.ts
+++ b/src/mandates/block.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/mandates/create.ts b/src/mandates/create.ts
index 128ca9e..39d7262 100644
--- a/src/mandates/create.ts
+++ b/src/mandates/create.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/mandates/createWithMandateReference.ts b/src/mandates/createWithMandateReference.ts
index a518e64..657c6b2 100644
--- a/src/mandates/createWithMandateReference.ts
+++ b/src/mandates/createWithMandateReference.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/mandates/get.ts b/src/mandates/get.ts
index 8b04308..bb827e3 100644
--- a/src/mandates/get.ts
+++ b/src/mandates/get.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/mandates/index.ts b/src/mandates/index.ts
index 95233b0..28a5ff9 100644
--- a/src/mandates/index.ts
+++ b/src/mandates/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import create = require("./create");
import createWithMandateReference = require("./createWithMandateReference");
diff --git a/src/mandates/revoke.ts b/src/mandates/revoke.ts
index 4c0deb3..64761fc 100644
--- a/src/mandates/revoke.ts
+++ b/src/mandates/revoke.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/mandates/unblock.ts b/src/mandates/unblock.ts
index 07b34ad..9f083a1 100644
--- a/src/mandates/unblock.ts
+++ b/src/mandates/unblock.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/model/captures/index.ts b/src/model/captures/index.ts
index 4e4e3bb..57d578b 100644
--- a/src/model/captures/index.ts
+++ b/src/model/captures/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { RefundRequest } from "../domain/refund";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/disputes/index.ts b/src/model/disputes/index.ts
index 5872c71..2ead1e4 100644
--- a/src/model/disputes/index.ts
+++ b/src/model/disputes/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { MultipartFormDataObject, PaymentContext, SdkCallback, UploadableFile } from "../types";
diff --git a/src/model/domain/capture/definitions/index.ts b/src/model/domain/capture/definitions/index.ts
index 56cf922..6ba5ec9 100644
--- a/src/model/domain/capture/definitions/index.ts
+++ b/src/model/domain/capture/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { AbstractOrderStatus, KeyValuePair } from "../../definitions";
import {
diff --git a/src/model/domain/capture/index.ts b/src/model/domain/capture/index.ts
index 5ce6eff..799c93b 100644
--- a/src/model/domain/capture/index.ts
+++ b/src/model/domain/capture/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { Capture } from "./definitions";
diff --git a/src/model/domain/definitions/index.ts b/src/model/domain/definitions/index.ts
index 5dbf9a1..5d0d3ed 100644
--- a/src/model/domain/definitions/index.ts
+++ b/src/model/domain/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { APIError } from "../errors/definitions";
diff --git a/src/model/domain/dispute/definitions/index.ts b/src/model/domain/dispute/definitions/index.ts
index 2870438..a2d7cba 100644
--- a/src/model/domain/dispute/definitions/index.ts
+++ b/src/model/domain/dispute/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { AmountOfMoney } from "../../definitions";
import { HostedFile } from "../../file/definitions";
diff --git a/src/model/domain/dispute/index.ts b/src/model/domain/dispute/index.ts
index 56a79f3..199c744 100644
--- a/src/model/domain/dispute/index.ts
+++ b/src/model/domain/dispute/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { AmountOfMoney } from "../definitions";
import { Dispute } from "./definitions";
diff --git a/src/model/domain/errors/definitions/index.ts b/src/model/domain/errors/definitions/index.ts
index bbece07..706c9a7 100644
--- a/src/model/domain/errors/definitions/index.ts
+++ b/src/model/domain/errors/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
export interface APIError {
diff --git a/src/model/domain/errors/index.ts b/src/model/domain/errors/index.ts
index d01a501..46a88b8 100644
--- a/src/model/domain/errors/index.ts
+++ b/src/model/domain/errors/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { APIError } from "./definitions";
diff --git a/src/model/domain/file/definitions/index.ts b/src/model/domain/file/definitions/index.ts
index 148544e..726b898 100644
--- a/src/model/domain/file/definitions/index.ts
+++ b/src/model/domain/file/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
export interface HostedFile {
diff --git a/src/model/domain/hostedcheckout/definitions/index.ts b/src/model/domain/hostedcheckout/definitions/index.ts
index 9003072..1d314ae 100644
--- a/src/model/domain/hostedcheckout/definitions/index.ts
+++ b/src/model/domain/hostedcheckout/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { AbstractPaymentMethodSpecificInput, AmountOfMoney, KeyValuePair, PaymentProductFilter } from "../../definitions";
import { GPayThreeDSecure, Payment, PaymentCreationReferences } from "../../payment/definitions";
diff --git a/src/model/domain/hostedcheckout/index.ts b/src/model/domain/hostedcheckout/index.ts
index 06fd80c..02a54b1 100644
--- a/src/model/domain/hostedcheckout/index.ts
+++ b/src/model/domain/hostedcheckout/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { FraudFields } from "../definitions";
import {
diff --git a/src/model/domain/hostedmandatemanagement/definitions/index.ts b/src/model/domain/hostedmandatemanagement/definitions/index.ts
index bdae7b0..8cec5d6 100644
--- a/src/model/domain/hostedmandatemanagement/definitions/index.ts
+++ b/src/model/domain/hostedmandatemanagement/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { MandateCustomer } from "../../mandates/definitions";
diff --git a/src/model/domain/hostedmandatemanagement/index.ts b/src/model/domain/hostedmandatemanagement/index.ts
index 024cd9c..c7c678a 100644
--- a/src/model/domain/hostedmandatemanagement/index.ts
+++ b/src/model/domain/hostedmandatemanagement/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { MandateResponse } from "../mandates/definitions";
import { HostedMandateInfo, HostedMandateManagementSpecificInput } from "./definitions";
diff --git a/src/model/domain/installments/definitions/index.ts b/src/model/domain/installments/definitions/index.ts
index 8290025..2635631 100644
--- a/src/model/domain/installments/definitions/index.ts
+++ b/src/model/domain/installments/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { Installments } from "../../payment/definitions";
diff --git a/src/model/domain/installments/index.ts b/src/model/domain/installments/index.ts
index 4f8e59d..7565125 100644
--- a/src/model/domain/installments/index.ts
+++ b/src/model/domain/installments/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { AmountOfMoney } from "../definitions";
import { InstallmentOptions } from "./definitions";
diff --git a/src/model/domain/mandates/definitions/index.ts b/src/model/domain/mandates/definitions/index.ts
index a25fdbe..cf31a9b 100644
--- a/src/model/domain/mandates/definitions/index.ts
+++ b/src/model/domain/mandates/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { BankAccountIban, RedirectDataBase } from "../../definitions";
diff --git a/src/model/domain/mandates/index.ts b/src/model/domain/mandates/index.ts
index e945f5d..41fae36 100644
--- a/src/model/domain/mandates/index.ts
+++ b/src/model/domain/mandates/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { CreateMandateWithReturnUrl, MandateMerchantAction, MandateResponse } from "./definitions";
diff --git a/src/model/domain/payment/definitions/index.ts b/src/model/domain/payment/definitions/index.ts
index bf74320..7c92392 100644
--- a/src/model/domain/payment/definitions/index.ts
+++ b/src/model/domain/payment/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import {
AbstractOrderStatus,
@@ -32,6 +32,7 @@ export interface AbstractBankTransferPaymentMethodSpecificInput extends Abstract
}
export interface AbstractCardPaymentMethodSpecificInput extends AbstractPaymentMethodSpecificInput {
+ acquirerPromotionCode?: string | null;
authorizationMode?: string | null;
customerReference?: string | null;
initialSchemeTransactionId?: string | null;
diff --git a/src/model/domain/payment/index.ts b/src/model/domain/payment/index.ts
index 4658a7e..821d646 100644
--- a/src/model/domain/payment/index.ts
+++ b/src/model/domain/payment/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { FraudFields } from "../definitions";
import { APIError } from "../errors/definitions";
diff --git a/src/model/domain/payout/definitions/index.ts b/src/model/domain/payout/definitions/index.ts
index 3d5e1d9..eed46b9 100644
--- a/src/model/domain/payout/definitions/index.ts
+++ b/src/model/domain/payout/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { AbstractOrderStatus, Address, AmountOfMoney, BankAccountBban, BankAccountIban, Card, CompanyInformation, ContactDetailsBase, OrderStatusOutput } from "../../definitions";
import { OrderOutput, PersonalName } from "../../payment/definitions";
diff --git a/src/model/domain/payout/index.ts b/src/model/domain/payout/index.ts
index b2f131d..1182816 100644
--- a/src/model/domain/payout/index.ts
+++ b/src/model/domain/payout/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { AmountOfMoney, BankAccountBban, BankAccountIban } from "../definitions";
import { APIError } from "../errors/definitions";
diff --git a/src/model/domain/product/definitions/index.ts b/src/model/domain/product/definitions/index.ts
index f2e3a96..bf61053 100644
--- a/src/model/domain/product/definitions/index.ts
+++ b/src/model/domain/product/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { KeyValuePair } from "../../definitions";
diff --git a/src/model/domain/product/index.ts b/src/model/domain/product/index.ts
index 058ab6b..f15d5f0 100644
--- a/src/model/domain/product/index.ts
+++ b/src/model/domain/product/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { KeyValuePair } from "../definitions";
import { DirectoryEntry, MobilePaymentProductSession302SpecificInput, MobilePaymentProductSession302SpecificOutput, PaymentProduct, PaymentProductGroup } from "./definitions";
diff --git a/src/model/domain/refund/definitions/index.ts b/src/model/domain/refund/definitions/index.ts
index f6c2765..92468b1 100644
--- a/src/model/domain/refund/definitions/index.ts
+++ b/src/model/domain/refund/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { AbstractOrderStatus, BankAccountBban, BankAccountIban, CompanyInformation, ContactDetailsBase, OrderStatusOutput } from "../../definitions";
import { AddressPersonal, RefundOutput } from "../../payment/definitions";
diff --git a/src/model/domain/refund/index.ts b/src/model/domain/refund/index.ts
index 026f6dd..bf60c6b 100644
--- a/src/model/domain/refund/index.ts
+++ b/src/model/domain/refund/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { AmountOfMoney } from "../definitions";
import { APIError } from "../errors/definitions";
diff --git a/src/model/domain/riskassessments/definitions/index.ts b/src/model/domain/riskassessments/definitions/index.ts
index 98a9f6f..fa9758b 100644
--- a/src/model/domain/riskassessments/definitions/index.ts
+++ b/src/model/domain/riskassessments/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { AdditionalOrderInputAirlineData, Address, AmountOfMoney, FraudFields, PersonalNameBase } from "../../definitions";
import { AddressPersonal } from "../../payment/definitions";
diff --git a/src/model/domain/riskassessments/index.ts b/src/model/domain/riskassessments/index.ts
index 9c71536..7ae30c7 100644
--- a/src/model/domain/riskassessments/index.ts
+++ b/src/model/domain/riskassessments/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { BankAccountBban, BankAccountIban, Card, ResultDoRiskAssessment } from "../definitions";
import { RiskAssessment } from "./definitions";
diff --git a/src/model/domain/services/definitions/index.ts b/src/model/domain/services/definitions/index.ts
index 8f49710..ca44ca6 100644
--- a/src/model/domain/services/definitions/index.ts
+++ b/src/model/domain/services/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { AmountOfMoney, BankAccountBban, BankAccountIban } from "../../definitions";
diff --git a/src/model/domain/services/index.ts b/src/model/domain/services/index.ts
index d6aa573..3417e30 100644
--- a/src/model/domain/services/index.ts
+++ b/src/model/domain/services/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { BankAccountBban, BankAccountIban } from "../definitions";
import { BankData, BankDetails, IINDetail, PaymentContext, Swift } from "./definitions";
diff --git a/src/model/domain/sessions/definitions/index.ts b/src/model/domain/sessions/definitions/index.ts
index 5c108a0..a22a41e 100644
--- a/src/model/domain/sessions/definitions/index.ts
+++ b/src/model/domain/sessions/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { PaymentProductFilter } from "../../definitions";
diff --git a/src/model/domain/sessions/index.ts b/src/model/domain/sessions/index.ts
index 6c36398..a5f30f1 100644
--- a/src/model/domain/sessions/index.ts
+++ b/src/model/domain/sessions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { PaymentProductFiltersClientSession } from "./definitions";
diff --git a/src/model/domain/token/definitions/index.ts b/src/model/domain/token/definitions/index.ts
index 4c553ed..3642ce5 100644
--- a/src/model/domain/token/definitions/index.ts
+++ b/src/model/domain/token/definitions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { Address, BankAccountBban, BankAccountIban, CardWithoutCvv, ContactDetailsBase, CustomerBase, PersonalNameBase } from "../../definitions";
diff --git a/src/model/domain/token/index.ts b/src/model/domain/token/index.ts
index 5b7b463..26e879e 100644
--- a/src/model/domain/token/index.ts
+++ b/src/model/domain/token/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { MandateApproval, TokenCard, TokenEWallet, TokenNonSepaDirectDebit, TokenSepaDirectDebit, TokenSepaDirectDebitWithoutCreditor } from "./definitions";
diff --git a/src/model/files/index.ts b/src/model/files/index.ts
index a4bbd0f..d099ed6 100644
--- a/src/model/files/index.ts
+++ b/src/model/files/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/hostedcheckouts/index.ts b/src/model/hostedcheckouts/index.ts
index 438b784..65e6d79 100644
--- a/src/model/hostedcheckouts/index.ts
+++ b/src/model/hostedcheckouts/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { CreateHostedCheckoutRequest } from "../domain/hostedcheckout";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/hostedmandatemanagements/index.ts b/src/model/hostedmandatemanagements/index.ts
index 81bc854..a314e53 100644
--- a/src/model/hostedmandatemanagements/index.ts
+++ b/src/model/hostedmandatemanagements/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { CreateHostedMandateManagementRequest } from "../domain/hostedmandatemanagement";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/index.ts b/src/model/index.ts
index cd74465..aa49438 100644
--- a/src/model/index.ts
+++ b/src/model/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { Context, ObfuscationRules, SdkContext } from "./types";
import { HostedcheckoutsClient } from "./hostedcheckouts";
diff --git a/src/model/installments/index.ts b/src/model/installments/index.ts
index 4a8a32c..ebc9937 100644
--- a/src/model/installments/index.ts
+++ b/src/model/installments/index.ts
@@ -1,13 +1,13 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { GetInstallmentRequest } from "../domain/installments";
import { PaymentContext, SdkCallback } from "../types";
export interface InstallmentsClient {
/**
- * Resource /{merchantId}/installments/getInstallmentsInfo - Get Installment Info
+ * Resource /{merchantId}/installments/getInstallmentsInfo - Get installment information
* @param cb The callback for the response.
* If the call was successfull, the response body type will be {@link InstallmentOptionsResponse}.
* If the call was not successful, the response body type will be {@link ErrorResponse}.
diff --git a/src/model/mandates/index.ts b/src/model/mandates/index.ts
index 46f1409..6074692 100644
--- a/src/model/mandates/index.ts
+++ b/src/model/mandates/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { CreateMandateRequest } from "../domain/mandates";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/payments/index.ts b/src/model/payments/index.ts
index 6bf685e..e66c4aa 100644
--- a/src/model/payments/index.ts
+++ b/src/model/payments/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { CreateDisputeRequest } from "../domain/dispute";
import { ApprovePaymentRequest, CapturePaymentRequest, CompletePaymentRequest, CreatePaymentRequest, TokenizePaymentRequest } from "../domain/payment";
diff --git a/src/model/payouts/index.ts b/src/model/payouts/index.ts
index f1c4de0..d3b3af2 100644
--- a/src/model/payouts/index.ts
+++ b/src/model/payouts/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { ApprovePayoutRequest, CreatePayoutRequest } from "../domain/payout";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/productgroups/index.ts b/src/model/productgroups/index.ts
index c26b197..5693c0d 100644
--- a/src/model/productgroups/index.ts
+++ b/src/model/productgroups/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { DeviceFingerprintRequest } from "../domain/product";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/products/index.ts b/src/model/products/index.ts
index 9e1f0f3..7af5e80 100644
--- a/src/model/products/index.ts
+++ b/src/model/products/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { CreatePaymentProductSessionRequest, DeviceFingerprintRequest, GetCustomerDetailsRequest } from "../domain/product";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/refunds/index.ts b/src/model/refunds/index.ts
index 6c81d67..c55fdf4 100644
--- a/src/model/refunds/index.ts
+++ b/src/model/refunds/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { ApproveRefundRequest } from "../domain/refund";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/riskassessments/index.ts b/src/model/riskassessments/index.ts
index 897e25b..c325ded 100644
--- a/src/model/riskassessments/index.ts
+++ b/src/model/riskassessments/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { RiskAssessmentBankAccount, RiskAssessmentCard } from "../domain/riskassessments";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/services/index.ts b/src/model/services/index.ts
index 50b9f68..384f102 100644
--- a/src/model/services/index.ts
+++ b/src/model/services/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { BankDetailsRequest, GetIINDetailsRequest } from "../domain/services";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/sessions/index.ts b/src/model/sessions/index.ts
index 7048853..af00fc0 100644
--- a/src/model/sessions/index.ts
+++ b/src/model/sessions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { SessionRequest } from "../domain/sessions";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/tokens/index.ts b/src/model/tokens/index.ts
index bcd64f2..4fcf2f0 100644
--- a/src/model/tokens/index.ts
+++ b/src/model/tokens/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { ApproveTokenRequest, CreateTokenRequest, UpdateTokenRequest } from "../domain/token";
import { PaymentContext, SdkCallback } from "../types";
diff --git a/src/model/webhooks/index.ts b/src/model/webhooks/index.ts
index ad77078..ca9146f 100644
--- a/src/model/webhooks/index.ts
+++ b/src/model/webhooks/index.ts
@@ -1,45 +1,8 @@
+import { InMemorySecretKeyStore, RequestHeaders, ValidateCallback, WebhooksContext } from "./types";
import { WebhooksEvent } from "../domain/webhooks";
-export class ApiVersionMismatchError extends Error {
- public constructor(message: string, public readonly eventApiVersion: string, public readonly sdkApiVersion: string) {
- super(message);
- // see https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
- Object.setPrototypeOf(this, ApiVersionMismatchError.prototype);
- }
- name = "ApiVersionMismatchError";
-}
-
-export interface InMemorySecretKeyStore extends SecretKeyStore {
- storeSecretKey(keyId: string, secretKey: string): void;
- removeSecretKey(keyId: string): void;
- clear(): void;
-}
-
-export type RequestHeaders = { [header: string]: string | string[] | undefined };
-
-export type SecretKeyCallback = (e: Error | null, secretKey: string | null) => void;
-
-export class SecretKeyNotAvailableError extends Error {
- public constructor(message: string, public readonly keyId: string) {
- super(message);
- // see https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
- Object.setPrototypeOf(this, SecretKeyNotAvailableError.prototype);
- }
- name = "SecretKeyNotAvailableError";
-}
-
-export interface SecretKeyStore {
- getSecretKey(keyId: string, cb: SecretKeyCallback): void;
-}
-
export type UnmarshalCallback = (e: Error | null, event: WebhooksEvent | null) => void;
-export type ValidateCallback = (e: Error | null) => void;
-
-export interface WebhooksContext {
- getSecretKey(keyId: string, cb: SecretKeyCallback): void;
-}
-
export interface WebhooksHelper {
init(context: WebhooksContext): WebhooksHelper;
validate(body: string | Buffer, requestHeaders: RequestHeaders, cb: ValidateCallback): void;
@@ -47,3 +10,5 @@ export interface WebhooksHelper {
readonly inMemorySecretKeyStore: InMemorySecretKeyStore;
}
+
+export * from "./types";
diff --git a/src/model/webhooks/types.ts b/src/model/webhooks/types.ts
new file mode 100644
index 0000000..496a2b3
--- /dev/null
+++ b/src/model/webhooks/types.ts
@@ -0,0 +1,42 @@
+export class ApiVersionMismatchError extends Error {
+ public constructor(message: string, public readonly eventApiVersion: string, public readonly sdkApiVersion: string) {
+ super(message);
+ // see https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
+ Object.setPrototypeOf(this, ApiVersionMismatchError.prototype);
+ }
+ name = "ApiVersionMismatchError";
+}
+
+export interface InMemorySecretKeyStore extends SecretKeyStore {
+ storeSecretKey(keyId: string, secretKey: string): void;
+ removeSecretKey(keyId: string): void;
+ clear(): void;
+}
+
+export type RequestHeaders = { [header: string]: string | string[] | undefined };
+
+export type SecretKeyCallback = (e: Error | null, secretKey: string | null) => void;
+
+export class SecretKeyNotAvailableError extends Error {
+ public constructor(message: string, public readonly keyId: string) {
+ super(message);
+ // see https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
+ Object.setPrototypeOf(this, SecretKeyNotAvailableError.prototype);
+ }
+ name = "SecretKeyNotAvailableError";
+}
+
+export interface SecretKeyStore {
+ getSecretKey(keyId: string, cb: SecretKeyCallback): void;
+}
+
+export interface SignatureValidator {
+ init(secretKeyStore: SecretKeyStore): void;
+ validate(body: string | Buffer, requestHeaders: RequestHeaders, cb: ValidateCallback): void;
+}
+
+export type ValidateCallback = (e: Error | null) => void;
+
+export interface WebhooksContext {
+ getSecretKey(keyId: string, cb: SecretKeyCallback): void;
+}
diff --git a/src/payments/approve.ts b/src/payments/approve.ts
index 811aeee..b41bf03 100644
--- a/src/payments/approve.ts
+++ b/src/payments/approve.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/payments/cancel.ts b/src/payments/cancel.ts
index bd285bf..fcbcb65 100644
--- a/src/payments/cancel.ts
+++ b/src/payments/cancel.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payments/cancelapproval.ts b/src/payments/cancelapproval.ts
index 298d260..d5ec5e9 100644
--- a/src/payments/cancelapproval.ts
+++ b/src/payments/cancelapproval.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payments/capture.ts b/src/payments/capture.ts
index 001b2ad..74d5c19 100644
--- a/src/payments/capture.ts
+++ b/src/payments/capture.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/payments/captures.ts b/src/payments/captures.ts
index 7cdb4b3..69f68c7 100644
--- a/src/payments/captures.ts
+++ b/src/payments/captures.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payments/complete.ts b/src/payments/complete.ts
index 7206756..c9855a2 100644
--- a/src/payments/complete.ts
+++ b/src/payments/complete.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/payments/create.ts b/src/payments/create.ts
index 92a94d9..2b70509 100644
--- a/src/payments/create.ts
+++ b/src/payments/create.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/payments/devicefingerprint.ts b/src/payments/devicefingerprint.ts
index cc8aab6..7b9af30 100644
--- a/src/payments/devicefingerprint.ts
+++ b/src/payments/devicefingerprint.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payments/dispute.ts b/src/payments/dispute.ts
index e13c202..3239b86 100644
--- a/src/payments/dispute.ts
+++ b/src/payments/dispute.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/payments/disputes.ts b/src/payments/disputes.ts
index 240030c..20c13e5 100644
--- a/src/payments/disputes.ts
+++ b/src/payments/disputes.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payments/find.ts b/src/payments/find.ts
index 086c5ea..27ca0aa 100644
--- a/src/payments/find.ts
+++ b/src/payments/find.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/payments/get.ts b/src/payments/get.ts
index b59b93b..26f598f 100644
--- a/src/payments/get.ts
+++ b/src/payments/get.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payments/index.ts b/src/payments/index.ts
index 0bf32e2..edd455e 100644
--- a/src/payments/index.ts
+++ b/src/payments/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import create = require("./create");
import find = require("./find");
diff --git a/src/payments/processchallenged.ts b/src/payments/processchallenged.ts
index d8463bc..23565cf 100644
--- a/src/payments/processchallenged.ts
+++ b/src/payments/processchallenged.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payments/refund.ts b/src/payments/refund.ts
index 9453c83..8082402 100644
--- a/src/payments/refund.ts
+++ b/src/payments/refund.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/payments/refunds.ts b/src/payments/refunds.ts
index 5b5de44..c34fcc2 100644
--- a/src/payments/refunds.ts
+++ b/src/payments/refunds.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payments/thirdPartyStatus.ts b/src/payments/thirdPartyStatus.ts
index 8039d8a..f00de7f 100644
--- a/src/payments/thirdPartyStatus.ts
+++ b/src/payments/thirdPartyStatus.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payments/tokenize.ts b/src/payments/tokenize.ts
index 9bb1b85..70ae4dd 100644
--- a/src/payments/tokenize.ts
+++ b/src/payments/tokenize.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/payouts/approve.ts b/src/payouts/approve.ts
index fba2df4..771bbfe 100644
--- a/src/payouts/approve.ts
+++ b/src/payouts/approve.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/payouts/cancel.ts b/src/payouts/cancel.ts
index 9d54e35..14ae39f 100644
--- a/src/payouts/cancel.ts
+++ b/src/payouts/cancel.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payouts/cancelapproval.ts b/src/payouts/cancelapproval.ts
index 5669be8..6940b5a 100644
--- a/src/payouts/cancelapproval.ts
+++ b/src/payouts/cancelapproval.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payouts/create.ts b/src/payouts/create.ts
index ef29be9..7df5227 100644
--- a/src/payouts/create.ts
+++ b/src/payouts/create.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/payouts/find.ts b/src/payouts/find.ts
index 3f6b159..2bb587f 100644
--- a/src/payouts/find.ts
+++ b/src/payouts/find.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/payouts/get.ts b/src/payouts/get.ts
index 5af9233..9123361 100644
--- a/src/payouts/get.ts
+++ b/src/payouts/get.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/payouts/index.ts b/src/payouts/index.ts
index 57bf378..859b67d 100644
--- a/src/payouts/index.ts
+++ b/src/payouts/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import create = require("./create");
import find = require("./find");
diff --git a/src/productgroups/deviceFingerprint.ts b/src/productgroups/deviceFingerprint.ts
index 21d8aec..ee32025 100644
--- a/src/productgroups/deviceFingerprint.ts
+++ b/src/productgroups/deviceFingerprint.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/productgroups/find.ts b/src/productgroups/find.ts
index e8b63b9..a2af084 100644
--- a/src/productgroups/find.ts
+++ b/src/productgroups/find.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/productgroups/get.ts b/src/productgroups/get.ts
index de225cd..bce17cb 100644
--- a/src/productgroups/get.ts
+++ b/src/productgroups/get.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/productgroups/index.ts b/src/productgroups/index.ts
index a06ef02..d7b925e 100644
--- a/src/productgroups/index.ts
+++ b/src/productgroups/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import find = require("./find");
import get = require("./get");
diff --git a/src/products/customerDetails.ts b/src/products/customerDetails.ts
index 068e3a4..1700727 100644
--- a/src/products/customerDetails.ts
+++ b/src/products/customerDetails.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/products/deviceFingerprint.ts b/src/products/deviceFingerprint.ts
index 1e13b27..be26260 100644
--- a/src/products/deviceFingerprint.ts
+++ b/src/products/deviceFingerprint.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/products/directory.ts b/src/products/directory.ts
index 08ea9c7..53fc888 100644
--- a/src/products/directory.ts
+++ b/src/products/directory.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/products/find.ts b/src/products/find.ts
index 5e38144..847a44d 100644
--- a/src/products/find.ts
+++ b/src/products/find.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/products/get.ts b/src/products/get.ts
index ce8afc7..b6bf6cc 100644
--- a/src/products/get.ts
+++ b/src/products/get.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/products/index.ts b/src/products/index.ts
index 6465b2a..92539a4 100644
--- a/src/products/index.ts
+++ b/src/products/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import find = require("./find");
import get = require("./get");
diff --git a/src/products/networks.ts b/src/products/networks.ts
index e310fc3..a123057 100644
--- a/src/products/networks.ts
+++ b/src/products/networks.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/products/sessions.ts b/src/products/sessions.ts
index 9256929..61497c3 100644
--- a/src/products/sessions.ts
+++ b/src/products/sessions.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/refunds/approve.ts b/src/refunds/approve.ts
index bde1f11..f01f066 100644
--- a/src/refunds/approve.ts
+++ b/src/refunds/approve.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/refunds/cancel.ts b/src/refunds/cancel.ts
index dc19800..633f223 100644
--- a/src/refunds/cancel.ts
+++ b/src/refunds/cancel.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/refunds/cancelapproval.ts b/src/refunds/cancelapproval.ts
index 1190164..19c2fec 100644
--- a/src/refunds/cancelapproval.ts
+++ b/src/refunds/cancelapproval.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/refunds/find.ts b/src/refunds/find.ts
index 33408cf..20f8649 100644
--- a/src/refunds/find.ts
+++ b/src/refunds/find.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/refunds/get.ts b/src/refunds/get.ts
index b119553..1e97d14 100644
--- a/src/refunds/get.ts
+++ b/src/refunds/get.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/refunds/index.ts b/src/refunds/index.ts
index 2232ea7..de05b30 100644
--- a/src/refunds/index.ts
+++ b/src/refunds/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import find = require("./find");
import get = require("./get");
diff --git a/src/riskassessments/bankaccounts.ts b/src/riskassessments/bankaccounts.ts
index e64ebc2..acaf44f 100644
--- a/src/riskassessments/bankaccounts.ts
+++ b/src/riskassessments/bankaccounts.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/riskassessments/cards.ts b/src/riskassessments/cards.ts
index b69992f..e7adae3 100644
--- a/src/riskassessments/cards.ts
+++ b/src/riskassessments/cards.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/riskassessments/index.ts b/src/riskassessments/index.ts
index 5dde837..c085e00 100644
--- a/src/riskassessments/index.ts
+++ b/src/riskassessments/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import bankaccounts = require("./bankaccounts");
import cards = require("./cards");
diff --git a/src/services/bankaccount.ts b/src/services/bankaccount.ts
index 15c03f4..b0d2e6f 100644
--- a/src/services/bankaccount.ts
+++ b/src/services/bankaccount.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/services/convertAmount.ts b/src/services/convertAmount.ts
index 8a60eee..8e25f98 100644
--- a/src/services/convertAmount.ts
+++ b/src/services/convertAmount.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/services/getIINdetails.ts b/src/services/getIINdetails.ts
index b0cdee1..d514ca4 100644
--- a/src/services/getIINdetails.ts
+++ b/src/services/getIINdetails.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/services/index.ts b/src/services/index.ts
index 1bd9900..0cac3d8 100644
--- a/src/services/index.ts
+++ b/src/services/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import convertAmount = require("./convertAmount");
import bankaccount = require("./bankaccount");
diff --git a/src/services/privacypolicy.ts b/src/services/privacypolicy.ts
index 4e6546d..efe5485 100644
--- a/src/services/privacypolicy.ts
+++ b/src/services/privacypolicy.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/services/testconnection.ts b/src/services/testconnection.ts
index 45f6d11..0763947 100644
--- a/src/services/testconnection.ts
+++ b/src/services/testconnection.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/sessions/create.ts b/src/sessions/create.ts
index b781cf1..cbc7344 100644
--- a/src/sessions/create.ts
+++ b/src/sessions/create.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/sessions/index.ts b/src/sessions/index.ts
index d5a63f0..b7478c3 100644
--- a/src/sessions/index.ts
+++ b/src/sessions/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import create = require("./create");
import { SessionsClient } from "../model/sessions";
diff --git a/src/tokens/approvesepadirectdebit.ts b/src/tokens/approvesepadirectdebit.ts
index afa029f..b097b6e 100644
--- a/src/tokens/approvesepadirectdebit.ts
+++ b/src/tokens/approvesepadirectdebit.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/tokens/create.ts b/src/tokens/create.ts
index de43761..ac8c5c4 100644
--- a/src/tokens/create.ts
+++ b/src/tokens/create.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/tokens/get.ts b/src/tokens/get.ts
index 413e99e..32de3fb 100644
--- a/src/tokens/get.ts
+++ b/src/tokens/get.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { PaymentContext, SdkCallback } from "../model";
diff --git a/src/tokens/index.ts b/src/tokens/index.ts
index a6d670a..6fe516e 100644
--- a/src/tokens/index.ts
+++ b/src/tokens/index.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import create = require("./create");
import get = require("./get");
diff --git a/src/tokens/remove.ts b/src/tokens/remove.ts
index 65ed9f0..2245dc1 100644
--- a/src/tokens/remove.ts
+++ b/src/tokens/remove.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import communicator = require("../utils/communicator");
import { SdkCallback } from "../model";
diff --git a/src/tokens/update.ts b/src/tokens/update.ts
index 72f17e8..62364d2 100644
--- a/src/tokens/update.ts
+++ b/src/tokens/update.ts
@@ -1,6 +1,6 @@
/*
* This file was auto-generated from the API references found at
- * https://epayments-api.developer-ingenico.com/s2sapi/v1/
+ * https://epayments-api.developer-ingenico.com/
*/
import { validate } from "jsonschema";
import communicator = require("../utils/communicator");
diff --git a/src/utils/headers.ts b/src/utils/headers.ts
index 0cbb76c..d2a24cb 100644
--- a/src/utils/headers.ts
+++ b/src/utils/headers.ts
@@ -18,7 +18,7 @@ interface ServerMetaInfo {
export function serverMetaInfo(sdkContext: SdkContext): Header {
const info: ServerMetaInfo = {
sdkCreator: "Ingenico",
- sdkIdentifier: "NodejsServerSDK/v4.17.0",
+ sdkIdentifier: "NodejsServerSDK/v4.18.0",
platformIdentifier: process.env["OS"] + " Node.js/" + process.versions.node
};
if (sdkContext.getIntegrator() !== null) {
diff --git a/src/webhooks/index.ts b/src/webhooks/index.ts
index 60ac6e4..34c7bee 100644
--- a/src/webhooks/index.ts
+++ b/src/webhooks/index.ts
@@ -1,65 +1,15 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
-import crypto = require("crypto");
-import compare = require("secure-compare");
import { apiVersion } from "../utils/versions";
import { WebhooksEvent } from "../model/domain/webhooks";
-import { ApiVersionMismatchError, RequestHeaders, SecretKeyCallback, SecretKeyNotAvailableError, UnmarshalCallback, ValidateCallback, WebhooksHelper } from "../model/webhooks";
-
-const webhooksContext = {
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- getSecretKey(_keyId: string, _cb: SecretKeyCallback): void {
- throw new Error("getSecretKey not initialized yet");
- }
-};
+import { ApiVersionMismatchError, RequestHeaders, SecretKeyNotAvailableError, UnmarshalCallback, ValidateCallback, WebhooksHelper } from "../model/webhooks";
+import signatureValidator = require("./validation");
const secretKeyStore: object = {};
-function getHeaderValue(requestHeaders: RequestHeaders, headerName: string): string {
- const lowerCaseHeaderName = headerName.toLowerCase();
- for (const name in requestHeaders) {
- if (name != null && lowerCaseHeaderName === name.toLowerCase()) {
- const value = requestHeaders[name];
- if (typeof value === "string") {
- return value;
- }
- if (typeof value === "undefined") {
- throw new Error("could not find header '" + headerName + "'");
- }
- throw new Error("found multiple values for header '" + headerName + "'");
- }
- }
- throw new Error("could not find header '" + headerName + "'");
-}
-
-function validateBody(body: string | Buffer, requestHeaders: RequestHeaders, cb: ValidateCallback): void {
- try {
- const signature = getHeaderValue(requestHeaders, "X-GCS-Signature");
- const keyId = getHeaderValue(requestHeaders, "X-GCS-KeyId");
-
- webhooksContext.getSecretKey(keyId, (error, secretKey) => {
- if (error) {
- cb(error);
- } else {
- const expectedSignature = crypto
- .createHmac("sha256", secretKey!) // if error is falsy, secretKey isn't
- .update(body)
- .digest("base64");
- if (compare(signature, expectedSignature)) {
- cb(null);
- } else {
- cb(new Error("failed to validate signature '" + signature + "'"));
- }
- }
- });
- } catch (e) {
- cb(e as Error);
- }
-}
-
function validate(body: string | Buffer, requestHeaders: RequestHeaders, cb: ValidateCallback): void {
try {
- validateBody(body, requestHeaders, cb);
+ signatureValidator.validate(body, requestHeaders, cb);
} catch (e) {
cb(e as Error);
}
@@ -89,11 +39,7 @@ function unmarshal(body: string | Buffer, requestHeaders: RequestHeaders, cb: Un
const webhooksHelper: WebhooksHelper = {
init: context => {
- if (!context || !context.getSecretKey || typeof context.getSecretKey !== "function") {
- throw new Error("no valid secret key store given");
- }
- webhooksContext.getSecretKey = context.getSecretKey;
-
+ signatureValidator.init(context);
return webhooksHelper;
},
diff --git a/src/webhooks/validation.ts b/src/webhooks/validation.ts
new file mode 100644
index 0000000..a89edf5
--- /dev/null
+++ b/src/webhooks/validation.ts
@@ -0,0 +1,64 @@
+import crypto = require("crypto");
+import compare = require("secure-compare");
+import { RequestHeaders, SecretKeyCallback, SecretKeyStore, SignatureValidator, ValidateCallback } from "../model/webhooks";
+
+let secretKeyStore: SecretKeyStore = {
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ getSecretKey(_keyId: string, _cb: SecretKeyCallback): void {
+ throw new Error("getSecretKey not initialized yet");
+ }
+};
+
+function getHeaderValue(requestHeaders: RequestHeaders, headerName: string): string {
+ const lowerCaseHeaderName = headerName.toLowerCase();
+ for (const name in requestHeaders) {
+ if (name != null && lowerCaseHeaderName === name.toLowerCase()) {
+ const value = requestHeaders[name];
+ if (typeof value === "string") {
+ return value;
+ }
+ if (typeof value === "undefined") {
+ throw new Error("could not find header '" + headerName + "'");
+ }
+ throw new Error("found multiple values for header '" + headerName + "'");
+ }
+ }
+ throw new Error("could not find header '" + headerName + "'");
+}
+
+function validate(body: string | Buffer, requestHeaders: RequestHeaders, cb: ValidateCallback): void {
+ try {
+ const signature = getHeaderValue(requestHeaders, "X-GCS-Signature");
+ const keyId = getHeaderValue(requestHeaders, "X-GCS-KeyId");
+
+ secretKeyStore.getSecretKey(keyId, (error, secretKey) => {
+ if (error) {
+ cb(error);
+ } else {
+ const expectedSignature = crypto
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ .createHmac("sha256", secretKey!) // if error is falsy, secretKey isn't
+ .update(body)
+ .digest("base64");
+ if (compare(signature, expectedSignature)) {
+ cb(null);
+ } else {
+ cb(new Error("failed to validate signature '" + signature + "'"));
+ }
+ }
+ });
+ } catch (e) {
+ cb(e as Error);
+ }
+}
+
+const validator: SignatureValidator = {
+ init: store => {
+ if (!store || typeof store.getSecretKey !== "function") {
+ throw new Error("no valid secret key store given");
+ }
+ secretKeyStore = store;
+ },
+ validate: validate
+};
+export = validator;