h2io-braintree-server
v0.1.0
Published
Braintree server module used inside H2io modules
Downloads
1
Readme
H2io - Braintree server
Installation
npm install h2io-braintree-server
Usage
import Braintree from 'h2io-braintree-server';
const opts = {
environment: 'development',
merchantId: 'your_merchant_id',
publicKey: 'your_public_key',
privateKey: 'your_private_key'
};
const braintree = new Braintree(opts);
braintree.generateClientToken(cb);
const payOpts {
amount: 1.00,
payment_method_nonce: 'nonce-from-the-client',
};
braintree.pay(payOpts, cb);