paymentpayumoneylaravel-7

tzsk\payu package for laravel 7.3.0 after payment redirect gives 419 error


I have installed version of laravel 7.3.0. and installed a package for payumoney tzsk\payu(4.0). It works well till the payment. after payment done when it redirects back it gives 419 error. This is the url I am getting after payment process done. http://127.0.0.1:8000/tzsk/payment/success?_token=RNZTbKx8Ru1VWa2rasf sad9fq9qLcttbtPvDJXpYM&callback=aHR0cDovLasdfasdfasdfbnQtcGFja2FnZS1wYXltZW50L3N0YXR1cw==

You can also generate this error by installing new laravel and tzsk\payu package.


Solution

  • tzsk have fixed this issue in his package for temporary. Please check at https://github.com/tzsk/payu for more information. Added following code in src/Controllers/PaymentController.php

    class PaymentController extends Controller
    {
        /**
         * Temporarily set cross site on
         */
        public function __construct()
        {
            config(['session.same_site' => null]);
        }