您好 我已经使用Feed API在亚马逊上成功发布了该产品。 并使用Product API显示它。 现在我想从我的亚马逊账户获取订单,我不知道订单将如何进入我的亚马逊账户,因为我的产品不是真正的亚马逊。
如何使用 Orders API 来获取订单,因为我已完成配置文件中的所有配置。 当我从浏览器运行 ListOrdersSample.php 时,我得到了这个..
服务响应============================================= ================================ 2016-05-30T10:33:56Z 7cc5f86a-ec24-4d36-a900-fa21db182bf1 ResponseHeaderMetadata:RequestId:7cc5f86a-ec24-4d36-a900-fa21db182bf1,ResponseContext:F8uplH1mr6LUvjmxUr81VMn7SfvW93P / jNGwvRnzFVcM9SmGP / HrET + C0oLTOdNaBiMieGX / fz8k W / bb / d + e4A ==,时间戳:2016-05-30T10:35:55.939Z,配额最大值:,Quota Remaining :, Quota Resets At:
以下是运行 ListOrdersSample.php 的代码。
<?php
require_once('.config.inc.php');
// Europe
$serviceUrl = "https://mws-eu.amazonservices.com/Orders/2013-09-01";
$config = array (
'ServiceURL' => $serviceUrl,
'ProxyHost' => null,
'ProxyPort' => -1,
'ProxyUsername' => null,
'ProxyPassword' => null,
'MaxErrorRetry' => 3,
);
$service = new MarketplaceWebServiceOrders_Client(
AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY,
APPLICATION_NAME,
APPLICATION_VERSION,
$config);
***********************************************************************/
// @TODO: set request. Action can be passed as MarketplaceWebServiceOrders_Model_ListOrders
$request = new MarketplaceWebServiceOrders_Model_ListOrdersRequest();
$request->setSellerId(MERCHANT_ID);
$request->setMarketplaceId(MARKETPLACE_ID);
$request->setCreatedAfter('2016-04-01');
// object or array of parameters
invokeListOrders($service, $request);
function invokeListOrders(MarketplaceWebServiceOrders_Interface $service, $request)
{
try {
$response = $service->ListOrders($request);
echo ("Service Response\n");
echo ("=============================================================================\n");
$dom = new DOMDocument();
$dom->loadXML($response->toXML());
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
echo $dom->saveXML();
echo("ResponseHeaderMetadata: " . $response->getResponseHeaderMetadata() . "\n");
} catch (MarketplaceWebServiceOrders_Exception $ex) {
echo("Caught Exception: " . $ex->getMessage() . "\n");
echo("Response Status Code: " . $ex->getStatusCode() . "\n");
echo("Error Code: " . $ex->getErrorCode() . "\n");
echo("Error Type: " . $ex->getErrorType() . "\n");
echo("Request ID: " . $ex->getRequestId() . "\n");
echo("XML: " . $ex->getXML() . "\n");
echo("ResponseHeaderMetadata: " . $ex->getResponseHeaderMetadata() . "\n");
}
}
请帮我解决这个问题。谢谢你。