gpt4 book ai didi

php - 亚马逊 MWS : Errors with new 2013 ListOrders API

转载 作者:行者123 更新时间:2023-12-01 13:36:10 25 4
gpt4 key购买 nike

我正在从以下位置升级我的亚马逊订单下载脚本:$serviceUrl = "https://mws-eu.amazonservices.com/Orders/2011-01-01 "到$serviceUrl = "https://mws-eu.amazonservices.com/Orders/2013-09-01 "

部分参数由数组变为字符串。

使用 ListOrdersSample.php 我试图只下载未发货和部分发货的订单,但我在格式化变量时遇到困难。

在便签本中我看到:

OrderStatus.Status.1=未发货OrderStatus.Status.2=部分发货

我试过:

//$orderStatuses='OrderStatus.Status.1=Unshipped,OrderStatus.Status.2=PartiallyShipped';
// $orderStatuses='Unshipped:PartiallyShipped';
// $orderStatuses='Unshipped&PartiallyShipped';
// $orderStatuses= (array("Unshipped", "PartiallyShipped"));
$orderStatuses='Unshipped';
$request->setOrderStatus($orderStatuses);

所有版本的分隔符似乎都失败并出现类似的错误:

Caught Exception: 1 validation error detected: Value '[Unshipped&PartiallyShipped]' at 'orderStatus' failed to satisfy constraint: Member must satisfy constraint: [Member must satisfy enum value set: [Unfulfillable, PartiallyShipped, PendingAvailability, Shipped, Pending, InvoiceUnconfirmed, Canceled, Unshipped]]

唯一可以工作的是未注释的 Unshipped 本身然后我收到错误:

Caught Exception: Unshipped and PartiallyShipped should be used together when filtering by OrderStatus. You cannot use one and not the other.

我在尝试列出多个 marketplaceid 时遇到了类似的问题。

任何帮助将不胜感激

最佳答案

我终于让它工作了。如果有人感兴趣,多项字符串的格式是:

$marketplaceIdList=(array('A1F83G8C2ARO7P','A13V1IB3VIYZZH','A1PA6795UKMFR9','APJ6JRA9NG5V4','A1RKKUPIHCS9HS','ATVPDKIKX0DER')); 
$request->setMarketplaceId($marketplaceIdList);

$orderStatuses=(array('Unshipped','PartiallyShipped'));
$request->setOrderStatus($orderStatuses);

invokeListOrders($service, $request);

关于php - 亚马逊 MWS : Errors with new 2013 ListOrders API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43211187/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com