I am using Laravel 7 and using PayTabs payment gateway for payments. When the user is redirected back from the Paytabs, all the sessions and Auth are cleared.
Before redirecting to the Paytabs, im saving the session when the data is put in the session. as
Session::put('data', $data);
Session::save();
And the redirection to Paytabs is as follows:
if ($response->response_code == "4012") { //Page created
return redirect()->to($response->payment_url);
} else {
abort(404);
}
I have also excluded the return url from CSRF Token check as follow:
VerifyCsrfToke.php
protected $except = [
'/paytab_return'
];
Also I have checked that the Paytabs redirects to the correct URL with https and www.
Favor needed to tackle this issue. Thanks
This worked for Laravel 6.19.1:
The URL I'd got is e.g.
as the url, where self_service_local_vnr_session is my session cookie name and qNSQ7SessionIdtEA3Z72ReuvgsFt the ID of the current session.
I hope it'll help someone, who lands on this page :)