I'm working on opencart 3. I want to make some changes to the custom plugin.
After the customer selects the payment method I want to redirect to the external page.
In the index function, I try to use
return $this->response->redirect(URL)
But will get the below error.
Code: Select all
Warning: header() expects parameter 3 to be int, string
Code: Select all
index.php:1 Access to XMLHttpRequest at 'URL' (redirected from 'https://URL/index.php?route=checkout/confirm') from origin 'https://URL' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.