Esempio n. 1
0
 /**
  * Calls the GetMid SOPG web service method.
  * 
  * @param username
  *          Username to use for the web service call.
  * @param password
  *          Password to use for the web service call.
  * @param currency
  *          Currency to use for the web service call. It must contain a 3
  *          letter ISO 4217 currency code.
  * @return Response containing mid configured for the given currency. The call
  *         was successful if resultCode and errorCode of the response are 0.
  *         For list of possible error codes refer to merchant documentation.
  * @throws InvalidArgumentException
  *           If required parameters are null or empty.
  */
 public function getMid($username, $password, $currency)
 {
     Validators::validateStringNotNull($username, 'username');
     Validators::validateStringNotNull($password, 'password');
     Validators::validateCurrency($currency);
     $params = array('username' => $username, 'password' => $password, 'currency' => strtoupper($currency));
     $response = $this->client->getMid($params);
     return $response->getMidReturn;
 }