請在下面錯誤地協助我: 2015-04-16 10:45:10 - D:\ projects \ QuickBooksv3-php-sdk-2.0.5 \ DataService \ DataService.php - 340 - CheckNullResponseAndThrowException - 響應空或空Quickbooks Php SDK - CheckNullResponseAndThrowException - 響應空或空
3天前,我已經成功地測試了快速書籍的PHP sdk。 但今天當我要與系統集成時,它會出現錯誤。該代碼與3天前相同。
這裏是我的代碼:
//Create new invoice
$invoiceObj2 = new IPPInvoice();
$invoiceObj2->DocNumber="1025";
//Add customer
$customerRef2= new IPPReferenceType();
$customerRef2->value= "1";
$invoiceObj2->CustomerRef= $customerRef2;
//Create Line
$line2 = new IPPLine();
$line2->Amount= 1*90.84;
$linetype2= new IPPLineDetailTypeEnum();
$linetype2->value="SalesItemLineDetail";
$lineDetail2 = new IPPSalesItemLineDetail();
$lineDetail2->ItemRef = "4";
$lineDetail2->UnitPrice = 90.84;
$lineDetail2->Qty= 1;
$line2->DetailType=$linetype2;
$line2->SalesItemLineDetail=$lineDetail2;
$invoiceObj2->Line=$line2;
$resultingInvoiceObj2 = $dataService->Add($invoiceObj2);
echo "Created Invoice Id={$resultingInvoiceObj2->Id}. Reconstructed response body:<br/><br/>";
$xmlBody = XmlObjectSerializer::getPostXmlFromArbitraryEntity($resultingInvoiceObj2, $urlResource);
echo "<pre>";
echo $xmlBody . "<br/>";
echo "</pre>";
敬請幫助指出我的錯誤。謝謝
雖然此鏈接可以回答這個問題,最好是在這裏有答案的主要部件,並提供鏈接以供參考。如果鏈接頁面更改,則僅鏈接答案可能會失效。 –