Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Failure.php
Go to the documentation of this file.
1 <?php
7 
13 {
17  protected $_checkoutSession;
18 
24  public function __construct(
25  \Magento\Framework\View\Element\Template\Context $context,
26  \Magento\Checkout\Model\Session $checkoutSession,
27  array $data = []
28  ) {
29  $this->_checkoutSession = $checkoutSession;
30  parent::__construct($context, $data);
31  $this->_isScopePrivate = true;
32  }
33 
37  public function getRealOrderId()
38  {
39  return $this->_checkoutSession->getLastRealOrderId();
40  }
41 
47  public function getErrorMessage()
48  {
49  $error = $this->_checkoutSession->getErrorMessage();
50  return $error;
51  }
52 
58  public function getContinueShoppingUrl()
59  {
60  return $this->getUrl('checkout/cart');
61  }
62 }
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Checkout\Model\Session $checkoutSession, array $data=[])
Definition: Failure.php:24