Reputation: 339
I have a problem with the redirection to an external URL. I explain the problem: There is a form with a field for enter a payment card. When clicking to the button "payer". The system call the route "paiement". I use the LemonWay api for payment. In the route payment, I register a new wallet for my customer, if no error I reditect to a second Route with name: "money_in_3d". In this route I call the MoneyIn3DInit from lemonway php api. If no error this method returned an ApiResponse object. This object contain an external url for verify 3d secure. But when I write:
return $this->redirect(urldecode($ret->acs->actionUrl));
This call not work. Nothing redirection. And when I see the network monitor of firefox, there is a line with: Status. Method. Url 200. OPTIONS. the url
Why the method is OPTIONS ? WH hy the redirection not work ?
Upvotes: 3
Views: 1081
Reputation: 339
I found the problem. When I 'm clicking on the button "Payer" they are a AJAX request but my server want do a redirection to a 3D secure URL, but it's not possible because a redirection don't return a JSON response so the redirection failed and firefox try a OPTION request.
Thank you !
Upvotes: 1