I'm currently utilizing Cybersource Silent Order Post within Magento's one-page checkout. I am attempting to make an AJAX post to "". However, I am encountering the following error: "XMLHttpRequest cannot load . No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore not allowed access. The response had HTTP status code 403"
I am seeking a specific answer related to Cybersource. Please advise if there are any alternative options aside from using AJAX.
Below is the code snippet for reference:
var url = jQuery("#post_url").val();
var access_key=jQuery("#access_key").val();
var profile_id=jQuery("#profile_id").val();
// more code...
// additional fields being assigned values
// more code...
var params ='access_key='+access_key+ '&profile_id='+profile_id+ '&'; // full params list omitted for brevity
var http= new XMLHttpRequest();
http.open("POST", url, true);
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.send(params);
http.onreadystatechange = function() {
if(http.readyState == 4) {
alert(http.responseText);
console.log("I am back");
}
}