Javascript 获得;未处理的api错误“;在PayPal集成中

Javascript 获得;未处理的api错误“;在PayPal集成中,javascript,php,api,paypal,Javascript,Php,Api,Paypal,目前正在运行一个集成PayPal按钮的沙盒。 单击PayPal按钮后,createOrder方法在: paypal.Buttons({ createOrder: function() { return fetch('php/registerPayPalPayment.php', { method: 'post', body: JSON.stringify({orderID: <?php echo $orderID; ?

目前正在运行一个集成PayPal按钮的沙盒。 单击PayPal按钮后,createOrder方法在:

paypal.Buttons({
    createOrder: function() {
        return fetch('php/registerPayPalPayment.php', {
            method: 'post',
            body: JSON.stringify({orderID: <?php echo $orderID; ?>}),
            headers: {
                'content-type': 'application/json'
            }
        }).then(function (res) {
            console.log("Paypal: CreateOrder");
            console.log(res);
            return res.json();
        }).then(function (data) {
            console.log(data);
            return data.id; // Use the same key name for order ID on the client and server
        });
    }
登录PayPal沙盒帐户后。“创建”调用中发生错误:


我不知道问题出在哪里,它以前在2019年12月运行良好。

因为这是沙盒,所以您应该做的第一件事是在创建一对新的沙盒帐户(一个业务,一个个人),在使用新的业务帐户时创建一个新的REST API应用程序。然后,查看您的问题是否仍然存在,如果存在,则发布更新的错误。等待20分钟后,它再次工作。这是sandbox,您应该做的第一件事是在创建一对新的sandbox帐户(一个企业,一个个人),在使用新的企业帐户创建一个新的REST API应用程序。然后,查看您的问题是否仍然存在,如果存在,则发布更新的错误。等待20分钟后,它再次工作
{id: "32509608BX945762G", links: Array(4), status: "CREATED"}
ack: "error"
message: "Unhandled api error"
meta: {calc: "dc72e617fec59",…}
server: "Hkq76r..."