Brian Leach Brian Leach - 1 year ago 100
PHP Question

Writing a working sample PHP app for Quickbooks Online

I'm getting started writing an app using the PHP SDK. I'm trying to start off with a simple page that connects to my data and lists customers.

I'm using code from one of the examples in the _samples folder. So far, it seems to get the Realm ID, creates a new OAuthRequestValidator, ServiceContext, and DataService, all without errors.

The call to Findall to get customers isn't coming back -- I'm assuming it has an exception.

My questions: is the approach I'm taking (a minimal example script which connects and queries) skipping some essential steps? Is the problem that I'm not putting the "Connect to QuickBooks" button up and going through that process?

Finally, is there a sample PHP app that I can start with (after changing the keys and tokens)?



Answer Source

We have an open-source PHP DevKit that is popular and has lots of examples in it (including what you're asking for).

You can find the code on GitHub:

If you follow the quick-start guide (which basically involves swapping out some URLs and tokens) you'll end up with a working mini-app that has a working "Connect to QuickBooks" button, Blue Dot menu, disconnect script, and a big pile of example data exchange scripts for adding/querying/updating customers, invoices, etc.

Quick start guide:

Lots and lots of example code:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download