3
votes

In my application, i want to use php to integrate QuickBooks by PHP. So From a web server(with PHP), I want to call QuickBooks Desktop version App to push data and retrieve data.

I am stuck here. I do not know where to start? Someone asked me to start with webconnector. I wonder like other webservices have a URL, we need to push the data to that url and they will do the rest. Is this the same? Or any other process I need to follw?

So Please please can any one there to help me out? I want to to know the full process and if any sample code available for the same in php.

Requirement: 1. My app is in Filemaker. 2. FIlemaker send the data to PHP file. 2. Then PHP file will send the data(in QBXML format) to Quickbooks Desktop Application.

Please help me

Thanks

3

3 Answers

4
votes

Here is a PHP QuickBooks Library which does exactly what you want to do.

You should follow the QuickBooks PHP Web Connector quick-start guide to get started. You'll want to architect your application so that your PHP script can receive the data, store it temporarily in a database (MySQL, etc.) and then the Web Connector can pick up the data destined for QuickBooks from there.

The Web Connector is a little different than a standard web service in that it works in a sort of backwards manner - the Web Connector will call out to your PHP web service vs. you calling out to it.

There's a overview of how the Web Connector works over here.

You should refer to this script (as the quick-start guide does above):

You'll end up writing functions to generate qbXML requests that look something like this:

<?php

/**
 * Example Web Connector application
 * 
 * This is a very simple application that allows someone to enter a customer 
 * name into a web form, and then adds the customer to QuickBooks.
 * 
 * @author Keith Palmer <[email protected]>
 * 
 * @package QuickBooks
 * @subpackage Documentation
 */

/**
 * Generate a qbXML response to add a particular customer to QuickBooks
 */
function _quickbooks_customer_add_request($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale)
{
        // Grab the data from our MySQL database
        $arr = mysql_fetch_assoc(mysql_query("SELECT * FROM my_customer_table WHERE id = " . (int) $ID));

        $xml = '<?xml version="1.0" encoding="utf-8"?>
                <?qbxml version="2.0"?>
                <QBXML>
                        <QBXMLMsgsRq onError="stopOnError">
                                <CustomerAddRq requestID="' . $requestID . '">
                                        <CustomerAdd>
                                                <Name>' . $arr['name'] . '</Name>
                                                <CompanyName>' . $arr['name'] . '</CompanyName>
                                                <FirstName>' . $arr['fname'] . '</FirstName>
                                                <LastName>' . $arr['lname'] . '</LastName>
                                        </CustomerAdd>
                                </CustomerAddRq>
                        </QBXMLMsgsRq>
                </QBXML>';

        return $xml;
}
1
votes

Check out this one - https://github.com/jewelhuq/quickbook-desktop-connection-php. Last checked on 2021. Tried to use consolibyte but it did not worked. So made a new library.

-1
votes


Intuit also has a PHP SDK for v3 of the QuickBooks API. https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits

regards Jarred