All Projects → braintree → Braintree_node

braintree / Braintree_node

Licence: mit
Braintree Node.js library

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Braintree node

Braintree php
Braintree PHP library
Stars: ✭ 491 (+81.18%)
Mutual labels:  payments, braintree
Braintree ruby
Braintree Ruby library
Stars: ✭ 407 (+50.18%)
Mutual labels:  payments, braintree
Braintree android
Braintree SDK for Android
Stars: ✭ 343 (+26.57%)
Mutual labels:  payments, braintree
Braintree java
Braintree Java library
Stars: ✭ 129 (-52.4%)
Mutual labels:  payments, braintree
Braintree Android Drop In
Braintree Drop-In SDK for Android
Stars: ✭ 78 (-71.22%)
Mutual labels:  payments, braintree
Django Payments
Universal payment handling for Django.
Stars: ✭ 575 (+112.18%)
Mutual labels:  payments, braintree
Braintree Web
A suite of tools for integrating Braintree in the browser
Stars: ✭ 357 (+31.73%)
Mutual labels:  payments, braintree
Nestjs Braintree
A module for braintree reoccurring payments and transactions 💳
Stars: ✭ 62 (-77.12%)
Mutual labels:  payments, braintree
Braintree dotnet
Braintree .NET library
Stars: ✭ 109 (-59.78%)
Mutual labels:  payments, braintree
Braintree python
Braintree Python library
Stars: ✭ 217 (-19.93%)
Mutual labels:  payments, braintree
mangopay2-java-sdk
Java SDK for MANGOPAY
Stars: ✭ 23 (-91.51%)
Mutual labels:  payments
mpesa-rest-api
mpesa rest api converts the mpesa api to a RESTful API that is easy for developers to use instead of the current SOAP web service provided by mpesa.
Stars: ✭ 24 (-91.14%)
Mutual labels:  payments
cybersource-android-sdk
The CyberSource InApp SDK enables developers to simply and securely incorporate mobile payments into their Android applications.
Stars: ✭ 25 (-90.77%)
Mutual labels:  payments
PaystackJS-Sample-code
Bare Paystack JS implementation. Style pay.html as required
Stars: ✭ 15 (-94.46%)
Mutual labels:  payments
OpenBook-E-Commerce
An e-commerce progressive web application, built with mern stack. It has features like product buy, order management by admin, payment gateway, cart, checkout and lot more.
Stars: ✭ 53 (-80.44%)
Mutual labels:  braintree
awesome-pix
Awesome PIX
Stars: ✭ 127 (-53.14%)
Mutual labels:  payments
Product-Site-101
Simple product site - demo for a talk
Stars: ✭ 33 (-87.82%)
Mutual labels:  payments
mangopay2-python-sdk
SDK Python for MANGOPAY
Stars: ✭ 31 (-88.56%)
Mutual labels:  payments
graphql-api
Schemas, changelogs and feature requests for Braintree's GraphQL API
Stars: ✭ 39 (-85.61%)
Mutual labels:  braintree
Silver
Automated billing and payments for Django with a REST API
Stars: ✭ 265 (-2.21%)
Mutual labels:  payments

Braintree Node library

The Braintree Node library provides integration access to the Braintree Gateway.

Please Note

The Payment Card Industry (PCI) Council has mandated that early versions of TLS be retired from service. All organizations that handle credit card information are required to comply with this standard. As part of this obligation, Braintree is updating its services to require TLS 1.2 for all HTTPS connections. Braintree will also require HTTP/1.1 for all connections. Please see our technical documentation for more information.

Installation

  • npm install braintree
  • var braintree = require('braintree')

Dependencies

  • node >= 10

Versions

Braintree employs a deprecation policy for our SDKs. For more information on the statuses of an SDK check our developer docs.

Major version number Status Released Deprecated Unsupported
3.x.x Active September 2020 TBA TBA
2.x.x Inactive February 2017 September 2022 September 2023
1.x.x Unsupported February 2012 February 2017 February 2017

Links

Updating from an Inactive, Deprecated, or Unsupported version of this SDK? Check our Migration Guide for tips.

Quick Start

var braintree = require('braintree');

var gateway = new braintree.BraintreeGateway({
  environment: braintree.Environment.Sandbox,
  merchantId: 'your_merchant_id',
  publicKey: 'your_public_key',
  privateKey: 'your_private_key'
});

gateway.transaction.sale({
  amount: '5.00',
  paymentMethodNonce: 'nonce-from-the-client',
  options: {
    submitForSettlement: true
  }
}, function (err, result) {
  if (err) {
    console.error(err);
    return;
  }

  if (result.success) {
    console.log('Transaction ID: ' + result.transaction.id);
  } else {
    console.error(result.message);
  }
});

Promises

You can also use Promises instead of callbacks.

var braintree = require('braintree');

var gateway = new braintree.BraintreeGateway({
  environment: braintree.Environment.Sandbox,
  merchantId: 'your_merchant_id',
  publicKey: 'your_public_key',
  privateKey: 'your_private_key'
});

gateway.transaction.sale({
  amount: '5.00',
  paymentMethodNonce: 'nonce-from-the-client',
  options: {
    submitForSettlement: true
  }
}).then(function (result) {
  if (result.success) {
    console.log('Transaction ID: ' + result.transaction.id);
  } else {
    console.error(result.message);
  }
}).catch(function (err) {
  console.error(err);
});

Almost all methods that uses a callback can alternatively use a Promise. The only exceptions are gateway.merchantAccount.all or any of the search methods because they return a stream if no callback is provided.

Documentation

Developing (Docker)

The Makefile and Dockerfile will build an image containing the dependencies and drop you to a terminal where you can run tests.

make

Tests

The unit specs can be run by anyone on any system, but the integration specs are meant to be run against a local development server of our gateway code. These integration specs are not meant for public consumption and will likely fail if run on your system. To run unit tests use rake (rake test:unit) or npm (npm test).

License

See the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].