QuickBooks Web 连接器应用程序未将客户添加到 QuickBooks Desktop Premier Edition [英] QuickBooks Web Connector Application not adding customers to QuickBooks Desktop Premier Edition

查看:60
本文介绍了QuickBooks Web 连接器应用程序未将客户添加到 QuickBooks Desktop Premier Edition的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设置一个基本的 SOAP 服务以将虚拟客户添加到 QuickBooks.当我将 QWC 文件加载到 Web 连接器时,它会运行并显示不需要数据交换的消息,然后它不会向 QuickBooks 桌面应用程序添加任何记录.

Am setting up a basic SOAP service to add dummy customers into QuickBooks. When I load the QWC file to the web connector, it runs and gives a message that No Data Exchange required and then it doesn't add any records to the QuickBooks Desktop Application.

这是我的 SOAP 服务器:

This is my SOAP Server:

<?php

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);

if (function_exists('date_default_timezone_set'))
{
    date_default_timezone_set('Africa/Nairobi');
}

require_once '../../QuickBooks.php';

$user = 'mutie';
$pass = 'mutie';

// Map QuickBooks actions to handler functions
$map = array(
    QUICKBOOKS_ADD_CUSTOMER => array( '_quickbooks_customer_add_request'),
    );


$log_level = QUICKBOOKS_LOG_DEVELOP;

$soapserver = QUICKBOOKS_SOAPSERVER_BUILTIN;

$handler_options = array(
    'deny_concurrent_logins' => false, 
    'deny_reallyfast_logins' => false, 
    );  


$dsn = 'mysqli://mutie:mutie@localhost/quickbooksserver'

if (!QuickBooks_Utilities::initialized($dsn))
{   
    QuickBooks_Utilities::initialize($dsn);

    QuickBooks_Utilities::createUser($dsn, $user, $pass);   

    $primary_key_of_your_customer = 5;

    $Queue = new QuickBooks_WebConnector_Queue($dsn);
    $Queue->enqueue(QUICKBOOKS_ADD_CUSTOMER, $primary_key_of_your_customer);

    $Server = new QuickBooks_WebConnector_Server($dsn, $map, $errmap, $hooks, $log_level, $soapserver, QUICKBOOKS_WSDL, $soap_options, $handler_options, $driver_options, $callback_options);
    $response = $Server->handle(true, true);

function _quickbooks_customer_add_request($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale)
{        
    $xml = '<?xml version="1.0" encoding="utf-8"?>
        <?qbxml version="2.0"?>
        <QBXML>
            <QBXMLMsgsRq onError="stopOnError">
                <CustomerAddRq requestID="' . $requestID . '">
                    <CustomerAdd>
                        <Name>CCC, LLC (' . mt_rand() . ')</Name>
                        <CompanyName>CCC, LLC</CompanyName>
                        <FirstName>XXX</FirstName>
                        <LastName>XXX</LastName>
                        <BillAddress>
                            <Addr1>CCC, LLC</Addr1>
                            <Addr2>134 Stonemill Road</Addr2>
                            <City>Mansfield</City>
                            <State>CT</State>
                            <PostalCode>06268</PostalCode>
                            <Country>Kenya</Country>
                        </BillAddress>
                        <Phone>860-634-1602</Phone>
                        <AltPhone>860-429-0021</AltPhone>
                        <Fax>860-429-5183</Fax>
                        <Email>myemail@myemail.com</Email>
                        <Contact>XXX XXX</Contact>
                    </CustomerAdd>
                </CustomerAddRq>
            </QBXMLMsgsRq>
        </QBXML>';

    return $xml;
}

这是我的 QWC 文件:

This is my QWC File:

<?xml version="1.0"?>
<QBWCXML>
    <AppName>My QuickBooks SOAP Server</AppName>
    <AppID></AppID>
    <AppURL>http://localhost/quickbooks/docs/web_connector/web_connector.php</AppURL>
    <AppDescription>An example QuickBooks SOAP Server</AppDescription>
    <AppSupport>http://localhost/quickbooks/docs/help.php</AppSupport>
    <UserName>mutie</UserName>
    <OwnerID>{57F3B9B6-86F1-4FCC-B1FF-166DE1813D20}</OwnerID>
    <FileID>{57F3B9B6-86F1-4FCC-B1FF-966DE1813D20}</FileID>
    <QBType>QBFS</QBType>
    <Notify>false</Notify>
    <Scheduler>
        <RunEveryNMinutes>10</RunEveryNMinutes>
    </Scheduler>
    <IsReadOnly>false</IsReadOnly>
</QBWCXML>

这是我得到的日志:

20170118.14:58:18 UTC   : QBWebConnector.WebServiceManager.DoUpdateSelected() : updateWS() for application = 'My QuickBooks SOAP Server' has STARTED
20170118.14:58:18 UTC   : QBWebConnector.RegistryManager.getUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock = FALSE
20170118.14:58:18 UTC   : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to True
20170118.14:58:18 UTC   : QBWebConnector.RegistryManager.setUpdateLock() : ********************* Update session locked *********************
20170118.14:58:18 UTC   : QBWebConnector.SOAPWebService.instantiateWebService() : Initiated connection to the following application.
20170118.14:58:18 UTC   : QBWebConnector.SOAPWebService.instantiateWebService() : AppName: My QuickBooks SOAP Server
20170118.14:58:18 UTC   : QBWebConnector.SOAPWebService.instantiateWebService() : AppUniqueName (if available): My QuickBooks SOAP Server
20170118.14:58:18 UTC   : QBWebConnector.SOAPWebService.instantiateWebService() : AppURL: http://localhost/quickbooks/docs/web_connector/web_connector.php
20170118.14:58:18 UTC   : QBWebConnector.SOAPWebService.do_serverVersion() : *** Calling serverVersion().
20170118.14:58:19 UTC   : QBWebConnector.SOAPWebService.do_serverVersion() : Received from serverVersion() following parameter:<serverVersionRet="PHP QuickBooks SOAP Server v3.0 at /quickbooks/docs/web_connector/web_connector.php">
20170118.14:58:19 UTC   : QBWebConnector.SOAPWebService.do_clientVersion() : *** Calling clientVersion() with following parameter:<productVersion="2.2.0.71">
20170118.14:58:19 UTC   : QBWebConnector.SOAPWebService.do_clientVersion() : Received from clientVersion() following parameter:<clientVersionRet="">
20170118.14:58:19 UTC   : QBWebConnector.SOAPWebService.do_clientVersion() : This application agrees with the current version of QBWebConnector. Allowing update operation.
20170118.14:58:19 UTC   : QBWebConnector.SOAPWebService.do_authenticate() : Authenticating to application 'My QuickBooks SOAP Server', username = 'mutie'
20170118.14:58:19 UTC   : QBWebConnector.SOAPWebService.do_authenticate() : *** Calling authenticate() with following parameters:<userName="mutie"><password=<MaskedForSecurity>
20170118.14:58:19 UTC   : QBWebConnector.SOAPWebService.updateWS() : Received from authenticate() following parameters:<authRet[0]="3a923263-0a0e-56e4-7d2c-44245c30b9db"><authRet[1]="none"><authRet[2]=""><authRet[3]="">
20170118.14:58:19 UTC   : QBWebConnector.RegistryManager.setCurrentWebServiceName() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\CurrentWebServiceName has been set to My QuickBooks SOAP Server
20170118.14:58:19 UTC   : QBWebConnector.RegistryManager.setCurrentWebServiceSessionTicket() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\CurrentWebServiceSessionTicket has been set to 3a923263-0a0e-56e4-7d2c-44245c30b9db
20170118.14:58:19 UTC   : QBWebConnector.SOAPWebService.CheckCFNResponse() : No data to exchange for this application. Job ending.
20170118.14:58:19 UTC   : QBWebConnector.SOAPWebService.do_authenticate() : Done.
20170118.14:58:19 UTC   : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to False
20170118.14:58:19 UTC   : QBWebConnector.RegistryManager.setUpdateLock() : ********************* Update session unlocked *********************
20170118.14:58:19 UTC   : QBWebConnector.WebServiceManager.DoUpdateSelected() : No data to exchange for the application:  My QuickBooks SOAP Server

我的猜测是,根据日志,问题可能出在这里:

My guess is that the issue could be here according to the logs:

<authRet[0]="3a923263-0a0e-56e4-7d2c-44245c30b9db"><authRet[1]="none"><authRet[2]=""><authRet[3]="">

但是,我无法真正知道问题所在.

However, am not able to really know what the problem is.

推荐答案

我找到了问题所在.

  1. 公司文件路径错误.我是这样的:

  1. The company file path was wrong. I had it this way:

C:/Users/Public/Documents/Intuit/QuickBooks/Company%20Files/Filename.qbw

C:/Users/Public/Documents/Intuit/QuickBooks/Company%20Files/Filename.qbw

代替

C:\Users\Public\Documents\Intuit\QuickBooks\Company Files\Filename.qbw

  1. 我在错误的地方排队.我在里面排队

  1. I was queueing in the wrong place. I was doing my queue inside

if (!QuickBooks_Utilities::initialized($dsn)){...}

这是错误的,因为这部分只运行了一次.将内容推送到 QuickBooks 后,我不得不立即排队.

This is wrong because this part runs only once. I had to queue immediately after I push something to QuickBooks.

这篇关于QuickBooks Web 连接器应用程序未将客户添加到 QuickBooks Desktop Premier Edition的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆