我已经成功地完成了对Paypal的初始付款请求的结束,但现在已经碰到了一堵砖墙 .

以下代码尝试重定向到Paypal

foreach ($result->links as $link)
{
    if($link->method == "REDIRECT")
    {
        $redirect_url = $link->href;
    }
}

header("Location: " . $redirect_url);

$ redirect_url是https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-6H386134VK1125507 .

但是,这会返回以下错误 .

XMLHttpRequest cannot load https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-6H386134VK1125507. 
No 'Access-Control-Allow-Origin' header is present on the requested resource. 
Origin 'http://localhost:1000' is therefore not allowed access.

我需要在Paypal中设置其他东西,还是需要在重定向中更改某些内容?