Hi,
I am using Ajax jQuery for chargify it showing 404 error,
If any one knows kindly please tell me the solution to resolve the issue.
Firebug console
---------------
NetworkError: 404 Not Found - https://xxx.chargify.com/subscriptions.json"
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://xxx.chargify.com/subscriptions.json. This can be fixed by moving the resource to the same domain or enabling CORS.
My code
-------
$.ajax( {
url: 'https://xxx.chargify.com/subscriptions.json',
type: 'POST',
contentType: 'application/json',
dataType: "json",
crossDomain: true,
data: JSON.stringify(dataser),
beforeSend: function (xhr) {
xhr.setRequestHeader('Authorization', make_base_auth('username', 'password'));
xhr.setRequestHeader("Access-Control-Allow-Origin", "*");
xhr.setRequestHeader("Access-Control-Allow-Headers", "Content-Type");
},
success: function(data) {
console.log(JSON.stringify(data));
},
error: function(data) {
alert("errorrequest"+JSON.stringify(data));
}
});