/**
  * sample_GetSessionID::dispatchCall()
  * 
  * Dispatch the call
  *
  * @param array $params array of parameters for the eBay API call
  * 
  * @return boolean success
  */
 public function dispatchCall($params)
 {
     $req = new GetSessionIDRequestType();
     $req->setRuName($params['RuName']);
     $res = $this->proxy->GetSessionID($req);
     if ($this->testValid($res)) {
         $this->dumpObject($res);
         return true;
     } else {
         return false;
     }
 }
 /**
  * @return GetSessionIDResponseType
  * @param GetSessionIDRequestType $request 
  */
 function GetSessionID($request)
 {
     $request->setVersion(EBAY_WSDL_VERSION);
     return $this->call('GetSessionID', $request);
 }
예제 #3
0
 public function GetSessionID($RuName)
 {
     // require_once 'GetSessionIDRequestType.php';
     // prepare request
     $req = new GetSessionIDRequestType();
     $req->setRuName($RuName);
     #$req->setErrorLanguage('en_US');
     // send request
     $res = $this->sp->GetSessionID($req);
     // handle errors like blocked ips
     if ($res->Ack != 'Success') {
         echo "<h1>Problem connecting to eBay</h1>";
         echo "<p>WP-Lister can't seem to establish a connection to eBay's servers. This could be caused by a firewall blocking cURL from accessing unkown ip addresses.</p>";
         echo "<p>Only your hosting company can sort out the problems causing cURL not to connect properly. Your hosting company's server administrator should be able to resolve the permission problems preventing cURL from working. They've probably got overly limiting restrictions configured on the server, preventing it from being able to do the communication required for listing items on eBay.</p>";
         echo "<p>debug output:</p>";
         echo "<pre>";
         print_r($res);
         echo "</pre>";
         echo "<pre>";
         print_r($req);
         echo "</pre>";
         die;
     }
     // TODO: handle error
     return $res->SessionID;
 }