The JavaScript SDK helps you to communicate with the Ingenico Connect Client API. Its primary features are:
See the Ingenico ePayments Developer Hub for more information on how to use the SDK.
⚠ Please note that all examples have been moved to their own repository.
This repository consists out of one main component:
/src/This repository uses gulp to build. Assuming you have npm and gulp installed, building is straightforward:
dist folder.npm installnpm run builddist folder. This folder will contain the following files:/dist/index.js - The result of compiling the TypeScript source code to AMD modules, as a single file/dist/index.d.ts - TypeScript definitions for index.js/dist/connectsdk.js - The compiled TypeScript AMD modules plus bundled encryption components and support for loading directly in the browser/dist/connectsdk.min.js - The minified version of connectsdk.js/dist/connectsdk.noEncrypt.js - The compiled TypeScript AMD modules plus support for loading directly in the browser, but without the encryption components/dist/connectsdk.noEncrypt.min.js - The minified version of connectsdk.noEncrypt.jsFrom the folder where your package.json is located, run the following command to install the SDK:
npm i connect-sdk-client-jsInside the node_modules folder, the SDK will contain a dist folder that contains the files created by building the repository (see above). From these files, you should use dist/index.js if your module loader or module bundler supports AMD. Otherwise, use dist/connectsdk.js, dist/connectsdk.noEncrypt.js or their minified versions.
⚠ When using a module loader or module bundler that supports AMD, the SDK has a dependency on node-forge, even if encryption is not needed.
You need to provide a node-forge module if it is not yet available. This may return an empty object. For instance:
define('node-forge], [], function () {
return {};
});Or, to provide node-forge itself if it's only available as a global variable forge:
define('node-forge], [], function () {
return forge;
});