/** * sample_FetchToken::dispatchCall() * * Dispatch the call * * @param array $params array of parameters for the eBay API call * * @return boolean success */ public function dispatchCall($params) { $req = new FetchTokenRequestType(); $req->setSessionID($params['SessionID']); $res = $this->proxy->FetchToken($req); if ($this->testValid($res)) { return array('AuthToken' => $res->getEBayAuthToken(), 'ExpireTime' => $res->getHardExpirationTime()); } else { $this->dumpObject($res); return false; } }
/** * @return FetchTokenResponseType * @param FetchTokenRequestType $request */ function FetchToken($request) { $request->setVersion(EBAY_WSDL_VERSION); return $this->call('FetchToken', $request); }
public function FetchToken($SessionID) { // require_once 'FetchTokenRequestType.php'; // prepare request $req = new FetchTokenRequestType(); $req->setSessionID($SessionID); #$req->setErrorLanguage(0); // send request $res = $this->sp->FetchToken($req); // TODO: handle error if (!$res->eBayAuthToken) { echo "<pre>Error in FetchToken(): "; print_r($res); echo "</pre>"; // echo "<pre>Request: ";print_r($req);echo"</pre>"; return false; } return $res->eBayAuthToken; }