Getting error " The 'Access-Control-Allow-Origin' header has a value 'https://developer.authorize.net' that is not equal to the supplied origin." making POST request. Javascript request code below. Working in Sandbox.
12-06-2023 04:13 PM
Authorize Your Domain: Make sure that "https://developer.authorize.net" is listed as an authorized domain in the CORS headers on the server status at :https://apitest.authorize.net. This involves configuring the server to include the 'Access-Control-Allow-Origin' header with the value 'https://developer.authorize.net' in its responses.
Wildcard (*) Approach: If possible, configure the server to respond with a wildcard '*' as the 'Access-Control-Allow-Origin' header, allowing any domain to access its resources. This is less secure and should be used cautiously, mainly in development environments.
Proxy Server: Set up a proxy server on your domain that forwards requests to "https://apitest.authorize.net." This way, the request appears to come from the same domain, avoiding CORS issues.
12-11-2023 03:14 AM