dragonsun00000 2017-02-28 18:02
浏览 23
已采纳

finditemsinebaystores返回的商品不是我的商店

I send a request xml to find items in my store that has any custom labels set for the seller. But ebay returns a response with a lot of items that not are in my store. How can I do that?

That's my code:

$endpoint = 'http://svcs.ebay.com/services/search/FindingService/v1';
self::get_cvs_array();
$xmlrequest;
$xml_filters = "";
$a = 1;
while ($a < count($this->cvs_array)) {
    $xml_filters .="<itemFilter>
<name>Custom Label</name>
<value>".$this->cvs_array[$a][0]."</value>
</itemFilter>
";
    $a += 1;
}
// Create the XML request to be POSTed
$xmlrequest  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>
";
$xmlrequest .= "<findItemsIneBayStoresRequest xmlns=\"http://www.ebay.com/marketplace/search/v1/services\">
";
$xmlrequest .= "<storeName>myStoreName</storeName>
";
$xmlrequest .= $xml_filters;
$xmlrequest .= "</findItemsIneBayStoresRequest>";

// Set up the HTTP headers
$headers = array(
'X-EBAY-SOA-SERVICE-NAME: FindingService',
'X-EBAY-SOA-OPERATION-NAME: findItemsIneBayStores',
'X-EBAY-SOA-SERVICE-VERSION: 1.3.0',
'X-EBAY-SOA-REQUEST-DATA-FORMAT: XML',
'X-EBAY-SOA-GLOBAL-ID: EBAY-ES',
'X-EBAY-SOA-SECURITY-APPNAME: $myAppId',
'Content-Type: text/xml;charset=utf-8',
);

$session  = curl_init($endpoint);                       // create a curl session
curl_setopt($session, CURLOPT_POST, true);              // POST request type
curl_setopt($session, CURLOPT_HTTPHEADER, $headers);    // set headers using $headers array
curl_setopt($session, CURLOPT_POSTFIELDS, $xmlrequest); // set the body of the POST
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);    // return values as a string, not to std out

$responsexml = curl_exec($session);                     // send the request
curl_close($session); 
  • 写回答

1条回答 默认 最新

  • douyun6399 2017-07-07 08:12
    关注

    The findItemsIneBayStores is for finding items from sellers that have stores.

    To get your own items, you should use GetMyeBaySelling instead.

    In this call, you can use

    <ActiveList>
        <Include>true</Include>
    </ActiveList>
    

    to get only your Active List (will not include the Sold, Unsold, etc.). You will find all the documentation needed here

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办