Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
/ pagarme Public archive

A simple NodeJS wrapper for the Pagar.me API

Notifications You must be signed in to change notification settings

cubos/pagarme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pagar.me API for NodeJS

This is a very early stage of development, very few is supported and API will likely change.

This package uses promises and is targeted at ES6. It includes TypeScript definitions.

##Example:

const pagarme = new PagarMe("api_key", "encryption_key");

const card_data = {
    card_number: "4901720080344448",
    card_holder_name: "Usuario de Teste",
    card_expiration_date: "1219",
    card_cvv: "314"
};

// Encrypt the card data so that it is never sent over the network in plain
const card_hash = await pagarme.cardHash(card_data);

const inserted_card = await pagarme.cards.insert(card_hash);
const retrieved_card = await pagarme.card(inserted_card.id);

// inserted_card == retrieved_card

About

A simple NodeJS wrapper for the Pagar.me API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published