[UPDATED] Scheduled Transactions Demo App (Rails 4+)


(David Stancu) #1

Hello all!

I don’t post much around here, but @bpmilne suggested that having a small application to demo our new scheduled transactions endpoints would not be a bad idea – so I wrote one in my favorite web framework; Rails.

The Heroku deployment is left up to the user as it’s trivial for anyone mildly computer literate. I provide a tutorial in the GitHub readme – more can be learned by doing something yourself which is why it walks you through adding Heroku support to the app as opposed to just configuring it.

You can find the project here on GitHub.

Small Overview





Things to note

  • Edit config/initializers/dwollavars.rb to change the redirect parameter if you are using the non-standard Rails port or ngrok or a domain or whatnot
  • app/controllers/dashboard_controller.rb holds all of the application logic
  • All Dwolla API exceptions are handled gracefully if they are of type DwollaError

Technical jargon and things that generally make people sleepy

  • Did this from scratch, the user’s Name and oauth_token are stored in the default rails session hash.
  • The session is encrypted with the keys located in config/secrets.yml. Change these and keep them private if you plan on exposing this application.
  • There is no database; logon is handled by OAuth and the transactions are fetched from the API during every page load.

Deployment

  • The Heroku related setup + gem install is left as an exercise for the reader

Thank you all for your time!


New Scheduled/Recurring Payments API!
New Scheduled/Recurring Payments API!
New Scheduled/Recurring Payments API!
(Cory Anderson) #2

(Cory Anderson) #3

(Cory Anderson) #4