/** * Validate the merchant settings * * @since 1.0.0 * @throws Exception */ private function validateSettings() { // Validate Merchant ID if (!Icepay_Parameter_Validation::merchantID($this->getMerchantID())) { throw new Exception('Merchant ID not set, use the setMerchantID() method', 1001); } // Validate SecretCode if (!Icepay_Parameter_Validation::secretCode($this->getSecretCode())) { throw new Exception('Secretcode ID not set, use the setSecretCode() method', 1002); } }
/** * Set the Secret Code field * @since 1.0.0 * @access public * @param (string) $secretCode */ public function setSecretCode($secretCode) { if (!Icepay_Parameter_Validation::secretCode($secretCode)) { throw new Exception('Secretcode not valid'); } $this->_secretCode = (string) $secretCode; return $this; }