/** * Set Country * * @since 1.0.0 * @param string $countryCode * @return \Icepay_Pbm_Object * @throws Exception */ public function setCountry($countryCode) { if (!Icepay_ParameterValidation::country($countryCode)) { throw new Exception('Please enter a valid country format (ISO 3166-1)', 1005); } $this->country = $countryCode; return $this; }
/** * 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 (!Icepay_ParameterValidation::country($country)) { throw new Exception('Country not valid'); } $this->data->ic_country = $country; return $this; }