/** * Update Order (combined action for ajax and regular request) */ public function updateShippingMethodsAction() { try { $this->_initCheckout(); $this->_checkout->prepareOrderReview($this->_initToken()); $this->loadLayout('paypal_express_review'); $this->getResponse()->setBody($this->getLayout()->getBlock('express.review.shipping.method')->setQuote($this->_getQuote())->toHtml()); return; } catch (Mage_Core_Exception $e) { $this->_getSession()->addError($e->getMessage()); } catch (Exception $e) { $this->_getSession()->addError($this->__('Unable to update Order data.')); Mage::logException($e); } $this->getResponse()->setBody('<script type="text/javascript">window.location.href = ' . Mage::getUrl('*/*/review') . ';</script>'); }
/** * Review order after returning from PayPal */ public function reviewAction() { try { $this->_initCheckout(); $this->_checkout->prepareOrderReview($this->_initToken()); $this->loadLayout(); $this->_initLayoutMessages('paypal/session'); $this->getLayout()->getBlock('paypal.express.review')->setQuote($this->_getQuote())->getChild('details')->setQuote($this->_getQuote()); $this->renderLayout(); return; } catch (Mage_Core_Exception $e) { Mage::getSingleton('checkout/session')->addError($e->getMessage()); } catch (Exception $e) { Mage::getSingleton('checkout/session')->addError($this->__('Unable to initialize Express Checkout review.')); Mage::logException($e); } $this->_redirect('checkout/cart'); }