Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Cancel.php
Go to the documentation of this file.
1 <?php
8 
11 
13 {
17  private $checkoutHelper;
18 
23  public function __construct(
24  Context $context,
25  Checkout $checkoutHelper
26  ) {
27  parent::__construct($context);
28  $this->checkoutHelper = $checkoutHelper;
29  }
30 
36  public function execute()
37  {
38  $this->checkoutHelper->cancelCurrentOrder('');
39  $this->checkoutHelper->restoreQuote();
40 
41  $this->_redirect('checkout', ['_fragment' => 'payment']);
42  }
43 }
_redirect($path, $arguments=[])
Definition: Action.php:167
__construct(Context $context, Checkout $checkoutHelper)
Definition: Cancel.php:23