简体   繁体   English

BILLING.SUBSCRIPTION.CANCELLED 不会根据用户操作触发?

[英]BILLING.SUBSCRIPTION.CANCELLED does not fire upon user action?

I want to keep track of the subscription status of the active billing agreements.我想跟踪有效计费协议的订阅状态。

Now I thought webhooks would be handy for this.现在我认为 webhooks 会很方便。

I have a listener for BILLING.SUBSCRIPTION.CANCELLED which is described as我有一个BILLING.SUBSCRIPTION.CANCELLED的监听器,它被描述为

This event is triggered when a billing subscription is cancelled.取消计费订阅时触发此事件。

Now when a user goes to his paypal account and cancels the subscription, nothing gets fired.现在,当用户转到他的贝宝帐户并取消订阅时,不会触发任何内容。 Only if I use the REST API to cancel the subscription, this hook fires.只有当我使用 REST API 取消订阅时,才会触发此钩子。 Where's the point in this?这有什么意义呢? When I do an API call I get instant response that a subscription was cancelled or not, why would sb need an additional webhook for that?当我进行 API 调用时,我会立即得到订阅是否取消的响应,为什么 sb 需要额外的 webhook 呢?

The only useful application for this would be to be in track of what a user does with his paypal account.唯一有用的应用程序是跟踪用户用他的贝宝帐户做了什么。 Now my question is: is this sandbox behaviour?现在我的问题是:这是沙箱行为吗? Does the hook fire in "real world" when a user cancels the subscription/agreement through paypal directly?当用户直接通过贝宝取消订阅/协议时,钩子是否会在“现实世界”中触发?

You will need to use the IPN (Instant Payment Notification) message service for handling user triggered Subscription cancels via the PayPal Dashboard.您将需要使用 IPN(即时付款通知)消息服务来通过 PayPal 仪表板处理用户触发的订阅取消。

You can find a list of Recurring Payment notifications which are sent through the IPN here .您可以在此处找到通过 IPN 发送的定期付款通知列表。

Also, you will quickly find out that their support for the IPN message service is very limited when testing code in development (they have an IPN Simulator , but it doesn't support Recurring notifications).此外,您会很快发现,在开发中测试代码时,他们对 IPN 消息服务的支持非常有限(他们有一个IPN Simulator ,但不支持重复通知)。 So you will have to go through their variable documentation to see how best to implement the logic in your application.因此,您必须仔细阅读他们的变量文档,以了解如何最好地在您的应用程序中实现逻辑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM