I made a custom payment gateway which works. Now I have integrated 3D secure into the gateway and am having a hard time re-directing after confirming the order.
I have tried using
$this->response->setOutput(json_encode($json));
also
$this->redirect($url);
as well as
$this->redirect($this->url->link($url)); //shortened $url
I have also written my own custom redirect functions, forced html meta refresh into the code and still no dice.
What about errors... I am getting no errors whatsoever except for once when I directly called the php header('location:') and got a headers already sent error. I have also plugged in my very own error logging/tracking code I get information that the functions are in fact executing.
I know the extension works because manually plugging in in the relevant links directly into the browser gives me results.
Any help would be appreciated.
Thanks.
If your code was worked manually, you can use javascript redirect instead of php header redirect function.
<script> window.location = '<?php echo $this->url->link($url); ?>' </script>
Sometimes, header redirect sometimes can not work if page encoding is not suitable or get an error, etc. Javascript redirect worked for me in the same situation.