https://github.com/d4nyll/braintree-mongo
NPM Package that provides an abstraction layer for integrating an e-commerce site with Braintree, using MongoDB as its database
https://github.com/d4nyll/braintree-mongo
braintree ecommerce mongo mongodb nodejs npm npm-module npm-package payment payment-gateway
Last synced: 4 months ago
JSON representation
NPM Package that provides an abstraction layer for integrating an e-commerce site with Braintree, using MongoDB as its database
- Host: GitHub
- URL: https://github.com/d4nyll/braintree-mongo
- Owner: d4nyll
- License: mit
- Created: 2017-07-16T22:46:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-06T10:26:14.000Z (over 1 year ago)
- Last Synced: 2025-09-23T23:38:26.061Z (8 months ago)
- Topics: braintree, ecommerce, mongo, mongodb, nodejs, npm, npm-module, npm-package, payment, payment-gateway
- Language: TypeScript
- Size: 669 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# braintree-mongo
This repository is a **work in progress**.
NPM Package that provides an abstraction layer for integrating an e-commerce site with Braintree, using MongoDB as its database.
## Requirements
You should have already:
* Set up MongoDB
* [Installed MongoDB](https://docs.mongodb.com/manual/installation/) on your machine
* Created a database (usually at `/data/`)
* Started the Mongo daemon
* Created a (sandbox) account with Braintree and obtained your [credentials](https://articles.braintreepayments.com/control-panel/important-gateway-credentials)
The package requires you to set the following environment variables:
* `MONGO_URL` - URL of your database and collection. E.g. `mongodb://localhost:27017/myproject`
* `BRAINTREE_MERCHANT_ID` - Braintree Merchant ID. E.g. `nbfthc5k9vjs6djb`
* `BRAINTREE_PUBLIC_KEY` - Braintree Public Key. E.g. `6th2gszftrfx7mg4`
* `BRAINTREE_PRIVATE_KEY` - Braintree Private Key. E.g. `ac54ecc54h3a0a8290adf72cb580bbc6`
* `MODE` - The current environment. Valid values are `test`, `dev`, `staging`, `production`
* `MONGO_DEV_URL` - URL of your development database and collection. E.g. `mongodb://localhost:27017/braintree`
* `MONGO_TEST_URL` - URL of your test database and collection. E.g. `mongodb://localhost:27017/test`
## TODOs
* Use [JSVerify](http://jsverify.github.io/) to generate random values for tests instead of using the [chance.js](https://github.com/chancejs/chancejs) library.
* Convert all uses of promises in tests to async/await. The only reason we are not currently doing that is because we couldn't get the async/await to work in the before/after hooks.