I am using an API from a payments-provider.
At some point, I show the user a page where he can authenticate himself (enter a code that the payment-provider will send him).
Note that on this page, I render a div element that the payment-provider has given me through an API request I made previously (I used Guzzle for this).
After the user enters the code and clicks submit, the payment-provider redirects him to one of my pages - let's say /redirect.
So, in my web.php I have a route:
Route::post('/redirect', 'OrdersController@redirect');
In my OrdersController I do this:
// do various stuff like updating the order status
return redirect("orders/$order->id");
There is another route in web.php:
Route::get('/orders/{order}', 'OrdersController@show');
And here is the show method:
return view('orders/show', [
'order' => $order,
'page_title' => 'Order Receipt',
]);
Two things go wrong:
The user gets shown the
orders/showview but it seems like it is in an iframe:
The URL of the page does not change. It does not show
myapp.test/orders/435for example. Instead, it still shows the URL of the previous page (the one where the user authenticated himself) - something likemyapp.test/authenticatelet's say.
Any ideas why this is happening?
