/**
  * @access public
  * @param string $value
  * @param string $domain
  * @param string $country
  * @throws Exception
  */
 public static function setEnvironment($value = 'sandbox', $domain = 'payu.pl', $country = 'pl')
 {
     $value = Tools::strtolower($value);
     $domain = Tools::strtolower($domain);
     $country = Tools::strtolower($country);
     if ($value == 'sandbox' || $value == 'secure') {
         self::$env = $value;
         self::$service_domain = $domain;
         self::$service_url = 'https://' . $value . '.' . $domain . '/' . $country . '/standard/';
         self::$summary_url = self::$service_url . 'co/summary';
         self::$auth_url = self::$service_url . 'oauth/user/authorize';
     } else {
         if ($value == 'custom') {
             self::$env = $value;
             self::$service_url = $domain . '/' . $country . '/standard/';
             self::$summary_url = self::$service_url . 'co/summary';
             self::$auth_url = self::$service_url . 'oauth/user/authorize';
         } else {
             throw new Exception('Invalid value:' . $value . ' for environment. Proper values are: "sandbox" or "secure".');
         }
     }
 }