public function validate() { parent::validate(); $info = $this->getInfoInstance(); $hppType = $info->getCcType(); // validate if the ideal bank is chosen if ($hppType == "ideal") { if ($info->getPoNumber() == "") { // hpp type is empty throw error Mage::throwException(Mage::helper('adyen')->__('You chose an invalid bank')); } } }
public function validate() { parent::validate(); // check if validator is on $ibanValidation = $this->_getConfigData("validate_iban", "adyen_sepa"); if ($ibanValidation) { $info = $this->getInfoInstance(); $sepa = unserialize($info->getPoNumber()); if (!$this->validateIban($sepa['iban']) || empty($sepa['iban'])) { $errorCode = 'invalid_data'; $errorMsg = Mage::helper('adyen')->__('Invalid Iban number.'); Mage::throwException($errorMsg); } } return $this; }
public function validate() { parent::validate(); }