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

@atlas.js/braintree

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlas.js/braintree

Braintree client as a component for @atlas.js

  • 2.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21
Maintainers
2
Weekly downloads
 
Created
Source

@atlas.js/braintree

Braintree client as a component for @atlas.js.

Installation

npm i @atlas.js/braintree

Usage

In addition to the Atlas.js Service, you can access all the objects and properties the standard braintree library exposes directly through this module, so you don't need to import the braintree library itself.

import * as braintree from '@atlas.js/braintree'
import { Atlas } from '@atlas.js/atlas'

const atlas = new Atlas({
  config: {
    services: {
      payments: {
        environment: braintree.Environment.Development,
        publicKey: 'your-public-key',
        privateKey: 'your-private-key',
        merchantId: 'your-merchant-id',
      }
    }
  }
})

atlas.service('payments', braintree.Service)
await atlas.start()

// The braintree service is now available here:
atlas.services.payments
// Example use
await atlas.services.payments.transaction.sale({
  amount: '5.00',
  paymentMethodNonce: 'nonce-from-the-client',
})

License

See the LICENSE file for information.

FAQs

Package last updated on 05 Apr 2019

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