无法更新QuickBooks离线付款

时间:2017-08-28 15:21:19

标签: quickbooks qbxml

我将此请求发送给QBSDK以更新付款但获得例外

  

" QuickBooks在解析提供的XML文本流时发现错误。"

<?xml version="1.0" ?> 
  <?qbxml version="6.0"?> 
 <QBXML>
 <QBXMLMsgsRq onError="stopOnError">
 <ReceivePaymentModRq requestID="1">
 <ReceivePaymentMod>
  <TxnID>130-1503933149</TxnID> 
  <EditSequence>1503933149</EditSequence> 
 <CustomerRef>
  <ListID>80000012-1503933114</ListID> 
  </CustomerRef>
  <TxnDate>2017-08-28</TxnDate> 
 <PaymentMethodRef>
  <FullName>Cash</FullName> 
  </PaymentMethodRef>
 <AppliedToTxnMod>
  <TxnID>12D-1503933135</TxnID> 
  <PaymentAmount>200.00</PaymentAmount> 
  </AppliedToTxnMod>
  <TotalAmount>200.00</TotalAmount> 
  </ReceivePaymentMod>
  </ReceivePaymentModRq>
  </QBXMLMsgsRq>
  </QBXML>

有人能说出这个xml请求有什么问题吗?

1 个答案:

答案 0 :(得分:0)

我的xml请求中TotalAmount标记的位置是个问题。 我把它放在PaymentMethodRef标签下面,就像这样解决了它:

<?xml version="1.0" ?> 
  <?qbxml version="6.0"?> 
 <QBXML>
 <QBXMLMsgsRq onError="stopOnError">
 <ReceivePaymentModRq requestID="1">
 <ReceivePaymentMod>
  <TxnID>130-1503933149</TxnID> 
  <EditSequence>1503933149</EditSequence> 
 <CustomerRef>
  <ListID>80000012-1503933114</ListID> 
  </CustomerRef>
  <TxnDate>2017-08-28</TxnDate> 
 <PaymentMethodRef>
  <FullName>Cash</FullName> 
  </PaymentMethodRef>
  <TotalAmount>200.00</TotalAmount>
 <AppliedToTxnMod>
  <TxnID>12D-1503933135</TxnID> 
  <PaymentAmount>200.00</PaymentAmount> 
  </AppliedToTxnMod>       
  </ReceivePaymentMod>
  </ReceivePaymentModRq>
  </QBXMLMsgsRq>
  </QBXML>