QuickBooks Integration Plugin
I get a lot of requests for help with Rails and QuickBooks integration. So I decided to create a plugin that can help any developer jumpstart an integration project.
This plugin provides a webservice controller as a starting point for learning and implementing Rails/QuickBooks integration via the QuickBooks Web Connector (QBWC).
If you are just learning about QuickBooks integration you need to read and understand the QBWC Programmers Guide.
What this plugin provides
On installation this plugin creates the following files:
The QbwcController includes a very simple example of querying QuickBooks and displaying a customer list.
To implement your own QuickBooks integration, implement the functions outlined in the QbwcController according to your integration needs.
1) Install actionwebservice gem (if it’s not already installed)
sudo gem install actionwebservice
2) Add a route for the qbwc controller to config/routes.rb
# example Quickbooks Web Connector api route map.quickbooks_api 'apis/quickbooks/api', :controller => 'qbwc', :action => 'api'
3) The QBWC will only communicate over SSL so make sure your app has a valid and trusted SSL cert installed. For testing the QBWC will speak to localhost over http.
$ ./script/plugin install http://svn.depixelate.com/plugins/quickbooks_integration
Upon installation, the template files will be copied over to your app.
If you want to copy over the template files again, use the following rake task:
$ rake quickbooks_integration:setup
Note: The rake task will not overwrite any existing files.
I develop on a Mac and run QuickBooks via Parallels Desktop for Mac. To setup an development environment using a Mac + Parallels do the following:
Open Windows instance in Parallels
Install the QBWC
Modify hosts file (c:\WINDOWS\system32\drivers\etc\hosts) to point localhost1 to Mac’s IP:
# replace IP address below with your Mac's IP address 192.168.0.3 localhost1
Open a QuickBooks company file (you can use one of the QuickBooks example company files)
Copy qbwc.qwc file to Windows instance and double-click to install apps configuration in the QBWC
Start up Rails app with ./script/server
Tail your log/development.log file to see communication cycle
Check box on QBWC next to app’s listing and click ‘Update selected’ button
Watch qbxml messages sent back and forth…
Getting up to speed on QuickBooks can be challenging. I would highly recommend posting questions to the excellent IDN forums if you get stuck.