Go back to the main page

Connect Rails and QuickBooks Online via Sandbox

This article is over 2 years old. Proceed with caution.

Regards ♨ – Minimul

 

 


A better way: Sandboxes

In my series on wiring up Rails and QBO you needed to have a real QBO account to test against. Intuit was good about giving free trial accounts but that process has been eliminated with regards to U.S. based QuickBooks Online. In its place is the much more proper concept of a sandbox. In this screencast, I will upgrade the "Minimulcasts" app to use a sandbox, therefore, see this as an amendment to part 1 of the original series.

tl;dw

  1. To create a sandbox, go to https://developer.intuit.com and sign in. At the bottom of the page, click on the link for setting up a sandbox.
  2. Upgrade Rails and the Quickbooks-Ruby Gem
  3.   
    # previous : gem 'rails', '4.0.2'
    gem 'rails', '4.1.6'
     
    # previous : gem 'quickbooks-ruby', git: 'git://github.com/ruckus/quickbooks-ruby.git'
    gem 'quickbooks-ruby', github: 'ruckus/quickbooks-ruby'
    
  4. Bundle update Rails and Quickbooks-Ruby Gem
  5. $ bundle update rails
      $ bundle update quickbooks-ruby
    
  6. Enable Sandbox mode in config/initializers/quickbooks.rb and use shell variables.
  7. 
    # previous : QB_KEY = ""
    # previous : QB_SECRET = ""
    QB_KEY = ENV['MINIMULCASTS_CONSUMER_KEY']
    QB_SECRET = ENV['MINIMULCASTS_CONSUMER_SECRET']
    
    # add to the end of file
    Quickbooks.sandbox_mode = true
      
    
  8. Restart pow
  9. $ touch tmp/restart.txt
    
  10. Go to http://minimulcasts.dev
  11. Click on the "Connect to Intuit button" and authorize your sandbox for usage.
  12. To test, make a new vendor. Don't update an existing vendor as that will not work because it doesn't exist in this new sandbox.
  13. Vendor should show up in your sandbox. (make sure you refresh the Vendor's link on the left side).
  • Remember the check the screencast for more details as well as the repo.

Comment on this article?

New! Get the book!

Get Ruby flavored QuickBooks related articles delivered to your Mailbox.

Your email is safe with me and you can unsubscribe at any time.

 

Do you have an idea for a QuickBooks integrated app? Wanna put it on the Intuit App Store, which receives hundreds of thousands of daily visitors? I can get your idea on the App store for a fixed price that I will stand behind and not go over budget by a single penny.