No' Access-Control-Allow-Origin'拨打支付服务时出错

时间:2014-08-21 22:22:12

标签: javascript jquery ajax payment-processing

我想在我的网站上加入Securepay。 在编写的文档中,我可以调用此URL来执行简短的测试:

https://securepay.epayworldwide.com/securepay/register.php?TID=93999966&Userid=123456789012345678901234567890&Password=transactdemotransactdemotransact&Amount=10000&Currency=EUR&Paymode=direct&TransID=AB_1234

链接本身工作正常,但当我尝试从我的页面上的Javascript发送请求时如下:

$.ajax({
    async:false,
    complete: function(jqXHR, textStatus){
        console.log(jqXHR, textStatus);
    },
    data: {
        Userid: "123456789012345678901234567890",
        Password: "transactdemotransactdemotransact",
        TID: "93999966",
        Amount: "100",
        Currency: "EUR",
        Paymode: "direct"
    },
    type: "GET",
    url: "https://securepay.epayworldwide.com/securepay/register.php"
});

我总是得到这个错误:

XMLHttpRequest cannot load https://securepay... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://mysite...' is therefore not allowed access.

我在这里做错了什么,还是我在伪造什么?

0 个答案:

没有答案