summaryrefslogtreecommitdiff
path: root/billing/README.rdoc
blob: 357c02e92f6387f6c1384c0311a79f8d85bca3db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
= Billing

This project rocks and uses MIT-LICENSE.

To set up your own Braintree Sandbox, create an account at:
https://www.braintreepayments.com/get-started

Login.
In the top right, navigate to your username, and then 'My User' -> 'API Keys'

Click the button to generate a new API key, and then click the 'View' link to the right of the key.

There is a section to copy a snippet of code. Select 'Ruby' in the dropdown, and then the button to the right to copy this code to your clipboard.
Then, paste the contents of the clipboard into config/initializers/braintree.rb

You should not check the private key into version control.

Now, you should be able to add charges to your own Sandbox when you run the webapp locally.

You also will want to add a Plan to your Sandbox. Within the Braintree Sandbox, navigate to 'Recurring Billing' -> 'Plans'. From here, you can add a new Plan. The values of the test plan are not important, but the ID will be displayed, so should pick something descriptive. 

Here are credit cared numbers to try in the Sandbox:

https://www.braintreepayments.com/docs/ruby/reference/sandbox