kingflamez/laravelrave

Too many redirects when you close modal before payments

matovu-ronald opened this issue · 2 comments

When you close rave model before payments ERR_TOO_MANY_REDIRECTS,
Using laravel 7.21.0 running on laravel valet on mac os Catalina using google chrome browser.

Please note I have tried using the solution below as suggest in the previous issue of callback but its not working

Routes

Route::match(['GET', 'POST'], 'pay', 'BookingController@initialize')->name('pay');

Controller

`Route::match(['GET', 'POST'], 'pay', 'BookingController@initialize')->name('pay');
switch ($bookingRequest->method()) {
case 'POST':
$this->initializePayment($bookingRequest);
break;

        case 'GET':
            return redirect()->route('tours');
            break;

}`

I have implemented the same code in laravel 5.8 and everything worked just fine but for this case, it is not working.

having same issue too the after the user cancels the payment before payment, it redirects to the pay controller instead of the redirect_url

Fixed