You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Quickbooks同步支付报错3120:发票存在却提示无法找到

调试Quickbooks同步支付关联发票问题

摘要

Quickbooks返回错误提示指定发票不存在,但在QB系统内或通过同步查询均可找到该发票。此前系统运行正常,突发故障。

背景信息

  • 未进行任何代码变更
  • 未对Quickbooks进行可能引发问题的修改,客户也未操作其Quickbooks
  • 一周前有QB软件更新,更新后同步正常
  • 其他功能仍可正常使用
  • PHP版本:5.4.45
  • Quickbooks PHP Integrator版本:1.5.2
  • Quickbooks版本:Quickbooks 2018 Premier

该系统仅实现新增客户、新增发票/费用、将支付关联至对应发票的同步功能,已稳定运行10余年。虽PHP同步组件版本较旧,但暂不认为是问题根源。

问题现象

近日起,所有尝试同步至Quickbooks并关联到发票的支付均被拒绝,PHP Quickbooks队列表返回错误:

3120: Object "6741D-1666222191" specified in the request cannot be found.

所有支付操作均出现此错误(对应发票TxnID会变化)。系统仍可同步新增客户、新增发票,但支付操作始终报错,故障突发于周三正常运行后的次日周四。

调试操作

  • 在Quickbooks系统内确认发票/费用存在,显示于对应客户名下
  • 执行Invoice Query查询,可返回该发票结果
  • 验证客户存在且ListID正确
  • 使用Admin用户测试,权限无问题
  • 支付关联的交易ListID及对应客户信息均正确

代码及交互内容

发送发票的XML(已移除敏感信息)

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="4.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <InvoiceAddRq requestID="SW52b2ljZUFkZHwyNTk0Ng==">
            <InvoiceAdd>
                <CustomerRef>
                    <ListID>80000717-1371847043</ListID>
                </CustomerRef>
                
                <TemplateRef>
                    <ListID>80000001-1214875504</ListID>
                </TemplateRef>
                
                <TxnDate>2022-10-18</TxnDate>
                
                <InvoiceLineAdd>
                    <ItemRef>
                        <ListID>800000F0-1639001986</ListID>
                    </ItemRef>
                    <Desc>Item Description</Desc>
                    <Quantity>1</Quantity>
                    <Amount>350.00</Amount>
                </InvoiceLineAdd>
            </InvoiceAdd>
        </InvoiceAddRq>
    </QBXMLMsgsRq>
</QBXML>

响应内容

<?xml version="1.0" ?>
<QBXML>
    <QBXMLMsgsRs>
        <InvoiceAddRs requestID="SW52b2ljZUFkZHwyNTk0Ng==" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
            <InvoiceRet>
                <TxnID>6741D-1666222191</TxnID>
                <TimeCreated>2022-10-19T16:29:51-08:00</TimeCreated>
                <TimeModified>2022-10-19T16:29:51-08:00</TimeModified>
                <EditSequence>1666222191</EditSequence>
                <TxnNumber>79922</TxnNumber>
                <CustomerRef>
                    <ListID>80000717-1371847043</ListID>
                    <FullName>LastName, FirstName</FullName>
                </CustomerRef>
                <ARAccountRef>
                    <ListID>8000002C-1215020650</ListID>
                    <FullName>Accounts Receivable</FullName>
                </ARAccountRef>
                <TemplateRef>
                    <ListID>80000001-1214875504</ListID>
                    <FullName>Intuit Product Invoice</FullName>
                </TemplateRef>
                <TxnDate>2022-10-18</TxnDate>
                <RefNumber>27345</RefNumber>
                <BillAddress>
                    <Addr1>Address 1</Addr1>
                    <Addr2>Address 2</Addr2>
                    <City>City</City>
                    <State>State</State>
                    <PostalCode>ZIP</PostalCode>
                </BillAddress>
                <IsPending>false</IsPending>
                <IsFinanceCharge>false</IsFinanceCharge>
                <DueDate>2022-10-18</DueDate>
                <ShipDate>2022-10-18</ShipDate>
                <Subtotal>350.00</Subtotal>
                <SalesTaxPercentage>0.00</SalesTaxPercentage>
                <SalesTaxTotal>0.00</SalesTaxTotal>
                <AppliedAmount>0.00</AppliedAmount>
                <BalanceRemaining>350.00</BalanceRemaining>
                <IsPaid>false</IsPaid>
                <IsToBePrinted>true</IsToBePrinted>
                <InvoiceLineRet>
                    <TxnLineID>6741F-1666222191</TxnLineID>
                    <ItemRef>
                        <ListID>800000F0-1639001986</ListID>
                        <FullName>Item Name</FullName>
                    </ItemRef>
                    <Desc>Item Description</Desc>
                    <Quantity>1</Quantity>
                    <Rate>350</Rate>
                    <Amount>350.00</Amount>
                    <SalesTaxCodeRef>
                        <ListID>80000002-1214875507</ListID>
                        <FullName>Non</FullName>
                    </SalesTaxCodeRef>
                </InvoiceLineRet>
            </InvoiceRet>
        </InvoiceAddRs>
    </QBXMLMsgsRs>
</QBXML>

发送支付的XML

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="2.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <ReceivePaymentAddRq requestID="UmVjZWl2ZVBheW1lbnRBZGR8MzM0MDU=">
            <ReceivePaymentAdd>
                <CustomerRef>
                    <ListID>80000717-1371847043</ListID>
                </CustomerRef>
                
                <TxnDate>2022-10-18</TxnDate>
                <RefNumber>RefNumber</RefNumber>
                
                <TotalAmount>350.00</TotalAmount>
                
                <PaymentMethodRef>
                    <ListID>80000005-1214879441</ListID>
                </PaymentMethodRef>
                
                <Memo></Memo>
                
                <AppliedToTxnAdd>
                    <TxnID>6741D-1666222191</TxnID>
                    <PaymentAmount>350.00</PaymentAmount>
                </AppliedToTxnAdd>
            
            </ReceivePaymentAdd>
        </ReceivePaymentAddRq>
    </QBXMLMsgsRq>
</QBXML>

发票查询返回结果

<InvoiceRet>
    <TxnID>6741D-1666222191</TxnID>
    <TimeCreated>2022-10-19T16:29:51-08:00</TimeCreated>
    <TimeModified>2022-10-19T16:29:51-08:00</TimeModified>
    <EditSequence>1666222191</EditSequence>
    <TxnNumber>79922</TxnNumber>
    <CustomerRef>
        <ListID>80000717-1371847043</ListID>
        <FullName>LastName, FullName</FullName>
    </CustomerRef>
    <ARAccountRef>
        <ListID>8000002C-1215020650</ListID>
        <FullName>Accounts Receivable</FullName>
    </ARAccountRef>
    <TxnDate>2022-10-18</TxnDate>
    <RefNumber>27345</RefNumber>
    <BillAddress>
        <Addr1>Address 1</Addr1>
        <Addr2>Address 2</Addr2>
        <City>City</City>
        <State>State</State>
        <PostalCode>ZIP</PostalCode>
    </BillAddress>
    <IsPending>false</IsPending>
    <IsFinanceCharge>false</IsFinanceCharge>
    <DueDate>2022-10-18</DueDate>
    <ShipDate>2022-10-18</ShipDate>
    <Subtotal>350.00</Subtotal>
    <SalesTaxPercentage>0.00</SalesTaxPercentage>
    <SalesTaxTotal>0.00</SalesTaxTotal>
    <AppliedAmount>0.00</AppliedAmount>
    <BalanceRemaining>350.00</BalanceRemaining>
    <IsPaid>false</IsPaid>
    <IsToBePrinted>true</IsToBePrinted>
</InvoiceRet>

内容的提问来源于stack exchange,提问作者WannabeDev

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 12:05:34