Ciao a tutti mi sto avvicinando alle api di ebay, ho incontrato un piccolo problema, che però non viene spiegato nei vari tutorial ufficali, ossia come estraggo un singolo valore dal getsellertransaction?
questo è il codice che ho scritto:
codice HTML:
<?phpfunction print_d($array){ echo "<pre>\n"; print_r($array); echo "</pre>\n";}
$mytoken = "xxx";$devId = "xxx";$appId = "xxx";$certId = "xxx";$wsdl_url = 'http://developer.ebay.com/webservices/latest/ebaySvc.wsdl';$from_time='2013-10-12';$to_time='2013-11-11';$apiCall = "GetSellerTransactions";$credentials = array('AppId' => $appId, 'DevID' => $devId, 'AuthCert' => $certId);
$client = new SOAPClient($wsdl_url, array('trace' => 1, 'exceptions' => 0, 'location' => "https://api.ebay.com/wsapi?callname=$apiCall&appid=$appId&siteid=101&version=803&Routing=new"));$eBayAuth = array('eBayAuthToken' => new SoapVar($mytoken, XSD_STRING, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents'), 'Credentials' => new SoapVar ($credentials, SOAP_ENC_OBJECT, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents')); $header_body = new SoapVar($eBayAuth, SOAP_ENC_OBJECT); $header = array(new SOAPHeader('urn:ebay:apis:eBLBaseComponents', 'RequesterCredentials', $header_body));
$params = array('Version' => 803, 'DetailLevel' => 'ReturnSummary', 'ModTimeFrom'=>$from_time,'ModTimeTo'=>$to_time,'IncludeContainingOrder'=>'true'); //set the API call parameters$params['UserID'] = isset($_REQUEST['userID']) && ($_REQUEST['userID']) ? $_REQUEST['userID'] : NULL;$request = $client->__soapCall($apiCall, array($params), NULL, $header); //make the actual API call
print_d($request); // print the API call results in a nice readable format//echo "<br><br><br><br>REQUEST:\n" . htmlentities($client->__getLastRequest()) . "\n"; // this lets you view the XML of your last call which can be helpful?>
questo invece è il risultato; come faccio ad esempio a mostrare a video solo username dell'acquirente?
grazie mille a tutti