Exemplo n.º 1
0
 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'));
         }
     }
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 public function validate()
 {
     parent::validate();
 }