This SDK has been rebranded to Worldline. As part of the rebranding the SDK has moved to https://github.com/Worldline-Global-Collect/connect-sdk-nodejs.
The Node.js SDK helps you to communicate with the Ingenico Connect Server API. Its primary features are:
- convenient JavaScript wrapper around the API calls,
- authentication of all calls
- logging support by proxying log calls to a custom user defined logger instance
- validation of input and
- a logfile obfuscater
See the Ingenico ePayments Developer Hub for more information on how to use the API.
This repository consists out of three main components:
- The source code of the SDK itself:
/src - The JSON schemas used to validate requests:
/schemas - Unit and integration tests:
/__tests__
Node.js 8 or higher is required.
From the folder where your package.json is located, run the following command to install the SDK:
npm i connect-sdk-nodejs
From the root of the project install all dependencies, then compile the code:
npm install
npm run build
There are two types of tests:
-
Unit tests. These will work out-of-the-box.
Run these tests as follows:npm run test:unit -
Integration tests. Before you can run these, you first need to copy file
__tests__/config.json.distto__tests__/config.jsonand replace all values as needed. If needed, aproxyproperty can be added with nested propertieshost,scheme(defaults tohttp),port(defaults to 3128) andcredentials(optional, in the format<username>:<password>).
Run these tests as follows:npm run test:integration
You can also run both types of tests together as follows:
npm run test