/** * Check and prepare payment method model * * @return bool */ protected function _canUseMethod($method) { if (!$method || !$method->canUseCheckout()) { return false; } return parent::_canUseMethod($method); }
protected function _canUseMethod($method) { $allowedMethods = explode(',', Mage::getStoreConfig('occ/configuration/payment_methods')); if (!in_array($method->getCode(), $allowedMethods)) { return false; } return parent::_canUseMethod($method); }
protected function _canUseMethod($method) { $methods_to_check = explode(',', Mage::getStoreConfig('byjuno/risk/payment', Mage::app()->getStore())); if (in_array($method->getCode(), $methods_to_check) === true) { if (Mage::getStoreConfig('byjuno/risk/status' . $this->getQuote()->getByjunoStatus(), Mage::app()->getStore()) == 0) { return false; } } return parent::_canUseMethod($method); }
/** * Check and prepare payment method model * * @return bool */ protected function _canUseMethod($method) { if (!$method || !$method->canUseCheckout()) { return false; } if ($this->availableMethods != null && !in_array($method->getCode(), $this->availableMethods)) { return false; } return parent::_canUseMethod($method); }
/** * Check and prepare payment method model * @return bool */ protected function _canUseMethod($method) { //shipping method $sm = $this->getQuote()->getShippingAddress()->getShippingMethod(); $sTemp = explode('_', $sm); //is it sheepla's method if ($sTemp[0] == 'sheepla') { //if so get check if $method is available with current shipping method //Mage::log($method); $cString = "sheepla/{$sTemp[1]}_{$sTemp[2]}"; $conf = Mage::getStoreConfig($cString); //Mage::log($conf); if (strpos($conf['payment'], $method->getCode()) === false) { return false; } } if (!$method || !$method->canUseCheckout()) { return false; } return parent::_canUseMethod($method); }