我正在尝试获得sku产品的可用库存.我搜索了很多,发现一些pdf不是他们为我工作.我不知道该怎么做,任何人都可以帮助我,我会更感恩.我也试过这段代码,
$skus = new FBAInventoryServiceMWS_Model_SellerSkuList();
$skus->setmember( 'sku-111' );
invokeListInventorySupply($service, $request->withSellerSkus( $skus ) );
Run Code Online (Sandbox Code Playgroud)
但它返回的是InStockSupplyQuantity是0你可以在这个链接上看到
这是我正在使用的完整版代码,
<?php
include_once ('.config.inc.php');
$config = array (
'ServiceURL' => MWS_ENDPOINT_URL,
'ProxyHost' => null,
'ProxyPort' => -1,
'MaxErrorRetry' => 3
);
$service = new FBAInventoryServiceMWS_Client(
ACCESS_KEY_ID,
SECRET_ACCESS_KEY,
$config,
APPLICATION_NAME,
APPLICATION_VERSION);
$request = new FBAInventoryServiceMWS_Model_ListInventorySupplyRequest();
$request->setSellerId(SELLER_ID);
$skus = new FBAInventoryServiceMWS_Model_SellerSkuList();
$skus->setmember( 'sku-111' );
invokeListInventorySupply($service, $request->withSellerSkus( $skus ) );
function invokeListInventorySupply(FBAInventoryServiceMWS_Interface $service, $request)
{
try {
$response = $service->listInventorySupply($request);
echo ("Service Response<br />");
echo ("=============================================================================<br />"); …Run Code Online (Sandbox Code Playgroud)