Witam
Napisałem skrypt do pobierania danych z eBay przez SOAP ale mam problem.
<?
include("lib/nusoap.php");
$token = 'tu token z eBay';
$devId = '1 kod z ebay';
$appId = '2 kod z ebay';
$certId = '3 kod z ebay';
$wsdl_url = 'http://developer.ebay.com/webservices/393/eBaySvc.wsdl';
$client = new SOAPClient
($wsdl_url, array('trace' => 1, 'exceptions' => 0, ));
class eBayAuth {
function __construct($token, $dev, $app, $cert) {
$credentials = new eBayCredentials($dev, $app, $cert);
$this->eBayAuthToken = new SoapVar($token, XSD_STRING,
NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents');
$this->Credentials = new SoapVar($credentials,
SOAP_ENC_OBJECT, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents');
}
}
class eBayCredentials {
function __construct($dev, $app, $cert) {
$this->AppId = $app;
$this->DevID = $dev;
$this->AuthCert = $cert;
}
}
$eBayAuth = new eBayAuth($token, $devId, $appId, $certId);
$header_body = new SoapVar($eBayAuth, SOAP_ENC_OBJECT);
$header = array(new SOAPHeader
('urn:ebay:api:eBLBaseComponents', 'RequesterCredentials', $header_body));
$params = array('Version' => 393, 'DetailLevel' => 'ReturnAll', 'UserID' => 'login z eBay');
$user = $client->__call('GetFeedback', $params, NULL, $header);
?>
Można czymś zastąpić funkcje
SoapVar? Ponieważ jak się nie myle tylko w php5.
Dziękuję za odpowiedzi