Esempio n. 1
0
 /**
  * Set Country
  * 
  * @since 1.0.0
  * @param string $countryCode
  * @return Object
  * @throws \Exception
  */
 public function setCountry($countryCode)
 {
     if (!ParameterValidation::country($countryCode)) {
         throw new \Exception('Please enter a valid country format (ISO 3166-1)', 1005);
     }
     $this->country = $countryCode;
     return $this;
 }
Esempio n. 2
0
 /**
  * Set the country field
  * @since version 1.0.0
  * @access public
  * @param string $currency Country ISO 3166-1-alpha-2 code !Required
  * @example setCountry("NL") // Netherlands
  */
 public function setCountry($country)
 {
     $country = strtoupper($country);
     if (!ParameterValidation::country($country)) {
         throw new \Exception('Country not valid');
     }
     $this->data->ic_country = $country;
     return $this;
 }