javascript - PayPal集成中出现“未处理的API错误”

标签 javascript php api paypal

当前正在运行PayPal Button的沙盒集成。
单击贝宝按钮后,将在以下位置创建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
        });
    }


返回成功的响应:

{id: "32509608BX945762G", links: Array(4), status: "CREATED"}


登录到贝宝沙盒帐户后。 “创建”调用中发生错误:

ack: "error"
message: "Unhandled api error"
meta: {calc: "dc72e617fec59",…}
server: "Hkq76r..."


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

最佳答案

等待约20分钟后,现在一切正常!

关于javascript - PayPal集成中出现“未处理的API错误”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60812381/

相关文章:

java - 具体类中的 protected 构造函数与抽象类中的公共(public)构造函数

javascript - 客户关系管理 2013 : Force refresh a form after save

javascript - 如何在 Watson Conversation 中使用“选择选项”

PHP - 不能在类方法中使用 Heredoc?

c# - 如何查看 asp.net api 中 ajax 调用请求的数据类型

java - 当前的 msgraph-sdk-java 是否准备好用于生产级应用程序

javascript - 使用 JavaScript 在 HTML5 canvas 上绘制多个下降的圆圈

javascript - 将图像作为正文附加到 golang 服务器的 POST 请求中

php - 从历史记录中隐藏页面

php - NuSOAP + PHP , wsdl 错误 : XML error parsing WSDL issue