I am trying to cancel the order on the amazon, initially was having some of the format issues, now all the format issues are removed but feed result is keep showing one or more item is invalid. i am using the correct xml format to cancel the order and also the correct amazon order id and amazon order item id, both id are valid but the result keep showing the invalid item.
Order Acknowledgement Feed Format:
<?xml version="1.0"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>M_xxxxx_108291953</MerchantIdentifier>
</Header>
<MessageType>OrderAcknowledgement</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderAcknowledgement>
<AmazonOrderID>111-1111111-7313343</AmazonOrderID>
<StatusCode>Failure</StatusCode>
<Item>
<AmazonOrderItemCode>232327843324</AmazonOrderItemCode>
<CancelReason>BuyerCanceled</CancelReason>
</Item>
</OrderAcknowledgement>
</Message>
</AmazonEnvelope>
Response On feed submission result: as i try to get the feed result it shows this error 'We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed.', below is the feed submission result.
<?xml version="1.0" encoding="UTF-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.02</DocumentVersion>
<MerchantIdentifier>M_xxxxx_108291953</MerchantIdentifier>
</Header>
<MessageType>ProcessingReport</MessageType>
<Message>
<MessageID>1</MessageID>
<ProcessingReport>
<DocumentTransactionID>7801114004</DocumentTransactionID>
<StatusCode>Complete</StatusCode>
<ProcessingSummary>
<MessagesProcessed>1</MessagesProcessed>
<MessagesSuccessful>0</MessagesSuccessful>
<MessagesWithError>1</MessagesWithError>
<MessagesWithWarning>0</MessagesWithWarning>
</ProcessingSummary>
<Result>
<MessageID>1</MessageID>
<ResultCode>Error</ResultCode>
<ResultMessageCode>25</ResultMessageCode>
<ResultDescription>We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed.</ResultDescription>
</Result>
</ProcessingReport>
</Message>
</AmazonEnvelope>
Can any one one help me on this to make it work.
i am able to cancel the entire order in amazon.
xml i am using
<?xml version="1.0"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>'.$storeDetails["merchantIdentifier"].'</MerchantIdentifier>
</Header>
<MessageType>OrderAcknowledgement</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderAcknowledgement>
<AmazonOrderID>'.$amazonOrderId.'</AmazonOrderID>
<StatusCode>Failure</StatusCode>
<Item>
<AmazonOrderItemCode>'.$item['store_product_code'].'</AmazonOrderItemCode>
<CancelReason>'.$reason.'</CancelReason>
</Item>
</OrderAcknowledgement>
</Message>
</AmazonEnvelope
==== Let me know if it helps.
来源:https://stackoverflow.com/questions/18342768/amazon-mws-order-cancel-process