I'm implementing Keith Palmer's QuickBooks PHP DevKit (https://github.com/conolibyte/quickbooks-php/) so that my PHP application can pass data to Quickbooks Desktop via the Quickbooks Web Connector. I had some issues due to changes in PHP and Quickbooks and now the sample web connector application works fine and successfully passes customers to Quickbooks.
My actual goal is to simulate via PHP the transactions that are done in Quickbooks via a relatively simple process:
Banking -->Use Register, (select an account) and enter the payment or deposit amount, account, memo, and click history.
I think this (at least the deposit part) can be done via DepositAddRq using the QUICKBOOKS_ADD_DEPOSIT method in PHP DevKit. Now I'm rewriting the content to use this method and I'm getting the following error:
3180: An error occurred while saving the deposit line. QuickBooks Error Message: The given record number is not in the deposit payment list.
The SOAP server is generating the following XML:
<?qbxml version="2.0"?> <QBXML> <QBXMLMsgsRq onError="stopOnError"> <DepositAddRq requestID="19"> <DepositAdd> <DepositToAccountRef> <FullName>test account</FullName> </DepositToAccountRef> <Memo>Memo</Memo> <DepositLineAdd> <PaymentTxnID>3D95-1071497093</PaymentTxnID> </DepositLineAdd> </DepositAdd> </DepositAddRq> </QBXMLMsgsRq> </QBXML>
I received an XML response from Quickbooks:
<?xml version="1.0" ?> <QBXML> <QBXMLMsgsRs> <DepositAddRs requestID="19" statusCode="3180" statusSeverity="Error" statusMessage="保存存款行时出错。 QuickBooks error message: The given record number is not in the Payments to Deposit list." /> </QBXMLMsgsRs> </QBXML>
I get the same error when passing the QuickBooks SDK 15 sample XML code for DepositAddRq:
<QBXMLMsgsRq onError="stopOnError"> <DepositAddRq requestID="0"> <DepositAdd> <DepositToAccountRef> <FullName>Checking</FullName> </DepositToAccountRef> <DepositLineAdd> <PaymentTxnID>3D95-1071497099</PaymentTxnID> </DepositLineAdd> </DepositAdd> </DepositAddRq> </QBXMLMsgsRq> </QBXML>
Should I use a completely different method for recording deposits and payments to my account, are there additional steps required, or am I doing it all wrong?
Thanks in advance!
This is a bit tricky, but if you look at the documentation you can see what it wants:
Please see this section for details:
This means you can or provide a payment link (
) or you can provide the following link to an account (
).What you describe in your post and what you show in the XML are two different things . In the XML, you try to link to an existing undeposited payment (for example, you try to mark an existing payment as deposited):
But the you described is specified account and memo :
If you are trying to simulate entering an account, memo, etc., then you will need to provide XML to specify the account, memo, etc. For example, as shown below: p>