The paystack token has expired. Please refresh the page and try again.
Iconbanderas opened this issue · comments
Uchenna Joel Icon commented
This keeps happening on laravel 8 and PHP 7.3, Is there a permanent fix? How do we fix the paystack token always getting expired? Or does this not work for test keys?
Ajetunmobi Isaac commented
Some required parameters to initiate the payment might be missing from your $request, you can try output the error
under the catch block to see more details on what went wrong.
You can try this
try {
return Paystack::getAuthorizationUrl()->redirectNow();
} catch (\Exception $e) {
return $e->getMessage(); //Output the error here
echo "The paystack token has expired. Please refresh the page and try again.";
}