2.2.1 • Published 5 years ago

@atlas.js/braintree v2.2.1

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
5 years ago

@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.

2.2.1

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.1.0-alpha.7

5 years ago

2.1.0-alpha.6

5 years ago

2.1.0-alpha.5

5 years ago

2.1.0-alpha.4

5 years ago

2.1.0-alpha.3

5 years ago

2.1.0-alpha.2

5 years ago

2.1.0-alpha.1

5 years ago

2.1.0-alpha.0

5 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago