unicodeveloper / laravel-paystack

:credit_card: :package: :moneybag: Laravel 6, 7, 8, 9, 10 and 11 Package for Paystack

Home Page:https://paystack.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Iconbanderas opened this issue · comments

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?

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