Skip to content

SDK em NodeJS integrada a API Gerencianet. Esta SDK está preparada para integração à API Pix e API Boletos da Gerencianet, que lhe permite realizar o gerenciamento de cobranças Pix com QR Code e Pix Copia e Cola, boleto/Bolix, carnê, cartão de crédito e muito mais.

License

Notifications You must be signed in to change notification settings

gerencianet/gn-api-sdk-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gn-api-sdk-node

A nodejs module for integration of your backend with the payment services provided by Gerencianet.

NPM

⚠️ This module is under development and is based on the new API that Gerencianet is about to release. It won't work in production by now.

Build Status Code Climate Test Coverage Dependency Status npm version

Installation

$ npm install gn-api-sdk-node

Basic usage

Require the module:

var Gerencianet = require('gn-api-sdk-node');

Set your credentials and whether you want to use sandbox or not:

var options = {
  client_id: 'your_client_id',
  client_secret: 'your_client_secret',
  sandbox: true
}

Instantiate the module passing your options:

var gerencianet = new Gerencianet(options);

Create a charge:

var chargeInput = {
  items: [{
    name: 'Product A',
    value: 1000,
    amount: 2
  }]
}

gerencianet
  .createCharge(chargeInput)
  .then(console.log)
  .catch(console.log)
  .done();

Examples

To run the examples, clone this repo and install the dependencies:

$ git clone git@github.com:franciscotfmc/gn-api-sdk-node.git
$ cd gn-api-sdk-node/docs/examples
$ npm install

Set your oauth keys in credentials.js:

module.exports = {
  client_id: 'your_client_id',
  client_secret: 'your_client_secret'
}

Then run the example you want:

$ node createCharge.js

Tests

To run the test suite, first install the dependencies, then run npm test:

$ cd gn-api-sdk-node/
$ npm install
$ npm test

Additional docs

Changelog

CHANGELOG

License

MIT

About

SDK em NodeJS integrada a API Gerencianet. Esta SDK está preparada para integração à API Pix e API Boletos da Gerencianet, que lhe permite realizar o gerenciamento de cobranças Pix com QR Code e Pix Copia e Cola, boleto/Bolix, carnê, cartão de crédito e muito mais.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published