Socket
Socket
Sign inDemoInstall

braintree-mongo

Package Overview
Dependencies
25
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    braintree-mongo

NPM Package that provides an abstraction layer for integrating an e-commerce site with Braintree, using MongoDB as its database


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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 on your machine
    • Created a database (usually at /data/)
    • Started the Mongo daemon
  • Created a (sandbox) account with Braintree and obtained your 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 to generate random values for tests instead of using the chance.js 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.

FAQs

Last updated on 11 Oct 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc