Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/236.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php FindItemsInBayStores返回不适用于我的商店的项目_Php_Api_Curl_Ebay Api - Fatal编程技术网

Php FindItemsInBayStores返回不适用于我的商店的项目

Php FindItemsInBayStores返回不适用于我的商店的项目,php,api,curl,ebay-api,Php,Api,Curl,Ebay Api,我发送了一个xml请求,以查找商店中为卖家设置了自定义标签的商品。但是ebay返回的回复中有很多不在我的店铺中的物品。 我该怎么做 这是我的密码: $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请求,以查找商店中为卖家设置了自定义标签的商品。但是ebay返回的回复中有很多不在我的店铺中的物品。 我该怎么做

这是我的密码:

$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>\n<name>Custom Label</name>\n<value>".$this->cvs_array[$a][0]."</value>\n</itemFilter>\n";
    $a += 1;
}
// Create the XML request to be POSTed
$xmlrequest  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
$xmlrequest .= "<findItemsIneBayStoresRequest xmlns=\"http://www.ebay.com/marketplace/search/v1/services\">\n";
$xmlrequest .= "<storeName>myStoreName</storeName>\n";
$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); 
$endpoint=>http://svcs.ebay.com/services/search/FindingService/v1';
self::get_cvs_array();
$xmlrequest;
$xml_过滤器=”;
$a=1;
而($acvs_数组)){
$xml\u filters.=“\n自定义标签\n”。$this->cvs\u数组[$a][0]。“\n\n”;
$a+=1;
}
//创建要发布的XML请求
$xmlrequest=“\n”;
$xmlrequest.=“\n”;
$xmlrequest.=“myStoreName\n”;
$xmlrequest.=$xml\u过滤器;
$xmlrequest.=”;
//设置HTTP头
$headers=数组(
“X-EBAY-SOA-SERVICE-NAME:FindingService”,
“X-EBAY-SOA-OPERATION-NAME:FindItemsInbayStores”,
“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',
'内容类型:text/xml;字符集=utf-8',
);
$session=curl_init($endpoint);//创建一个curl会话
curl_setopt($session,CURLOPT_POST,true);//后请求类型
curl_setopt($session,CURLOPT_HTTPHEADER,$headers);//使用$headers数组设置标题
curl_setopt($session,CURLOPT_POSTFIELDS,$xmlrequest);//设置柱体
curl_setopt($session,CURLOPT_RETURNTRANSFER,true);//以字符串形式返回值,而不是标准输出
$responsexml=curl_exec($session);//发送请求
会议结束($会议);

findItemsIneBayStores用于从拥有店铺的卖家处查找商品

要获得自己的物品,应该使用GetMyeBaySelling

在此调用中,您可以使用

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