Im using QuickBooks PHP DevKit to connect my web application to quickbooks through Quickbooks web connector tool. It works very well when inserting data but when trying to update it gives me this error:
0x80040400: QuickBooks found an error when parsing the provided XML text stream.
This link shows the xml options that are available:
http://dev.developer.intuit.com/qbSDK-current/OSR/OnscreenRef/index-QBD.html
$xml = '<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="2.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<EstimateModRq requestID="' . $requestID . '">
<EstimateMod>
<TxnID>B9-1340134119</TxnID>
<EditSequence>1340134119</EditSequence>
<CustomerRef>
<FullName>cliente prueba</FullName>
</CustomerRef>
<TxnDate>2009-01-09</TxnDate>
<RefNumber>16466</RefNumber>
<EstimateLineMod>
<TxnLineID>-1</TxnLineID>
<ItemRef>
<FullName>Sales</FullName>
</ItemRef>
<Desc>gift certificate</Desc>
<Quantity>4</Quantity>
<Rate>11.00</Rate>
</EstimateLineMod>
</EstimateMod>
</EstimateModRq>
</QBXMLMsgsRq>
</QBXML>';
If you refer to the QuickBooks OSR (and preferably the up-to-date version here: http://developer.intuit.com/qbsdk-current/common/newosr/index.html), you’ll notice that the EstimateMod request is marked like this:
That means that EstimateMod isn’t supported until qbXML version 3.0 (there’s lots more information about qbXML versions in the QuickBooks SDK .PDF documentation if you need more details).
You are using qbXML version 2.0:
Change that to a higher version (6.0 or higher are the best versions to support- 6.0 offers the widest range of compatibility with the most versions of QuickBooks) and you should be all set.