Paypal webhook资源为空

时间:2017-01-19 10:17:14

标签: paypal paypal-sandbox paypal-rest-sdk paypal-webhooks

我在开发中的应用程序中启用了INVOICING.INVOICE.PAID webhook。尝试在沙盒环境中支付发票后(使用买方测试用户)成功传递了webhook通知,但该消息不包含实际的发票数据。

正如您在下面的JSON中所看到的,resource.invoice属性为null。

如何获取实际数据并找到已支付的发票的ID?

我收到的webhook通知:

{
"id": "WH-6L999276D66321518-9G54023288302824Y",
"create_time": "2017-01-18T22:58:08Z",
"resource_type": "invoices",
"event_type": "INVOICING.INVOICE.PAID",
"summary": "An invoice has been paid",
"resource": {
    "invoice": null
},
"status": "PENDING",
"transmissions": [
    {
        "webhook_url": "https://6fbe15c2.ngrok.io/scc/webhooks",
        "response_headers": {
            "Content-Length": "34",
            "SERVER_INFO": "",
            "Content-Type": "text/plain",
            "HTTP/1.1 404 Not Found": ""
        },
        "transmission_id": "945c0220-ddd1-11e6-bc94-77339302725b",
        "status": "PENDING",
        "timestamp": "2017-01-18T22:58:08Z"
    }
],
"links": [
    {
        "href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-6L999276D66321518-9G54023288302824Y",
        "rel": "self",
        "method": "GET",
        "encType": "application/json"
    },
    {
        "href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-6L999276D66321518-9G54023288302824Y/resend",
        "rel": "resend",
        "method": "POST",
        "encType": "application/json"
    }
],
"event_version": "1.0"
}

0 个答案:

没有答案