使用 Paypal IPN 订阅

发布于 2024-07-26 15:05:39 字数 280 浏览 8 评论 0原文

我正在使用 Paypal IPN 添加订阅到网站,效果非常好,我可以成功创建新订阅并验证它。 该订阅有两周的免费试用期。 不幸的是,该指南对订阅状态的描述有点含糊。

目前,一旦收到 subscr_signup 或 subscr_ payment,用户帐户就会获得订阅状态,并在收到 subscr_cancel 或 subscr_failed 时被删除。 我相信这是正确的,但最好确认一下。

subscr_eot 是什么? IPN 指南将其描述为“订阅期限结束”。 试用期结束后会触发吗?

I am adding subscriptions to a site using Paypal IPN which works very well, I can successfully create a new subscription and verify it. The subscription has a two week free trial. The guide was unfortunately a little vague on subscription statuses.

At the moment, the users account gets subscribed status once subscr_signup or subscr_payment is received and gets removed when either subscr_cancel or subscr_failed is received. I believe this is correct but it's best to make sure.

Also what is subscr_eot? the IPN guide describes it as "subscription’s end-of-term." Does this get triggered after the trial period is over?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一个人的夜不怕黑 2024-08-02 15:05:39

subscr_eot 在用户最后一次付费间隔到期时发送。 subscr_cancel 在用户取消订阅后立即发送 - 例如:

用户在第一天注册每月一次计费的订阅。
subscr_signup 立即发送,subscr_ payment 在付款完成后立即发送(通常也是立即发送)。

第 13 天,用户取消。 subscr_cancel 会立即发送,尽管从技术上讲用户已经付款到第 30 天。此时是否取消由您决定。

第 30 天,发送 subscr_eot - 用户已取消,这是他最后一次付款的日期。

试用订阅没有太大变化 - 如果用户在试用订阅结束之前取消,则立即发送 subscr_cancel,并在试用结束时发送 subscr_eot

subscr_eot is sent when a user's last paid interval has expired. subscr_cancel is sent as soon as the use cancels the subscription - for example:

User signs up on day 1 for a subscription which is billed once a month.
subscr_signup is sent immediately, subscr_payment is sent as soon as payment goes through (usually immediately as well).

On day 13, the user cancels. subscr_cancel is immediately sent, although the user has technically paid through to day 30. Cancelling at this point is up to you.

On day 30, subscr_eot is sent - the user has cancelled, and this is the day which his last payment paid until.

Not much changes with trial subscriptions - if a user cancels before a trial subscription is up, subscr_cancel is sent immediately, and subscr_eot is sent at the end of the trial.

寂寞笑我太脆弱 2024-08-02 15:05:39

另外,一个有趣的细节是 subscr_eot 如何与 subscr_failed 配合使用。

看起来 subscr_eot 出现在 FINAL subscr_failed 之后。 因此,如果在您的帐户中将其设置为自动重试失败付款 3 次,那么它应该是这样的:

第一次失败付款 => 订阅失败
第二次付款失败=> 订阅失败
第三次付款失败=> subscr_failed 和 subscr_eot

因此基本上在您的代码中您可以设置 subscr_failed 来触发电子邮件,例如

您好用户,
请花点时间检查一下
您的付款信息,您可能需要
更新信用卡有效期
日期等。您仍然可以访问,
我们将在几天后重试。

并设置 subscr_eot 以实际关闭他们的订阅并触发类似的电子邮件

抱歉,我们还没有收到付款
并已删除您的个人资料。 你
仍然可以通过登录并更新您的付款信息来重新激活它

来重新激活它基本上这是一种“好”的方式,这样客户就有一个宽限期,并且他们的帐户不会仅仅因为信用卡过期或类似的事情而意外关闭。

Also, one interesting detail is how subscr_eot works with subscr_failed.

It looks like subscr_eot comes after the FINAL subscr_failed. So if in your account you set it to automatically retry failed payments 3 times, then it should go like this:

first failed payment => subscr_failed
second failed payment => subscr_failed
third failed payment => subscr_failed and subscr_eot

so basically in your code you can set subscr_failed to trigger an email like

hi user,
please take moment to check
your payment info, you may need to
update the credit card expiration
date, etc. You still have access,
we'll try again in a few days.

And setup subscr_eot to actually turn their subscription off and trigger an email like

Sorry, we still havent' gotten payment
and have taken your profile down. You
can still reactivate it by logging in and updating your payment info

Basically this is the "nice" way of doing it so customers have a grace period, and their account isn't shut off unexpectedly just because of an expired credit card or something like that.

夜深人未静 2024-08-02 15:05:39

克里斯发布的帖子最近已更新。

2010 年的某个时候,当用户取消帐户时,PayPal 停止使用 subscr_eot。 经过多次投诉后,他们恢复了这一做法,但花了 6 个月的时间才恢复。 所有这一切意味着您可以再次处理您的订阅通知,如彼得在接受的答案中所述。

来自 PayPal 代表:

subscr_cancel 表示配置文件是
取消了,不会有未来
付款。 但是,如果买家有
已支付当前账单
循环,因为它们是预先充电的,
然后你可以使用 subscr_eot 来
终止配置文件。

然而,仍然不确定如果多次尝试付款失败会发生什么。 目前 PayPal 的文档很糟糕。

The thread posted by Chris has been updated recently.

Sometime in 2010, PayPal stopped using subscr_eot when a user cancelled their account. After a number of complaints, they reinstated this, but took 6 months to do so. All this means is that you can once again handle your subscription notifications as described by Peter in the accepted answer.

From a PayPal representative:

subscr_cancel means the profile is
canceled and there will not be future
payments. However, if the buyer has
already paid for the current billing
cycle as they are charged up-front,
then you can use the subscr_eot to
terminate the profile.

Still unsure what happens in the event of multiple failed payment attempts, however. PayPal documentation at the moment is terrible.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文