Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gn-api-sdk-node

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gn-api-sdk-node

Module for integration with Gerencianet API

  • 0.0.16
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.3K
increased by2.18%
Maintainers
1
Weekly downloads
 
Created
Source

gn-api-sdk-node

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

NPM

:warning: Gerencianet API is under BETA version, meaning that it's not available for all users right now. If you're interested, you can always send an email to suportetecnico@gerencianet.com.br and we'll enable it for your account

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:gerencianet/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 documentation

Charges

Carnets

Subscriptions

Marketplace

Notifications

Payments

All in one

Changelog

CHANGELOG

License

MIT

Keywords

FAQs

Package last updated on 15 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc