/**
  * Set the API url for the request.
  *
  * @param string $url
  * @throws Everypay\Exception\InvalidArgumentException
  */
 public static function setApiUrl($url)
 {
     $apiUrl = filter_var($url, FILTER_VALIDATE_URL);
     if (!$apiUrl) {
         throw new Exception\InvalidArgumentException('API URL should be a valid url');
     }
     self::$apiUrl = rtrim($url, '\\/');
 }
Esempio n. 2
0
 /**
  * Reset Everypay class to its default values
  *
  * @return void
  */
 public static function reset()
 {
     self::$apiKey = null;
     self::$isTest = false;
     self::$throwExceptions = false;
 }