Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gesa/bt-express-cookie-test
https://github.com/gesa/bt-express-cookie-test
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/gesa/bt-express-cookie-test
- Owner: gesa
- License: mit
- Created: 2020-07-02T09:06:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-03T05:38:46.000Z (almost 4 years ago)
- Last Synced: 2024-10-16T09:21:50.408Z (3 months ago)
- Language: JavaScript
- Size: 1.49 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Braintree Express Server
An example Braintree integration for Node in the Express framework.
## Setup Instructions
1. Install packages:
```sh
npm install
```2. Copy the contents of `example.env` into a new file named `.env` and fill in your Braintree API credentials. Credentials can be found by navigating to Account > My User > View Authorizations in the Braintree Control Panel. Full instructions can be [found on our support site](https://articles.braintreepayments.com/control-panel/important-gateway-credentials#api-credentials).
3. Start the server:
```sh
npm run dev
```
By default, this runs the app on port `3000`. You can configure the port by setting the environment variable `PORT`.## Testing Transactions
Sandbox transactions must be made with [sample credit card numbers](https://developers.braintreepayments.com/reference/general/testing/node#credit-card-numbers), and the response of a `Transaction.sale()` call is dependent on the [amount of the transaction](https://developers.braintreepayments.com/reference/general/testing/node#test-amounts).