This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

api-library
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Adyen Node.js API Library

Build Status Coverage Status

The Adyen API Library for NodeJS enables you to work with Adyen APIs and Hosted Payment Pages.

Integration

The Library supports all APIs under the following services:

  • checkout
  • checkout utility
  • payments
  • modifications
  • payouts
  • recurring
  • notifications
  • BIN lookup

Requirements

  • Node 8.1.1 or higher

Installation

You can use NPM to add our library to your project

NPM

npm install --save @adyen/api-library

Documentation

HTTP Client Configuration

By default, NodeJS https will be used to submit requests to the API. But you can change that by injecting your own HttpClient on your client instance. In the example below, we use axios:

const {Client, Config} = require('@adyen/api-library');
const axios = require("axios");
...
const config = new Config();
const client = new Client({
  config,
  httpClient: {
    async request(endpoint, json, config, isApiKeyRequired, requestOptions) {
        const response = await axios({
            method: 'POST',
            url: endpoint,
            data: JSON.parse(json),
            headers: {
                "X-API-Key": config.apiKey,
                "Content-type": "application/json"
            },
        });
 
        return response.data;
    }
  }
});
...

Proxy configuration

You can configure a proxy connection by injecting your own HttpURLConnectionClient on your client instance and changing the proxy setter value.

Example:

const {HttpURLConnectionClient, Client, Config} = require('adyen-node-api-library');
...
const config = new Config();
const client = new Client({ config });
const httpClient = new HttpURLConnectionClient();
httpClient.proxy = { host: "http://google.com", port: 8888,  };
 
client.setEnvironment('TEST');
client.httpClient = httpClient;
...

Support

If you have any problems, questions or suggestions, create an issue here or send your inquiry to support@adyen.com.

Licence

MIT license. For more information, see the LICENSE file.

Other

You can find examples inside the examples folder in this repo.

Readme

Keywords

Package Sidebar

Install

npm i api-library

Weekly Downloads

29

Version

1.0.0

License

MIT

Unpacked Size

3.26 MB

Total Files

1110

Last publish

Collaborators

  • rikterbeek