Reference implementation of Balanced for collecting and charging credit cards, and collecting and crediting bank accounts.
Uses jQuery, Less, Python (>= 2.7), SQLite, WTForms, and Bootstrap.
If you'd like to deploy signup for a Heroku account if you dont already have one and install [Toolbelt] (https://toolbelt.heroku.com/).
$ git clone https://github.com/balanced/rentmybikes.git
$ cd rentmybikes
$ mkvirtualenv rentmybike
$ pip install -r requirements.txt
Edit the following in rentmybike/settings/default.py
:
- Set
BALANCED_SECRET
to your secret key. Get one from [Balanced] (https://www.balancedpayments.com/marketplaces/start) if you dont have one. - Set
username
,password
andhost
ofDB_URI
for your database. - Set
MAIL_SERVER
,MAIL_USERNAME
,MAIL_PASSWORD
,MAIL_PORT
for your mail server.
Optionally:
- Set
DOMAIN_URI
to the domain where rentmybike will be deployed.
Here is an example:
DB_URI = 'postgresql://username:password@server/database'
BALANCED_SECRET = 'supersecret'
MAIL_DEBUG = True
MAIL_SERVER = 'smtp.mailgun.org'
MAIL_USERNAME = 'postmaster@mailgun.org'
MAIL_PASSWORD = 'supersecret'
MAIL_PORT = 587
DOMAIN_URI = 'http://myapp.herokuapp.com'
$ foreman start
or if you dont have [Toolbelt] (https://toolbelt.heroku.com/)
$ ./run.py
$ cd rentmybikes
$ heroku create
$ git push origin heroku
$ heroku ps:scale web=1
$ heroku open