inplement csrf interface in controller
class Success extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface
{
protected $_order;
protected $order;
protected $pageFactory;
protected $salesOrder;
protected $checkoutSession;
public function __construct(Context $context)
{
parent::__construct($context);
}
public function createCsrfValidationException(
RequestInterface $request
): ?InvalidRequestException {
return null;
}
public function validateForCsrf(RequestInterface $request): ?bool
{
return true;
}
public function execute()
{
/**********************/
write your code
/**********************/
}
}
class Success extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface
{
protected $_order;
protected $order;
protected $pageFactory;
protected $salesOrder;
protected $checkoutSession;
public function __construct(Context $context)
{
parent::__construct($context);
}
public function createCsrfValidationException(
RequestInterface $request
): ?InvalidRequestException {
return null;
}
public function validateForCsrf(RequestInterface $request): ?bool
{
return true;
}
public function execute()
{
/**********************/
write your code
/**********************/
}
}