Showing posts with label payment gateway. Show all posts
Showing posts with label payment gateway. Show all posts

Tuesday 18 June 2019

Success page on payment gateway response magento2

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
/**********************/
    } 

}