/** * Instantiate quote and checkout * * @return EbayEnterprise_PayPal_CheckoutController * @throws Mage_Core_Exception */ protected function _initCheckout() { $quote = $this->_getQuote(); if (!$quote->hasItems() || $quote->getHasError()) { $this->getResponse()->setHeader('HTTP/1.1', '403 Forbidden'); Mage::throwException($this->_helper->__('Unable to initialize Express Checkout.')); } $this->_checkout = Mage::getSingleton('ebayenterprise_paypal/express_checkout', array('helper' => $this->_helper, 'logger' => null, 'config' => $this->_config, 'quote' => $quote)); $this->_checkout->setCustomerSession(Mage::getSingleton('customer/session')); return $this->_checkout; }