// Let's get some general information about this connection to QBOE: print 'Our connection ticket is: ' . $API->connectionTicket() . "\n"; print 'Our session ticket is: ' . $API->sessionTicket() . "\n"; print 'Our application id is: ' . $API->applicationID() . "\n"; print 'Our application login is: ' . $API->applicationLogin() . "\n"; print "\n"; print 'Last error number: ' . $API->errorNumber() . "\n"; print 'Last error message: ' . $API->errorMessage() . "\n"; print "\n"; // The "raw" approach to accessing QuickBooks Online Edition is to build and // parse the qbXML requests/responses send to/from QuickBooks yourself. Here // is an example of querying for a customer by building a raw qbXML request. // The qbXML response is passed back to you in the _raw_qbxml_callback() // function as the $qbxml parameter. $return = $API->qbxml(' <CustomerQueryRq> <FullName>Keith Palmer Jr.</FullName> </CustomerQueryRq>', '_raw_qbxml_callback'); // This function gets called when QuickBooks Online Edition sends a response back function _raw_qbxml_callback($method, $action, $ID, &$err, $qbxml, $Iterator, $qbres) { print 'We got back this qbXML from QuickBooks Online Edition: ' . $qbxml; } // For QuickBooks Online Edition, you can use real-time connections so that you // get return values instead of having to write callback functions. Note that // if you do this, you make your code less portable to other editions of // QuickBooks that do not support real-time connections (i.e. QuickBooks // desktop editions via the Web Connector) if ($API->usingRealtime()) { print 'Our real-time response from QuickBooks Online Edition was: '; print_r($return); }