evertec / athmovil-javascript-api

Technical documentation used to integrate ATH Móvil's Payment Button on websites using HTML and Javascript.
5 stars 0 forks source link

Access to fetch at 'https://www.athmovil.com/rs/v2/transactionStatus' from origin 'http://localhost:8080' has been blocked by CORS policy: #7

Closed Cyberfolks closed 4 years ago

Cyberfolks commented 4 years ago

Access to fetch at 'https://www.athmovil.com/rs/v2/transactionStatus' from origin 'http://localhost:8080' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

lfontanez commented 4 years ago

Puedes intentar con JSONP https://www.w3schools.com/js/js_json_jsonp.asp

... o añadiendo el parámetro callback=? al url de tu fetch (?callback=? si es el primero, &callback=? si no lo es)