本文介绍了在亚马逊的市场更新商家订单ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用C#通过亚马逊MWS API更新MerchantOrderID在亚马逊的市场。

I need to update MerchantOrderID in Amazon Marketplace via Amazon MWS API using C#.

像这样,首先我创建的XML文件:

So, first I created XML file like:

<?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_STORE_3918753</MerchantIdentifier>
  </Header>
  <MessageType>OrderAcknowledgement</MessageType>
  <Message>
    <MessageID>1</MessageID>
    <OrderAcknowledgement>
      <AmazonOrderID>104-9209939-0469021</AmazonOrderID>
      <MerchantOrderID>100828163</MerchantOrderID>
      <StatusCode>Success</StatusCode>
      <Item>
        <AmazonOrderItemCode>11111111111111</AmazonOrderItemCode>
        <MerchantOrderItemID>111111</MerchantOrderItemID>
        <AmazonOrderItemCode>22222222222222</AmazonOrderItemCode>
        <MerchantOrderItemID>222222222</MerchantOrderItemID>
      </Item>
    </OrderAcknowledgement>
  </Message>
</AmazonEnvelope>

然后我尝试调用亚马逊MWS SubmitFeed:

then I try to call Amazon MWS SubmitFeed:

SubmitFeedRequest request = new SubmitFeedRequest();
        request.Merchant = merchantId;
        request.MarketplaceIdList = new IdList();
        request.MarketplaceIdList.Id = new List<string>(new string[] { marketplaceId });

        request.FeedContent = File.Open(path, FileMode.Open, FileAccess.Read);

        request.ContentMD5 = MarketplaceWebServiceClient.CalculateContentMD5(request.FeedContent);
        request.FeedContent.Position = 0;

        request.FeedType = "_POST_ORDER_ACKNOWLEDGEMENT_DATA_";

        MarketplaceWebService.MarketplaceWebService serviceFeed = new MarketplaceWebServiceClient(
                accessKeyId,
                secretAccessKey,
                applicationName,
                applicationVersion,
                configFeed);

        SubmitFeedResponse response = serviceFeed.SubmitFeed(request);

它成功地提交,但是当我打开我的亚马逊顺序(sellercentral.amazon.com)它说:无救:
您的商家订单ID:#无保存

谁能帮我,什么是错还是我应该怎么办?

Who can help me, what is wrong or what should I do?

谢谢!

推荐答案

这其实正确的code。不知怎的,亚马逊并不标志着一些特殊的订单或更高版本标记它们。

It's actually right code. Somehow amazon doesn't mark some special orders or marks them later.

这篇关于在亚马逊的市场更新商家订单ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 07:24