2

取消计费协议后,我的应用程序未收到 Paypal Billing.Agreement.Cancelled Webhook 事件通知。

请找到我遵循的以下步骤来重现上述问题

1)配置的Webhook(我作为商家的角色)

i) logged into developer.paypal.com
ii) Go to My Apps & Credentials
iii) Selected Sandbox environment
iv) Created Application
    say abc-webhook-app
    and selected the Sandbox Business Account associated with the buyer's accounts.
v) And then as my webhook event i.e BILLING_AGREEMENTS.AGREEMENT.CANCELLED was not
     showing in the UI, i subscribed for the event through API
     and provided the URL and the event_name in the request body
vi) Then i was able see the configured webhook under the above app-name

2) 取消结算协议(我作为买家的角色)

 i) I purchased something from the above merchant say foodie.com sandbox
    and payed through paypal sandbox account
ii) Now Billing Agreement is created in my paypal sandbox account
iii) Now i cancelled the billing agreement for the merchant foodie.com

观察:我可以在贝宝仪表板中看到上述取消的计费协议的电子邮件通知

问题:取消计费协议后,配置的 URL 未收到此事件的 Wehook 事件通知

4

1 回答 1

1

我猜你通过了类似的事情

{ 
    "url": "{{WebhookURL}}",
    "event_types":  [
        {
            "name": "BILLING_AGREEMENTS.AGREEMENT.CANCELLED"
        }
        ]
}

至:https ://api.sandbox.paypal.com/v1/notifications/webhooks 。然后您将能够在您的开发者仪表板中看到已注册的 Webhook 事件 => 我的应用程序和凭据 => [应用程序名称]

在取消您作为买家的结算协议后的几秒/分钟(来自https://www.sandbox.paypal.com/myaccount/autopay/)您应该能够在您的开发者仪表板中看到发送到您的端点的 webhook = > 沙盒 => Webhook 事件。如果你在那里看不到它,那么 Paypal 就永远不会发送出去。

ps:确保您的端点(在上面的“url”处注册):

  • 总是返回 200 OK
  • 可公开访问
  • 接受 POST 请求
  • 无需身份验证
于 2020-11-27T13:07:57.397 回答