Skip to content

Commit 86e5947

Browse files
committed
Update README.md with usage information
1 parent cefaf1a commit 86e5947

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,29 @@
11
# braintree_php_example
22
An example Braintree integration for PHP.
3+
4+
## Setup Instructions
5+
6+
1. Install composer. You can find instructions on how to install composer [on composer's site](https://getcomposer.org/download/).
7+
8+
2. Run composer
9+
`php composer.phar install`
10+
11+
Or if you installed composer globally:
12+
`composer install`
13+
14+
3. Copy the `example.env` file to `.env` and fill in your Braintree API credentials. Credentials can be found by navigating to Account > My user > View API Keys 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).
15+
16+
4. Start the internal PHP server on port 3000
17+
`php -S localhost:3000`
18+
19+
## Running Tests
20+
21+
All tests are integration tests. Integration tests make api calls to Braintree and require that you set up your Braintree credentials. You can run this project's integration tests by adding your sandbox api credentials to `.env` and running `./vendor/bin/phpunit --testsuite integration` on the command line.
22+
23+
## Pro Tips
24+
25+
* Run `php -S 0.0.0.0:3000` when launching the internal PHP server to listen on all interfaces on port 3000.
26+
27+
## Disclaimer
28+
29+
This code is provided as is and is only intended to be used for illustration purposes. This code is not production-ready and is not meant to be used in a production environment. This repository is to be used as a tool to help merchants learn how to integrate with Braintree. Any use of this repository or any of its code in a production environment is highly discouraged.

0 commit comments

Comments
 (0)