コード例 #1
0
 /**
  * Issue an unsigned API call. As the unsigned API contains a huge array of
  * functions we will use the call() method directly for the majority of
  * operations. The data in params will be matched into the parameters of
  * the outgoing call. Take care when supplying the arguments for the call
  * so they match the function prototype properly.
  *
  * @param string $method API method to call
  *
  * @param Trustly_Data_JSONRPCRequest $params Outgoing call params
  *
  * @return Trustly_Data_JSONRPCResponse Response from the API.
  */
 public function call($method, $params = NULL)
 {
     $request = new Trustly_Data_JSONRPCRequest($method);
     if (isset($params)) {
         foreach ($params as $key => $value) {
             $request->setParam($key, $value);
         }
     }
     if (!$this->hasSessionUUID()) {
         $this->newSessionCookie();
     }
     return parent::call($request);
 }