/**
  * Replaces the iframe url with some pattern which will be replaced with the actual url later.
  * This trick is necessary as we need to render iframe block before order
  * placement but we can get the url only when order is already created.          
  * 
  * @see Aitoc_Aitcheckout_Model_Order_Observer::_getPaypalReviewBlockHtml()
  * @return string
  */
 public function getFrameActionUrl()
 {
     // should work only if the extension is enabled and if we are in process of
     // order review block rendering for paypal advanced payment methods
     if (Mage::registry('aitcheckout_paypal_review_block_rendering') && $this->_aitcheckoutIsEnabled()) {
         return self::IFRAME_URL_REPLACEMENT;
     } else {
         return parent::getFrameActionUrl();
     }
 }
Beispiel #2
0
 protected function _construct()
 {
     parent::_construct();
     $paymentCode = $this->_getCheckout()->getQuote()->getPayment()->getMethod();
     if (in_array($paymentCode, $this->helper('paypal/hss')->getHssMethods())) {
         $this->_paymentMethodCode = $paymentCode;
         $templatePath = str_replace('_', '', $paymentCode);
         $templateFile = "lotusbreath/onestepcheckout/paypal/{$templatePath}/iframe.phtml";
         if (file_exists(Mage::getDesign()->getTemplateFilename($templateFile))) {
             $this->setTemplate($templateFile);
         } else {
             $this->setTemplate('lotusbreath/onestepcheckout/paypal/hss/iframe.phtml');
         }
     }
 }
Beispiel #3
0
 /**
  * Internal constructor
  * Set info template for payment step
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $paymentCode = $this->_getCheckout()->getQuote()->getPayment()->getMethod();
     if (in_array($paymentCode, $this->helper('paypal/hss')->getHssMethods())) {
         $this->_paymentMethodCode = $paymentCode;
         $templatePath = str_replace('_', '', $paymentCode);
         $store = Mage::app()->getStore();
         if (Mage::getStoreConfig('onestepcheckout/config/enabled', $store->getId()) == 1) {
             $templateFile = "mw_onestepcheckout/paypal/{$templatePath}/iframe.phtml";
         } else {
             $templateFile = "paypal/{$templatePath}/iframe.phtml";
         }
         if (file_exists(Mage::getDesign()->getTemplateFilename($templateFile))) {
             $this->setTemplate($templateFile);
         } else {
             if (Mage::getStoreConfig('onestepcheckout/config/enabled', $store->getId()) == 1) {
                 $this->setTemplate('mw_onestepcheckout/paypal/hss/iframe.phtml');
             } else {
                 $this->setTemplate('paypal/hss/iframe.phtml');
             }
         }
     }
 }
Beispiel #4
0
 /**
  * Internal constructor
  * Set payment method code
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_paymentMethodCode = Mage_Paypal_Model_Config::METHOD_HOSTEDPRO;
 }