Я пытался синхронизировать QB-Web Connector, но я все время получаю ошибки:QuickBooks PHP ошибки подключения DevKit
Первый: «Фатальная ошибка: Class„QuickBooks_Loader“не найден», который я установил, добавив в том числе расположение файла в верхней части страницы: include_once("$_SERVER[DOCUMENT_ROOT]/qb/QuickBooks/Loader.php");
Теперь я получаю следующее сообщение об ошибке на веб-разъема:
QBWC1012: Authentication failed due to following error message. Client found response content type of 'text/html', but expected 'text/xml'. The request failed with an empty response. See QWCLog for more details. Remember to turn logging on.
Я проверил все файлы, чтобы убедиться, что тип контента текст/xml, до сих пор нет кубиков. Пожалуйста помоги.
<?php
/**
* Example of generating QuickBooks *.QWC files
*
* @author Keith Palmer <[email protected]>
*
* @package QuickBooks
* @subpackage Documentation
*/
// Error reporting...
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
/**
* Require the utilities class
*/
require_once '../QuickBooks.php';
$name = 'My QuickBooks SOAP Server'; // A name for your server (make it whatever you want)
$descrip = 'An example QuickBooks SOAP Server'; // A description of your server
$appurl = 'https://www.domain.com/qb/QuickBooks/SOAP/Server.php'; // This *must* be httpS:// (path to your QuickBooks SOAP server)
$appsupport = 'https://www.domain.com'; // This *must* be httpS:// and the domain name must match the domain name above
$username = ''; // This is the username you stored in the 'quickbooks_user' table by using QuickBooks_Utilities::createUser()
$fileid = '57F3B9B6-86F1-4FCC-B1FF-966DE1813D20'; // Just make this up, but make sure it keeps that format
$ownerid = '57F3B9B6-86F1-4FCC-B1FF-166DE1813D20'; // Just make this up, but make sure it keeps that format
$qbtype = QUICKBOOKS_TYPE_QBFS; // You can leave this as-is unless you're using QuickBooks POS
$readonly = false; // No, we want to write data to QuickBooks
$run_every_n_seconds = 600; // Run every 600 seconds (10 minutes)
// Generate the XML file
$QWC = new QuickBooks_WebConnector_QWC($name, $descrip, $appurl, $appsupport, $username, $fileid, $ownerid, $qbtype, $readonly, $run_every_n_seconds);
$xml = $QWC->generate();
// Send as a file download
header('Content-type: text/xml');
header('Content-Disposition: attachment; filename="my-quickbooks-wc-file.qwc"');
print($xml);
exit;
Опубликуйте свой код. –
Какой файл вам поможет, Кейт? – user2675057
Какой файл, на который указывает веб-коннектор (через AppURL в файле .QWC). –