QuickBooks PHP DevKit connection errors -


i've been trying sync qb-web connector keep receiving errors:

the first was: 'fatal error: class 'quickbooks_loader' not found', fixed adding including file location @ top of page: include_once("$_server[document_root]/qb/quickbooks/loader.php");

now getting following error web-connector:

qbwc1012: authentication failed due following error message. client found response content type of 'text/html', expected 'text/xml'. request failed empty response. see qwclog more details. remember turn logging on.

i checked files sure content type text/xml, still no dice. please help.

<?php  /**  * example of generating quickbooks *.qwc files   *   * @author keith palmer <keith@consolibyte.com>  *   * @package quickbooks  * @subpackage documentation  */  // error reporting...  error_reporting(e_all | e_strict); ini_set('display_errors', 1);  /**  * require utilities class  */ require_once '../quickbooks.php';  $name = 'my quickbooks soap server';                // name server (make whatever want) $descrip = 'an example quickbooks soap server';     // description of server   $appurl = 'https://www.domain.com/qb/quickbooks/soap/server.php';       // *must* https:// (path quickbooks soap server) $appsupport = 'https://www.domain.com';         // *must* https:// , domain name must match domain name above  $username = '';     // username stored in 'quickbooks_user' table using quickbooks_utilities::createuser()  $fileid = '57f3b9b6-86f1-4fcc-b1ff-966de1813d20';       // make up, make sure keeps format $ownerid = '57f3b9b6-86f1-4fcc-b1ff-166de1813d20';      // make up, make sure keeps format  $qbtype = quickbooks_type_qbfs; // can leave as-is unless you're using quickbooks pos  $readonly = false; // no, want write data quickbooks  $run_every_n_seconds = 600; // run every 600 seconds (10 minutes)  // generate xml file $qwc = new quickbooks_webconnector_qwc($name, $descrip, $appurl, $appsupport, $username, $fileid, $ownerid, $qbtype, $readonly, $run_every_n_seconds); $xml = $qwc->generate();  // send file download header('content-type: text/xml'); header('content-disposition: attachment; filename="my-quickbooks-wc-file.qwc"'); print($xml); exit; 

the url you're using:

$appurl = 'https://www.domain.com/qb/quickbooks/soap/server.php'; 

is not right url.

if reference quick start guide you'll note has point web connector script:

docs/example_web_connector.php 

that script should in appurl. example script actual soap endpoint allow connections web connector. you've instead pointed web connector 1 of library files nothing on it's own, , shouldn't need touch or reference anywhere.

incidentally, reason you've had add include_once line - won't need if have web connector pointed right place.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -