Magento SOAP salesOrderInvoiceCreate 无法识别订单
Magento SOAP salesOrderInvoiceCreate not recognising order
我正在尝试通过 Magento SOAP API 提高订单发票,但是我收到了一个我知道存在的增量 ID 的 'Order Not Exists' 错误。
我的 SOAP 请求生成的 XML 是:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >
<soap:Body>
<salesOrderInvoiceCreate xmlns="urn:Magento">
<sessionId>a4b84a4900415cb6a61b3f81e4fxxxx4</sessionId>
<orderIncrementId>100000001</orderIncrementId>
<itemsQty SOAP-ENC:arrayType="SOAP-ENC:Array[1]" xsi:type="SOAP-ENC:Array">
<item><order_item_id>1</order_item_id>
<qty>1.0000</qty>
</item>
</itemsQty>
<email>liam@xxxxxxx.com</email>
</salesOrderInvoiceCreate>
</soap:Body>
</soap:Envelope>
我得到的回复是
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>103</faultcode>
<faultstring>Requested order not exists.</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
不确定我是否没有传递正确的值,但我使用的其他方法(加载订单等)都按预期工作。
如有任何建议,我们将不胜感激。
谢谢!
好吧,显然文档是错误的。
根据 Magento 文档:
http://www.magentocommerce.com/api/soap/sales/salesOrderInvoice/sales_order_invoice.create.html
它期待 orderIncrementId 的参数
但是,我已经检查了 WSDL,它需要一个 invoiceIncrementId 字段,尽管它应该仍然包含订单的增量 ID - 看图。
我正在尝试通过 Magento SOAP API 提高订单发票,但是我收到了一个我知道存在的增量 ID 的 'Order Not Exists' 错误。
我的 SOAP 请求生成的 XML 是:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >
<soap:Body>
<salesOrderInvoiceCreate xmlns="urn:Magento">
<sessionId>a4b84a4900415cb6a61b3f81e4fxxxx4</sessionId>
<orderIncrementId>100000001</orderIncrementId>
<itemsQty SOAP-ENC:arrayType="SOAP-ENC:Array[1]" xsi:type="SOAP-ENC:Array">
<item><order_item_id>1</order_item_id>
<qty>1.0000</qty>
</item>
</itemsQty>
<email>liam@xxxxxxx.com</email>
</salesOrderInvoiceCreate>
</soap:Body>
</soap:Envelope>
我得到的回复是
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>103</faultcode>
<faultstring>Requested order not exists.</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
不确定我是否没有传递正确的值,但我使用的其他方法(加载订单等)都按预期工作。
如有任何建议,我们将不胜感激。
谢谢!
好吧,显然文档是错误的。
根据 Magento 文档: http://www.magentocommerce.com/api/soap/sales/salesOrderInvoice/sales_order_invoice.create.html
它期待 orderIncrementId 的参数
但是,我已经检查了 WSDL,它需要一个 invoiceIncrementId 字段,尽管它应该仍然包含订单的增量 ID - 看图。