Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CancelPayment.php
Go to the documentation of this file.
1 <?php
8 
12 
14 {
21  return null;
22  }
23 
27  public function validateForCsrf(RequestInterface $request): ?bool
28  {
29  return true;
30  }
31 
37  public function execute()
38  {
39  $this->_view->loadLayout(false);
40  $gotoSection = $this->_cancelPayment();
41  $redirectBlock = $this->_view->getLayout()->getBlock($this->_redirectBlockName);
42  $redirectBlock->setGotoSection($gotoSection);
43  $this->_view->renderLayout();
44  }
45 }
createCsrfValidationException(RequestInterface $request)