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

Commit

Permalink
Release 4.1.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
IngenicoEPayments committed Mar 21, 2023
1 parent 4815d17 commit 8e33d5e
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "connect-sdk-client-js",
"version": "4.0.4",
"version": "4.1.0",
"description": "The JavaScript based client SDK that can be used for client to server communication between you and the Ingenico ePayments platform",
"homepage": "https://github.com/Ingenico-ePayments/connect-sdk-client-js#readme",
"bugs": {
Expand Down
15 changes: 15 additions & 0 deletions src/AuthenticationIndicator.ts
@@ -0,0 +1,15 @@
///<amd-module name="connectsdk.AuthenticationIndicator"/>

import { AuthenticationIndicatorJSON } from "./apimodel";

class AuthenticationIndicator {
readonly name: string;
readonly value: string;

constructor(readonly json: AuthenticationIndicatorJSON) {
this.name = json.name;
this.value = json.value;
}
}

export = AuthenticationIndicator;
15 changes: 14 additions & 1 deletion src/BasicPaymentProduct.ts
@@ -1,6 +1,7 @@
///<amd-module name="connectsdk.BasicPaymentProduct"/>

import AccountOnFile = require("./AccountOnFile");
import AuthenticationIndicator = require("./AuthenticationIndicator");
import PaymentProduct302SpecificData = require("./PaymentProduct302SpecificData");
import PaymentProduct320SpecificData = require("./PaymentProduct320SpecificData");
import PaymentProduct863SpecificData = require("./PaymentProduct863SpecificData");
Expand All @@ -24,18 +25,23 @@ class BasicPaymentProduct {
readonly allowsTokenization: boolean;
readonly autoTokenized: boolean;
readonly allowsInstallments: boolean;
readonly authenticationIndicator?: AuthenticationIndicator;
readonly acquirerCountry?: string;
readonly canBeIframed?: boolean;
readonly deviceFingerprintEnabled: boolean;
readonly displayHints: PaymentProductDisplayHints;
readonly id: number;
readonly isJavaScriptRequired?: boolean;
readonly maxAmount?: number;
readonly minAmount?: number;
readonly paymentMethod: string;
readonly mobileIntegrationLevel: string;
readonly usesRedirectionTo3rdParty: boolean;
readonly paymentProductGroup?: string;
readonly paymentProduct302SpecificData?: PaymentProduct302SpecificData;
readonly paymentProduct320SpecificData?: PaymentProduct320SpecificData;
readonly paymentProduct863SpecificData?: PaymentProduct863SpecificData;
readonly paymentProductGroup?: string;
readonly supportsMandates?: boolean;
readonly type = "product";

constructor(readonly json: BasicPaymentProductJSON) {
Expand All @@ -47,15 +53,22 @@ class BasicPaymentProduct {
this.autoTokenized = json.autoTokenized;
this.allowsInstallments = json.allowsInstallments;
this.acquirerCountry = json.acquirerCountry;
this.canBeIframed = json.canBeIframed;
this.deviceFingerprintEnabled = json.deviceFingerprintEnabled;
this.displayHints = new PaymentProductDisplayHints(json.displayHints);
this.id = json.id;
this.isJavaScriptRequired = json.isJavaScriptRequired;
this.maxAmount = json.maxAmount;
this.minAmount = json.minAmount;
this.paymentMethod = json.paymentMethod;
this.mobileIntegrationLevel = json.mobileIntegrationLevel;
this.usesRedirectionTo3rdParty = json.usesRedirectionTo3rdParty;
this.paymentProductGroup = json.paymentProductGroup;
this.supportsMandates = json.supportsMandates;

if (json.authenticationIndicator) {
this.authenticationIndicator = new AuthenticationIndicator(json.authenticationIndicator);
}
if (json.paymentProduct302SpecificData) {
this.paymentProduct302SpecificData = new PaymentProduct302SpecificData(json.paymentProduct302SpecificData);
}
Expand Down
2 changes: 2 additions & 0 deletions src/PaymentProduct.ts
Expand Up @@ -17,11 +17,13 @@ function _parseJSON(_json: PaymentProductJSON, _paymentProductFields: PaymentPro
class PaymentProduct extends BasicPaymentProduct {
readonly paymentProductFields: PaymentProductField[];
readonly paymentProductFieldById: { [id: string]: PaymentProductField | undefined };
readonly fieldsWarning?: string;

constructor(readonly json: PaymentProductJSON) {
super(json);
this.paymentProductFields = [];
this.paymentProductFieldById = {};
this.fieldsWarning = json.fieldsWarning;

_parseJSON(json, this.paymentProductFields, this.paymentProductFieldById);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Util.ts
Expand Up @@ -15,7 +15,7 @@ function createInstance(): Util {
return {
screenSize: window.innerWidth + "x" + window.innerHeight,
platformIdentifier: window.navigator.userAgent,
sdkIdentifier: (document["GC"] && document["GC"].rppEnabledPage ? "rpp-" : "") + "JavaScriptClientSDK/v4.0.4",
sdkIdentifier: (document["GC"] && document["GC"].rppEnabledPage ? "rpp-" : "") + "JavaScriptClientSDK/v4.1.0",
sdkCreator: "Ingenico",
};
},
Expand Down
1 change: 1 addition & 0 deletions src/apimodel.ts
Expand Up @@ -45,6 +45,7 @@ export interface BasicPaymentProductJSON {
paymentProduct320SpecificData?: PaymentProduct320SpecificDataJSON;
paymentProduct863SpecificData?: PaymentProduct863SpecificDataJSON;
paymentProductGroup?: string;
supportsMandates?: boolean;
usesRedirectionTo3rdParty: boolean;
// added by the SDK
type?: "product";
Expand Down

0 comments on commit 8e33d5e

Please sign in to comment.