/** * Retrieve information from payment configuration * * @param string $field * @return mixed */ public function getConfigData($field, $storeId = null) { return parent::getConfigData($field, $storeId); }
/** * we deactivate this payment method if it was aborted before * * @return bool */ public function canUseCheckout() { $aborted = Mage::getSingleton('checkout/session')->getData('sofort_aborted') == 1; return !$aborted && parent::canUseCheckout(); }
/** * validates data of the payment form on server side * */ public function validate() { parent::validate(); $session = Mage::getSingleton('core/session'); if (Mage::getStoreConfig('payment/sofort_ideal/ask_holder')) { if (!$session->getIdealHolder()) { Mage::throwException(Mage::helper('pnsofortueberweisung')->__('Please fill out the account holder')); } if (!$session->getIdealAccountNumber()) { Mage::throwException(Mage::helper('pnsofortueberweisung')->__('Please fill out the account number')); } } if (!$session->getIdealBankCode()) { Mage::throwException(Mage::helper('pnsofortueberweisung')->__('Please fill out the bank code')); } return $this; }
public function validate() { parent::validate(); $session = Mage::getSingleton('core/session'); if (!$session->getLsHolder()) { Mage::throwException(Mage::helper('pnsofortueberweisung')->__('Please fill out the account holder')); } if (!$session->getLsAccountNumber()) { Mage::throwException(Mage::helper('pnsofortueberweisung')->__('Please fill out the account number')); } if (!$session->getLsBankCode()) { Mage::throwException(Mage::helper('pnsofortueberweisung')->__('Please fill out the bank code')); } return $this; }