microweber
microweber copied to clipboard
CORS error in redirecting to payment gateway
Following errors occur when trying to redirect to payment gateway:
Access to XMLHttpRequest at 'https://www.paymentgateway.com/pg/StartPay/A00000000000000000000000000420755917' (redirected from 'http://127.0.0.1:8000/api/checkout') from origin 'http://127.0.0.1:8000' 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.
VM382:1 Uncaught SyntaxError: "undefined" is not valid JSON
at JSON.parse (<anonymous>)
at Object.error (api.combined.2829092665.admin.1.3.4.js:10649:43)
at c (api.combined.2829092665.admin.1.3.4.js:570:28294)
at Object.fireWith [as rejectWith] (api.combined.2829092665.admin.1.3.4.js:570:29039)
at l (api.combined.2829092665.admin.1.3.4.js:570:79825)
at XMLHttpRequest.<anonymous> (api.combined.2829092665.admin.1.3.4.js:570:82229)
api.combined.2829092665.admin.1.3.4.js:570 GET https://www.paymentgateway.com/pg/StartPay/A00000000000000000000000000420755917 net::ERR_FAILED
Payment gateway link is correct and opening it in new window works. How can I get rid of these errors? Thanks