Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The paystack token has expired. Please refresh the page and try again. #158

Open
Iconbanderas opened this issue Mar 8, 2022 · 1 comment

Comments

@Iconbanderas
Copy link

Iconbanderas commented Mar 8, 2022

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?

@iNerdStack
Copy link

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.";
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants