Accepting payments with Recurly.js and Rails - a sample app
Ruby CSS JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app Make sure to close the Recurly account when the user close his account Nov 16, 2013
bin Add new Rails 4.0.0 app, as is Oct 20, 2013
config Make sure to close the Recurly account when the user close his account Nov 16, 2013
db
lib Add new Rails 4.0.0 app, as is Oct 20, 2013
log Add new Rails 4.0.0 app, as is Oct 20, 2013
public Add new Rails 4.0.0 app, as is Oct 20, 2013
spec Automatically generate recurly account code on create Oct 27, 2013
test Add new Rails 4.0.0 app, as is Oct 20, 2013
vendor/assets Save a little note Nov 16, 2013
.gitignore Add a sample Recurly settings file Nov 16, 2013
.rspec Save output of "rails generate rspec:install" Oct 20, 2013
.rvmrc Add .rvmrc with gemset Oct 20, 2013
.travis.yml Add a first Travis CI configuration Oct 20, 2013
Gemfile Add gon for JS variables passing Nov 16, 2013
Gemfile.lock Add gon for JS variables passing Nov 16, 2013
Guardfile Add guard-rspec Oct 20, 2013
LICENSE Initial commit Oct 17, 2013
README.md Mention Recurly.js v3 May 23, 2014
Rakefile Add new Rails 4.0.0 app, as is Oct 20, 2013
config.ru

README.md

This is a work-in-progress of a sample Rails app supporting recurring payments with Recurly.js.

Follow me on Twitter for updates: @thibaut_barrere

Important note

The current code relies on Recurly.js v2. It is still usable and will be for some time I believe, but you will prefer to adapt it to Recurly.js v3 directly to save some time.

Preliminary reading

Code status

The code is not meant to be high-quality, nice looking etc but rather, a quick getting started guide with minimal dependencies and scenarios.

Build Status Code Climate

  • As a user, I can sign-up for a monthly subscription of your great product
  • As a user, I can also close my account which will result in immediate termination
  • As a user, I want to be able to update my billing information
  • As a user, I want to list my past invoices

Setup

  • create a Recurly account (free as long as you do not enable a production payment gateway)
  • create a "freelancer" plan (do not configure a trial period - the app handles it to be able to show the correct price at sign-up)
  • you'll want to setup VAT etc if applicable in your settings
  • enable API access and JS API access
  • create config/settings.yml based on the sample
  • bundle install
  • rake db:schema:load
  • bin/rails s