A simple Heroku-ready Sinatra-based app to collect donations via Stripe. This app forces an SSL connection outside of the Development environment.
- Set
ENV['STRIPE_PUBLISHABLE_KEY']
to your Stripe account's Publishable Key - Set
ENV['STRIPE_SECRET_KEY']
to your Stripe account's Secret Key - Edit lines 10 through 23 in
app.rb
- Follow the steps here to get your MailChimp embed form. You should use the 'Naked' version of MailChimp's form.
- Paste that code into the
views/mailchimp.erb
file.
- Run
bundle install
to install the required gems - Set
ENV['STRIPE_PUBLISHABLE_KEY']
to your Stripe account's Test Publishable Key or temporarily swapENV['STRIPE_PUBLISHABLE_KEY']
inapp.rb
with"your_test_publishable_key"
- Set
ENV['STRIPE_SECRET_KEY']
to your Stripe account's Test Secret Key or temporarily swapENV['STRIPE_SECRET_KEY']
inapp.rb
with"your_test_secret_key"
- Run
rackup
to run the server - Go to http://127.0.0.1:9292 to use the site
heroku create
heroku config:set STRIPE_PUBLISHABLE_KEY=something STRIPE_SECRET_KEY=something
git push heroku master