예제 #1
0
 /**
  * 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;
 }
예제 #2
0
 /**
  * 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;
 }
예제 #3
0
 /**
  * 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;
 }
예제 #4
0
 /**
  * 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;
 }
예제 #5
0
 /**
  * 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;
 }