有关PayPal订单支付的INTERNAL_SERVICE_ERROR

问题已更新 – 添加了更多细节.

当我尝试支付订单时,我从PayPal收到500(INTERNAL_SERVICE_ERROR)错误.

我从创建订单中获得好处,并获得orderID – 订单状态CREATED.
订单由买方批准 – 成功并且订单状态变为批准.

订单由https://api.sandbox.paypal.com/v1/checkout/orders创建

批准使用paypal https://www.paypalobjects.com/api/checkout.js

{
"id": "53T50821FM697283T",
"gross_total_amount": {
    "value": "26.66",
    "currency": "ILS"
},
"purchase_units": [
    {
        "reference_id": "20180318-64466",
        "amount": {
            "currency": "ILS",
            "total": "26.66"
        },
        "payee": {
            "email": "d0535318380-classeeks@gmail.com"
        },
        "items": [
            {
                "name": "Meeting",
                "sku": "20180318-64466",
                "description": "Meeting 1/26/2018 1:00 AM-1/26/2018 2:20 AM. aaaaa",
                "price": "26.66",
                "currency": "ILS",
                "quantity": 1
            }
        ],
        "shipping_address": {
            "recipient_name": "Andrey Dyachenko",
            "line1": "ישראליס 5 דירה 4",
            "city": "תל-אביב",
            "country_code": "IL",
            "postal_code": "61014",
            "state": "",
            "type": "HOME_OR_WORK"
        },
        "partner_fee_details": {
            "receiver": {
                "email": "d0535318380-reciver@gmail.com"
            },
            "amount": {
                "value": "12.66",
                "currency": "ILS"
            }
        }
    }
],
"payer_info": {
    "email": "d0535318380-buyer@gmail.com",
    "first_name": "Andrey",
    "last_name": "Dyachenko",
    "payer_id": "BZDA9RCZXKYQY",
    "country_code": "IL",
    "shipping_address": {
        "recipient_name": "Andrey Dyachenko",
        "line1": "ישראליס 5 דירה 4",
        "city": "תל-אביב",
        "country_code": "IL",
        "postal_code": "61014",
        "state": "",
        "type": "HOME_OR_WORK"
    }
},
"metadata": {
    "supplementary_data": [
        {
            "name": "risk_correlation_id",
            "value": "53T50821FM697283T"
        },
        {
            "name": "buyer_ipaddress",
            "value": "109.65.134.129"
        },
        {
            "name": "external_channel",
            "value": "WEB"
        }
    ]
},
"redirect_urls": {
    "return_url": "https://classeeks.com/order/details/70368c93-90db-4a8e-bd82-6d611acc2d17",
    "cancel_url": "https://classeeks.com/order/details/70368c93-90db-4a8e-bd82-6d611acc2d17"
},
"create_time": "2018-03-18T19:49:11Z",
"links": [
    {
        "href": "https://api.sandbox.paypal.com/v1/checkout/orders/53T50821FM697283T",
        "rel": "self",
        "method": "GET"
    },
    {
        "href": "https://api.sandbox.paypal.com/v1/checkout/orders/53T50821FM697283T/capture",
        "rel": "capture",
        "method": "POST"
    }
],
"status": "APPROVED"

}

下一步用https://api.sandbox.paypal.com/v1/checkout/orders/53T50821FM697283T/pay付款

{   "disbursement_mode":"DELAYED"  }

响应

{
"name": "INTERNAL_SERVICE_ERROR",
"message": "The server encountered an internal error that prevented it from fulfilling this request.",
"information_link": "https://developer.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR",
"debug_id": "be0c6976ab17a"

}

基于https://demo.paypal.com/us/demo/go?page=cart

最佳答案 如果您已成功创建订单,则可以直接捕获订单或创建将资金置于保留状态的授权,然后您可以获取授权.检查
doc以获取PayPal订单API.

点赞