首页 > 解决方案 > 通过 PHP API 和 meertensm/amazon-mws 包更新亚马逊 MWS 上的产品

问题描述

我正在将 MWS PHP API 集成到 Symfony 包中。我正在利用https://github.com/meertensm/amazon-mws和 postProduct 操作(请在此处查看https://github.com/meertensm/amazon-mws/blob/master/src/MWSClient.php# L916 )

我创建了一个包含许多产品的数组。每个项目都已通过MWSProduct->validate函数进行验证,并且没有返回错误。因此,根据 Meertens 的代码(配置文件https://stackoverflow.com/users/3971353/michiel-meertens),阵列的每个产品都是结构良好的产品。

然后,我通过 MWSClient->postProduct 处理了产品数组,并存储了 $response['SubmitFeedResult']['FeedSubmissionInfo'] 的返回值。

几分钟后,我通过 MWSClient->GetFeedSubmissionResult 请求提交的提要的状态,并获得以下结果:

Array (
    [DocumentTransactionID] => 56076017993
    [StatusCode] => Complete
    [ProcessingSummary] => Array (
        [MessagesProcessed] => 0
        [MessagesSuccessful] => 0
        [MessagesWithError] => 1
        [MessagesWithWarning] => 0 
    )
    [Result] => Array (
        [MessageID] => 9223372036854775807
        [ResultCode] => Error
        [ResultMessageCode] => 50001
        [ResultDescription] => The XML you submitted is ill-formed at the Amazon Envelope XML level at (or near) line 2, column 185.
    )
)

如您所见,我遇到了格式错误的 XML 请求的错误。请问你知道为什么吗?

标签: phpsymfonyamazonamazon-mws

解决方案


推荐阅读