getToken(); if ($token === null) { return; } $url = $this->_checkout->getRedirectUrl(); if ($token && $url) { $this->_initToken($token); $this->getResponse()->setRedirect($url); return; } } catch (\Magento\Framework\Exception\LocalizedException $e) { $this->messageManager->addExceptionMessage($e, $e->getMessage()); } catch (\Exception $e) { $this->messageManager->addExceptionMessage( $e, __('We can\'t start Express Checkout.') ); } $this->_redirect('checkout/cart'); } }