Answer the question
In order to leave comments, you need to log in
How to call getSellerProfiles in Ebay API?
Tell me how to call getSellerProfiles in the Ebay API?
I try using standard methods, like all other requests, to execute using PHP
$xml='<?xml version="1.0" encoding="utf-8"?>';
$xml.='<getSellerProfilesRequest xmlns="urn:ebay:apis:eBLBaseComponents">';
$xml.='<RequesterCredentials>';
$xml.='<eBayAuthToken>'.$data_user['ebay_token'].'</eBayAuthToken>';
$xml.='</RequesterCredentials>';
$xml.='<profileType>PAYMENT</profileType>';
$xml.='</getSellerProfilesRequest>';
$headers=array(
'Content-Type: text/xml',
'X-EBAY-API-COMPATIBILITY-LEVEL: 1085',
'X-EBAY-API-DEV-NAME: '.$data_dev['ebay_dev_id'],
'X-EBAY-API-APP-NAME: '.$data_dev['ebay_app_id'],
'X-EBAY-API-CERT-NAME: '.$data_dev['ebay_cert_id'],
'X-EBAY-API-SITEID: 0',
'X-EBAY-API-CALL-NAME: getSellerProfiles'
);
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,"https://api.ebay.com/ws/api.dll");
curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);
curl_setopt($ch,CURLOPT_POSTFIELDS,"xmlRequest=".$xml);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
curl_setopt($ch,CURLOPT_HEADER,FALSE);
curl_setopt($ch,CURLOPT_POST,TRUE);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,30);
$content=curl_exec($ch);
curl_close($ch);
$obj=simplexml_load_string($content);
var_dump($obj);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question