/** * Retreive payment method instance * * @return Mage_Payment_Model_Method_Abstract */ public function getPaymentMethodInstance() { if (is_null($this->_paymentMethodInstance)) { $this->_paymentMethodInstance = Mage::helper('payment')->getMethodInstance($this->getMethodCode()); } $this->_paymentMethodInstance->setStore($this->getStoreId()); return $this->_paymentMethodInstance; }
/** * Retreive payment method instance * * @return Mage_Payment_Model_Method_Abstract */ public function getPaymentMethodInstance() { if (is_null($this->_paymentMethodInstance)) { $this->_paymentMethodInstance = Mage::helper('Mage_Payment_Helper_Data')->getMethodInstance($this->getMethodCode()); } if ($this->_paymentMethodInstance) { $this->_paymentMethodInstance->setStore($this->getStoreId()); } return $this->_paymentMethodInstance; }
/** * Return payment method instance * * @return Mage_Payment_Model_Method_Abstract */ protected function getMethodInstance() { if (!$this->_methodInstance) { $this->setMethodInstance(Mage::helper('payment')->getMethodInstance($this->getMethodCode())); } $this->_methodInstance->setStore($this->getStoreId()); return $this->_methodInstance; }
/** * Return the payment method instance. * * @return Mage_Payment_Model_Method_Abstract */ public function getMethodInstance() { if ($this->_methodInstance == null && $this->getMethodCode() != null) { $this->setMethodInstance(Mage::helper('payment')->getMethodInstance($this->getMethodCode())); } if ($this->_methodInstance != null) { $this->_methodInstance->setStore($this->getStoreId()); } return $this->_methodInstance; }
/** * Retreive payment method instance * * @return Mage_Payment_Model_Method_Abstract */ public function getPaymentMethodInstance() { if (is_null($this->_paymentMethodInstance)) { $methodCode = $this->getMethodCode(); $referenceId = $this->getReferenceId(); $methodInstanceName = $methodCode . "_" . $referenceId; $this->_paymentMethodInstance = Mage::helper('payment')->getMethodInstance($methodInstanceName); } if ($this->_paymentMethodInstance) { $this->_paymentMethodInstance->setStore($this->getStoreId()); } return $this->_paymentMethodInstance; }