muhaimincs / chip-nodejs-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chip NodeJS library

Prerequisite

Before you start, make sure you already have created Brand ID and API Key from your developer dashboard by logging-in into merchant portal.

Installation

npm

npm install https://github.com/CHIPAsia/chip-nodejs-sdk.git#v1.0.0

yarn

yarn add https://github.com/CHIPAsia/chip-nodejs-sdk.git#v1.0.0

Getting Started

Simple usage looks like:

var PublicRestApi = require('Chip').default;

PublicRestApi.ApiClient.instance.basePath = "https://gate.chip-in.asia/api/v1/";
PublicRestApi.ApiClient.instance.token = "TOKEN"

let apiInstance = new PublicRestApi.PaymentApi();
let brandId = "BRAND_ID";
let callback = (error, data, response) => {
  if (error) {
    console.log('API call failed. Error:');
    console.error(error);
  } else {
    console.log('API called successfully. Returned data:');
    console.log(data);
  }
}

apiInstance.paymentMethods(brandId, "EUR", {}, callback);

Testing

npm run test

Example

Check our examples here.

About


Languages

Language:JavaScript 100.0%