/** * Start MEP Checkout * * @return void */ public function indexAction() { try { $this->_initCheckout(); $reservedOrderId = $this->_checkout->initCheckout(); $this->_message($this->__('Checkout has been initialized.'), self::MESSAGE_STATUS_SUCCESS); return; } catch (Mage_Core_Exception $e) { $this->_message($e->getMessage(), self::MESSAGE_STATUS_ERROR); } catch (Exception $e) { $this->_message($this->__('Unable to start MEP Checkout.'), self::MESSAGE_STATUS_ERROR); Mage::logException($e); } }
/** * Start MEP Checkout * * @return null */ public function indexAction() { try { if (is_object(Mage::getConfig()->getNode('modules/Enterprise_GiftCardAccount'))) { $giftcardInfoBlock = $this->getLayout()->addBlock('enterprise_giftcardaccount/checkout_onepage_payment_additional', 'giftcard_info'); if (intval($giftcardInfoBlock->getAppliedGiftCardAmount())) { $this->_message($this->__('Paypal MEP doesn\'t support checkout with any discount.'), self::MESSAGE_STATUS_ERROR); return; } } $this->_initCheckout(); $this->_checkout->initCheckout(); $this->_message($this->__('Checkout has been initialized.'), self::MESSAGE_STATUS_SUCCESS); return; } catch (Mage_Core_Exception $e) { $this->_message($e->getMessage(), self::MESSAGE_STATUS_ERROR); } catch (Exception $e) { $this->_message($this->__('Unable to start MEP Checkout.'), self::MESSAGE_STATUS_ERROR); Mage::logException($e); } }