Refund Call from javascript fails

Hi. Im trying to do a refund through javascript API, like this payBack:function(transId) { var params = { // Request parameters }; $.ajax({ url: "" + transId + "?" + $.param(params), beforeSend: function(xhrObj){ // Request headers xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","993537c5430d446bad8beaxxxxxxxxx"); //primary }, type: "PUT", // Request body data: "body", //"{body}" }) .done(function(data) { alert("Beløbet er betalt tilbage: " + data); }) .fail(function(error) { alert("Der opstod en fejl: " + error.status + ": " + error.statusText); }); } but I get the respons XMLHttpRequest cannot load Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access. The response had HTTP status code 404. I noticed there are 2 subscription keys, a primary and a secondary, Im using the primary. Can you please help me with this issue? Regards, Dennis


    Hi Dennis, Sorry to tell you, but we cannot seem to offer you help in developer site - javascript code snipper is not formatted. Please address this issue to AppSwitch helpdesk - they will happily guide you to the right path :)
    Posted by Hidden Wed, 05 Apr 2017 10:06:26 GMT

You're not signed in. Please sign-in to report an issue or post a comment.