Сервер SOAP: я все еще тестирую, поэтому у меня есть кое-что в жестком коде. Я удалил некоторые вещи из файла и большую часть начала, чтобы я мог вписаться в ограничение по количеству символов SO.
<?php
$map = array(
QUICKBOOKS_QUERY => array( '_quickbooks_get_reports_request', '_quickbooks_get_reports_response' ),
);
$log_level = QUICKBOOKS_LOG_DEBUG;$soapserver = QUICKBOOKS_SOAPSERVER_BUILTIN;
$handler_options = array(
'deny_concurrent_logins' => false,
'deny_reallyfast_logins' => false,
);
$dsn = 'mysql://root:root@localhost/cyfe_quickbooks';
if (!QuickBooks_Utilities::initialized($dsn))
{
QuickBooks_Utilities::initialize($dsn);
QuickBooks_Utilities::createUser($dsn, $user, $pass);
}
else
{
////if user hasn't been added to quickbooks_user table
/////QuickBooks_Utilities::createUser($dsn, $user, $pass);////remove this when finished testing requests
$Queue = new QuickBooks_WebConnector_Queue($dsn);
$Queue->enqueue(QUICKBOOKS_QUERY, 6);
}$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_get_reports_request($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale)
{
$sdate = '2017-01-01';
$edate = '2018-01-20';$xml = '<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="2.0"?>
<QBXML>
<QBXMLMsgsRq onError = "stopOnError">
<AgingReportQueryRq>
<AgingReportType>APAgingSummary</AgingReportType>
<ReportPeriod>
<FromReportDate>'.$sdate.'</FromReportDate>
<ToReportDate>'.$edate.'</ToReportDate>
</ReportPeriod>
</AgingReportQueryRq>
</QBXMLMsgsRq>
</QBXML>';
return $xml;
}
function _quickbooks_get_reports_response($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents)
{
////get response
$a = 4;
if($a === 4)
$b=5;
else
$b=4;
}function _quickbooks_error_stringtoolong($requestID, $user, $action, $ID, $extra, &$err, $xml, $errnum, $errmsg)
{
mail('[email protected]',
'QuickBooks error occured!',
'QuickBooks thinks that ' . $action . ': ' . $ID . ' has a value which will not fit in a QuickBooks field...');
}
Журнал QWC (мне пришлось обрезать начало и конец журнала, чтобы он не превышал 30 000 символов).
20180125.14:31:26 UTC : QBWebConnector.CompanyFileLock.getLock() : Got Lock = UNLOCKED:DESKTOP-8QQJR9D
20180125.14:31:26 UTC : QBWebConnector.CompanyFileLock.IsLocked() : Lock = UNLOCKED. Returning false.
20180125.14:31:26 UTC : QBWebConnector.CompanyFileLock.Send_DataExtModRqXML() : XML dump follows: -
<?xml version="1.0"?><?qbxml version="13.0"?><QBXML><QBXMLMsgsRq onError="stopOnError"><DataExtModRq requestID="1"><DataExtMod><OwnerID>{96e03089-7649-4bcb-ab55-e1389549c00e}</OwnerID><DataExtName>AppLock</DataExtName><OtherDataExtType>Company</OtherDataExtType><DataExtValue>LOCKED:DESKTOP-8QQJR9D:636524874865351269</DataExtValue></DataExtMod></DataExtModRq></QBXMLMsgsRq></QBXML>
20180125.14:31:26 UTC : QBWebConnector.CompanyFileLock.Send_DataExtModRqXML() : XML dump follows: -
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<DataExtModRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<DataExtRet>
<OwnerID>{96E03089-7649-4BCB-AB55-E1389549C00E}</OwnerID>
<DataExtName>AppLock</DataExtName>
<DataExtType>STR255TYPE</DataExtType>
<DataExtValue>LOCKED:DESKTOP-8QQJR9D:636524874865351269</DataExtValue>
</DataExtRet>
</DataExtModRs>
</QBXMLMsgsRs>
</QBXML>20180125.14:31:26 UTC : QBWebConnector.CompanyFileLock.setLock() : Lock has been set to value = <LOCKED:DESKTOP-8QQJR9D:636524874865351269> in QuickBooks for ownerID = <{96e03089-7649-4bcb-ab55-e1389549c00e}>
20180125.14:31:27 UTC : QBWebConnector.CompanyFileLock.Send_CompanyQueryRqXML() : XML dump follows: -
<?xml version="1.0"?><?qbxml version="13.0"?><QBXML><QBXMLMsgsRq onError="stopOnError"><CompanyQueryRq requestID="1"><OwnerID>{96e03089-7649-4bcb-ab55-e1389549c00e}</OwnerID></CompanyQueryRq></QBXMLMsgsRq></QBXML>
20180125.14:31:27 UTC : QBWebConnector.CompanyFileLock.Send_CompanyQueryRqXML() : XML dump follows: -
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<CompanyQueryRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<CompanyRet>
<IsSampleCompany>false</IsSampleCompany>
<CompanyName>a</CompanyName>
<LegalCompanyName>a</LegalCompanyName>
<FirstMonthFiscalYear>January</FirstMonthFiscalYear>
<FirstMonthIncomeTaxYear>January</FirstMonthIncomeTaxYear>
<CompanyType>AccountingorBookkeeping</CompanyType>
<TaxForm>Form1040</TaxForm>
<SubscribedServices>
<Service>
<Name>QuickBooks Online Banking</Name>
<Domain>banking.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing</Name>
<Domain>billing.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Level 1 Service</Name>
<Domain>qbob1.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Level 2 Service</Name>
<Domain>qbob2.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Payment Service</Name>
<Domain>qbobpay.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Bill Payment</Name>
<Domain>billpay.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Paper Mailing Service</Name>
<Domain>qbobpaper.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Payroll Service</Name>
<Domain>payroll.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Basic Payroll Service</Name>
<Domain>payrollbsc.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Basic Disk Payroll Service</Name>
<Domain>payrollbscdisk.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Deluxe Payroll Service</Name>
<Domain>payrolldlx.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Premier Payroll Service</Name>
<Domain>payrollprm.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Federal</Name>
<Domain>basic_plus_fed.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Federal and State</Name>
<Domain>basic_plus_fed_state.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Direct Deposit</Name>
<Domain>basic_plus_dd.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Merchant Account Service</Name>
<Domain>mas.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
</SubscribedServices>
<AccountantCopy>
<AccountantCopyExists>false</AccountantCopyExists>
</AccountantCopy>
<DataExtRet>
<OwnerID>{96e03089-7649-4bcb-ab55-e1389549c00e}</OwnerID>
<DataExtName>AppLock</DataExtName>
<DataExtType>STR255TYPE</DataExtType>
<DataExtValue>LOCKED:DESKTOP-8QQJR9D:636524874865351269</DataExtValue>
</DataExtRet>
<DataExtRet>
<OwnerID>{96e03089-7649-4bcb-ab55-e1389549c00e}</OwnerID>
<DataExtName>FileID</DataExtName>
<DataExtType>STR255TYPE</DataExtType>
<DataExtValue>{57F3B9B6-86F1-4FCC-B1FF-966DE1814D20}</DataExtValue>
</DataExtRet>
</CompanyRet>
</CompanyQueryRs>
</QBXMLMsgsRs>
</QBXML>20180125.14:31:27 UTC : QBWebConnector.CompanyFileLock.getLock() : Got Lock = LOCKED:DESKTOP-8QQJR9D:636524874865351269
20180125.14:31:27 UTC : QBWebConnector.SOAPWebService.update() : Company file has been locked for update.
20180125.14:31:27 UTC : QBWebConnector.SOAPWebService.update() : Synchronizing with QuickBooks Company Name = a
20180125.14:31:27 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : Asking application to send request no. 1
20180125.14:31:27 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : *** Calling sendRequestXML() with following parameters:
20180125.14:31:27 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : wcTicket="1d0f2c74-26c8-1c34-ad3e-b7ae56f1152a"20180125.14:31:27 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : HCPResponseXML=
20180125.14:31:27 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : XML dump follows: -
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<HostQueryRs requestID="0" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<HostRet>
<ProductName>Intuit QuickBooks Enterprise Solutions 18.0</ProductName>
<MajorVersion>28</MajorVersion>
<MinorVersion>0</MinorVersion>
<Country>US</Country>
<SupportedQBXMLVersion>1.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>1.1</SupportedQBXMLVersion>
<SupportedQBXMLVersion>2.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>2.1</SupportedQBXMLVersion>
<SupportedQBXMLVersion>3.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>4.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>4.1</SupportedQBXMLVersion>
<SupportedQBXMLVersion>5.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>6.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>7.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>8.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>9.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>10.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>11.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>12.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>13.0</SupportedQBXMLVersion>
<IsAutomaticLogin>false</IsAutomaticLogin>
<QBFileMode>SingleUser</QBFileMode>
</HostRet>
</HostQueryRs>
<CompanyQueryRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<CompanyRet>
<IsSampleCompany>false</IsSampleCompany>
<CompanyName>a</CompanyName>
<LegalCompanyName>a</LegalCompanyName>
<FirstMonthFiscalYear>January</FirstMonthFiscalYear>
<FirstMonthIncomeTaxYear>January</FirstMonthIncomeTaxYear>
<CompanyType>AccountingorBookkeeping</CompanyType>
<TaxForm>Form1040</TaxForm>
<SubscribedServices>
<Service>
<Name>QuickBooks Online Banking</Name>
<Domain>banking.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing</Name>
<Domain>billing.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Level 1 Service</Name>
<Domain>qbob1.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Level 2 Service</Name>
<Domain>qbob2.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Payment Service</Name>
<Domain>qbobpay.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Bill Payment</Name>
<Domain>billpay.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Paper Mailing Service</Name>
<Domain>qbobpaper.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Payroll Service</Name>
<Domain>payroll.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Basic Payroll Service</Name>
<Domain>payrollbsc.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Basic Disk Payroll Service</Name>
<Domain>payrollbscdisk.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Deluxe Payroll Service</Name>
<Domain>payrolldlx.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Premier Payroll Service</Name>
<Domain>payrollprm.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Federal</Name>
<Domain>basic_plus_fed.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Federal and State</Name>
<Domain>basic_plus_fed_state.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Direct Deposit</Name>
<Domain>basic_plus_dd.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Merchant Account Service</Name>
<Domain>mas.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
</SubscribedServices>
<AccountantCopy>
<AccountantCopyExists>false</AccountantCopyExists>
</AccountantCopy>
<DataExtRet>
<OwnerID>{96e03089-7649-4bcb-ab55-e1389549c00e}</OwnerID>
<DataExtName>AppLock</DataExtName>
<DataExtType>STR255TYPE</DataExtType>
<DataExtValue>LOCKED:DESKTOP-8QQJR9D:636524874865351269</DataExtValue>
</DataExtRet>
<DataExtRet>
<OwnerID>{96e03089-7649-4bcb-ab55-e1389549c00e}</OwnerID>
<DataExtName>FileID</DataExtName>
<DataExtType>STR255TYPE</DataExtType>
<DataExtValue>{57F3B9B6-86F1-4FCC-B1FF-966DE1814D20}</DataExtValue>
</DataExtRet>
</CompanyRet>
</CompanyQueryRs>
<PreferencesQueryRs requestID="2" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<PreferencesRet>
<AccountingPreferences>
<IsUsingAccountNumbers>false</IsUsingAccountNumbers>
<IsRequiringAccounts>true</IsRequiringAccounts>
<IsUsingClassTracking>false</IsUsingClassTracking>
<IsUsingAuditTrail>true</IsUsingAuditTrail>
<IsAssigningJournalEntryNumbers>true</IsAssigningJournalEntryNumbers>
</AccountingPreferences>
<FinanceChargePreferences>
<AnnualInterestRate>0.00</AnnualInterestRate>
<MinFinanceCharge>0.00</MinFinanceCharge>
<GracePeriod>0</GracePeriod>
<IsAssessingForOverdueCharges>false</IsAssessingForOverdueCharges>
<CalculateChargesFrom>DueDate</CalculateChargesFrom>
<IsMarkedToBePrinted>false</IsMarkedToBePrinted>
</FinanceChargePreferences>
<JobsAndEstimatesPreferences>
<IsUsingEstimates>true</IsUsingEstimates>
<IsUsingProgressInvoicing>false</IsUsingProgressInvoicing>
<IsPrintingItemsWithZeroAmounts>false</IsPrintingItemsWithZeroAmounts>
</JobsAndEstimatesPreferences>
<MultiCurrencyPreferences>
<IsMultiCurrencyOn>false</IsMultiCurrencyOn>
</MultiCurrencyPreferences>
<MultiLocationInventoryPreferences>
<IsMultiLocationInventoryAvailable>false</IsMultiLocationInventoryAvailable>
<IsMultiLocationInventoryEnabled>false</IsMultiLocationInventoryEnabled>
</MultiLocationInventoryPreferences>
<PurchasesAndVendorsPreferences>
<IsUsingInventory>false</IsUsingInventory>
<DaysBillsAreDue>10</DaysBillsAreDue>
<IsAutomaticallyUsingDiscounts>false</IsAutomaticallyUsingDiscounts>
</PurchasesAndVendorsPreferences>
<ReportsPreferences>
<AgingReportBasis>AgeFromDueDate</AgingReportBasis>
<SummaryReportBasis>Accrual</SummaryReportBasis>
</ReportsPreferences>
<SalesAndCustomersPreferences>
<IsTrackingReimbursedExpensesAsIncome>false</IsTrackingReimbursedExpensesAsIncome>
<IsAutoApplyingPayments>true</IsAutoApplyingPayments>
<PriceLevels>
<IsUsingPriceLevels>true</IsUsingPriceLevels>
<IsRoundingSalesPriceUp>true</IsRoundingSalesPriceUp>
</PriceLevels>
</SalesAndCustomersPreferences>
<TimeTrackingPreferences>
<FirstDayOfWeek>Monday</FirstDayOfWeek>
</TimeTrackingPreferences>
<CurrentAppAccessRights>
<IsAutomaticLoginAllowed>true</IsAutomaticLoginAllowed>
<AutomaticLoginUserName>Admin</AutomaticLoginUserName>
<IsPersonalDataAccessAllowed>false</IsPersonalDataAccessAllowed>
</CurrentAppAccessRights>
<ItemsAndInventoryPreferences>
<EnhancedInventoryReceivingEnabled>false</EnhancedInventoryReceivingEnabled>
<IsTrackingSerialOrLotNumber>None</IsTrackingSerialOrLotNumber>
<FIFOEnabled>false</FIFOEnabled>
<IsRSBEnabled>false</IsRSBEnabled>
<IsBarcodeEnabled>false</IsBarcodeEnabled>
</ItemsAndInventoryPreferences>
</PreferencesRet>
</PreferencesQueryRs>
</QBXMLMsgsRs>
</QBXML>20180125.14:31:27 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : cfn="C:\Users\Public\Documents\Intuit\QuickBooks\Sample Company Files\QuickBooks Enterprise Solutions 18.0\a.qbw"20180125.14:31:27 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : qbNationality="US"20180125.14:31:27 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : qbXMLMajorVers="13"20180125.14:31:27 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : qbXMLMinorVers="0"20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : Received from sendRequestXML() following parameter:
20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : strRequestXML =
20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : XML dump follows: -
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="2.0"?>
<QBXML>
<QBXMLMsgsRq onError = "stopOnError">
<AgingReportQueryRq>
<AgingReportType>APAgingSummary</AgingReportType>
<ReportPeriod>
<FromReportDate>2017-01-01</FromReportDate>
<ToReportDate>2018-01-20</ToReportDate>
</ReportPeriod>
</AgingReportQueryRq>
</QBXMLMsgsRq>
</QBXML>
20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : Request xml received.
20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : Processing request #1
20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : REQUEST: received from application: size (bytes) = 528
20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : Sending request to QuickBooks.
20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : Response received from QuickBooks: size (bytes) = 1536
20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : Sending response back to application.
20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : *** Calling receiveResponseXML() with following parameters:
20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : wcTicket="1d0f2c74-26c8-1c34-ad3e-b7ae56f1152a"20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : response =
20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : XML dump follows: -
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<AgingReportQueryRs statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<ReportRet>
<ReportTitle>A/P Aging Summary</ReportTitle>
<ReportSubtitle>As of January 20, 2018</ReportSubtitle>
<ReportBasis>Accrual</ReportBasis>
<NumRows>1</NumRows>
<NumColumns>7</NumColumns>
<NumColTitleRows>1</NumColTitleRows>
<ColDesc colID="1" dataType="STRTYPE">
<ColTitle titleRow="1" />
<ColType>Label</ColType>
</ColDesc>
<ColDesc colID="2" dataType="AMTTYPE">
<ColTitle titleRow="1" value="Current" />
<ColType>Amount</ColType>
</ColDesc>
<ColDesc colID="3" dataType="AMTTYPE">
<ColTitle titleRow="1" value="1 - 30" />
<ColType>Amount</ColType>
</ColDesc>
<ColDesc colID="4" dataType="AMTTYPE">
<ColTitle titleRow="1" value="31 - 60" />
<ColType>Amount</ColType>
</ColDesc>
<ColDesc colID="5" dataType="AMTTYPE">
<ColTitle titleRow="1" value="61 - 90" />
<ColType>Amount</ColType>
</ColDesc>
<ColDesc colID="6" dataType="AMTTYPE">
<ColTitle titleRow="1" value="> 90" />
<ColType>Amount</ColType>
</ColDesc>
<ColDesc colID="7" dataType="AMTTYPE">
<ColTitle titleRow="1" value="TOTAL" />
<ColType>Total</ColType>
</ColDesc>
<ReportData>
<TotalRow rowNumber="1">
<ColData colID="1" value="TOTAL" />
<ColData colID="2" value="0.00" />
<ColData colID="3" value="0.00" />
<ColData colID="4" value="0.00" />
<ColData colID="5" value="0.00" />
<ColData colID="6" value="0.00" />
<ColData colID="7" value="0.00" />
</TotalRow>
</ReportData>
</ReportRet>
</AgingReportQueryRs>
</QBXMLMsgsRs>
</QBXML>20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : hresult=""20180125.14:31:33 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : message=""20180125.14:31:38 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : Received from receiveResponseXML() following parameters:
20180125.14:31:38 UTC : QBWebConnector.SOAPWebService.do_receiveResponseXML() : more="-1">
20180125.14:31:38 UTC : QBWebConnector.SOAPWebService.do_getLastError() : *** Calling getLastError() with following parameter:
20180125.14:31:38 UTC : QBWebConnector.SOAPWebService.do_getLastError() : wcTicket="1d0f2c74-26c8-1c34-ad3e-b7ae56f1152a"20180125.14:31:39 UTC : QBWebConnector.SOAPWebService.do_getLastError() : Received from getLastError() following parameter:
20180125.14:31:39 UTC : QBWebConnector.SOAPWebService.do_getLastError() : errorMsg=": "20180125.14:31:39 UTC : QBWebConnector.SOAPWebService.do_getLastError() : Received error from application: :
20180125.14:31:39 UTC : QBWebConnector.CompanyFileLock.Send_CompanyQueryRqXML() : XML dump follows: -
<?xml version="1.0"?><?qbxml version="13.0"?><QBXML><QBXMLMsgsRq onError="stopOnError"><CompanyQueryRq requestID="1"><OwnerID>{96e03089-7649-4bcb-ab55-e1389549c00e}</OwnerID></CompanyQueryRq></QBXMLMsgsRq></QBXML>
20180125.14:31:40 UTC : QBWebConnector.CompanyFileLock.Send_CompanyQueryRqXML() : XML dump follows: -
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<CompanyQueryRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<CompanyRet>
<IsSampleCompany>false</IsSampleCompany>
<CompanyName>a</CompanyName>
<LegalCompanyName>a</LegalCompanyName>
<FirstMonthFiscalYear>January</FirstMonthFiscalYear>
<FirstMonthIncomeTaxYear>January</FirstMonthIncomeTaxYear>
<CompanyType>AccountingorBookkeeping</CompanyType>
<TaxForm>Form1040</TaxForm>
<SubscribedServices>
<Service>
<Name>QuickBooks Online Banking</Name>
<Domain>banking.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing</Name>
<Domain>billing.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Level 1 Service</Name>
<Domain>qbob1.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Level 2 Service</Name>
<Domain>qbob2.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Payment Service</Name>
<Domain>qbobpay.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Bill Payment</Name>
<Domain>billpay.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Online Billing Paper Mailing Service</Name>
<Domain>qbobpaper.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Payroll Service</Name>
<Domain>payroll.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Basic Payroll Service</Name>
<Domain>payrollbsc.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Basic Disk Payroll Service</Name>
<Domain>payrollbscdisk.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Deluxe Payroll Service</Name>
<Domain>payrolldlx.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>QuickBooks Premier Payroll Service</Name>
<Domain>payrollprm.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Federal</Name>
<Domain>basic_plus_fed.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Federal and State</Name>
<Domain>basic_plus_fed_state.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Basic Plus Direct Deposit</Name>
<Domain>basic_plus_dd.qb</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
<Service>
<Name>Merchant Account Service</Name>
<Domain>mas.qbn</Domain>
<ServiceStatus>Never</ServiceStatus>
</Service>
</SubscribedServices>
<AccountantCopy>
<AccountantCopyExists>false</AccountantCopyExists>
</AccountantCopy>
<DataExtRet>
<OwnerID>{96e03089-7649-4bcb-ab55-e1389549c00e}</OwnerID>
<DataExtName>AppLock</DataExtName>
<DataExtType>STR255TYPE</DataExtType>
<DataExtValue>LOCKED:DESKTOP-8QQJR9D:636524874865351269</DataExtValue>
</DataExtRet>
<DataExtRet>
<OwnerID>{96e03089-7649-4bcb-ab55-e1389549c00e}</OwnerID>
<DataExtName>FileID</DataExtName>
<DataExtType>STR255TYPE</DataExtType>
<DataExtValue>{57F3B9B6-86F1-4FCC-B1FF-966DE1814D20}</DataExtValue>
</DataExtRet>
</CompanyRet>
</CompanyQueryRs>
</QBXMLMsgsRs>
</QBXML>20180125.14:31:40 UTC : QBWebConnector.CompanyFileLock.getLock() : Got Lock = LOCKED:DESKTOP-8QQJR9D:636524874865351269
20180125.14:31:40 UTC : QBWebConnector.CompanyFileLock.Send_DataExtModRqXML() : XML dump follows: -
<?xml version="1.0"?><?qbxml version="13.0"?><QBXML><QBXMLMsgsRq onError="stopOnError"><DataExtModRq requestID="1"><DataExtMod><OwnerID>{96e03089-7649-4bcb-ab55-e1389549c00e}</OwnerID><DataExtName>AppLock</DataExtName><OtherDataExtType>Company</OtherDataExtType><DataExtValue>UNLOCKED:DESKTOP-8QQJR9D</DataExtValue></DataExtMod></DataExtModRq></QBXMLMsgsRq></QBXML>
20180125.14:31:40 UTC : QBWebConnector.CompanyFileLock.Send_DataExtModRqXML() : XML dump follows: -
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<DataExtModRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<DataExtRet>
<OwnerID>{96E03089-7649-4BCB-AB55-E1389549C00E}</OwnerID>
<DataExtName>AppLock</DataExtName>
<DataExtType>STR255TYPE</DataExtType>
<DataExtValue>UNLOCKED:DESKTOP-8QQJR9D</DataExtValue>
</DataExtRet>
</DataExtModRs>
</QBXMLMsgsRs>
</QBXML>
Как вы видите в журнале QWC, _quickbooks_get_reports_request вызывается и успешно создает запрос XML. В журнале QWC он также дает ответ на мой XML-запрос. Сразу после того, как он появляется, где-то с моей стороны есть ошибка, но я не получаю никаких ошибок PHP. Я ожидал, что моя функция _quickbooks_get_reports_response будет вызвана, но это не так. Я что-то упускаю из журнала QWC, который говорит мне, что что-то не так или отсутствует?
Re:
Кажется, это правильный ответ, но запрос ID не может быть проверен …
Добавить requestID
в ваш qbXML. например следуйте этой схеме:
<QBXMLMsgsRq onError="stopOnError">
<CustomerAddRq requestID="' . $requestID . '">
Из примеров здесь:
Кроме того, исправьте свою версию qbXML, чтобы не использовать версию qbXML, которой более 15 лет.
<?qbxml version="2.0"?>
Повторно протестируйте, дайте нам знать, если у вас возникнут проблемы.
Других решений пока нет …