正确的Paypal IPN变量以暂停订阅 [英] Correct paypal IPN variable for suspended subscriptions

查看:131
本文介绍了正确的Paypal IPN变量以暂停订阅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果按月付费的订户使用的信用卡已过期,并且Paypal尝试获取资金失败了三遍,则它们将被Paypal暂停".我正在尝试更新我的PHP脚本,以便在这种情况下数据库中将发生正确的更改.我已经研究了Paypal文档,但是在用户帐户被暂停后,我应该使用哪个IPN变量找不到明确的答案.

If a paying monthly subscriber has a credit card that expires, and paypal failed three times in trying to get the funds, then they are "suspended" by paypal. I'm trying to update my PHP script so that the correct change will happen in the database in this situation. I've studied the paypal documentation and can't find a clear answer on what IPN variable I should be using once a user's account has been suspended.

有人知道以下哪个是正确的变量和值吗?

Does anyone know which of the following is the correct variable and value to use?

if($ payment_status ==已暂停" || $ txn_type ==已暂停" || $ txn_type =="subscr_failed" || $ profile_status ==已暂停"){

if ($payment_status == "suspended" || $txn_type == "suspended" || $txn_type == "subscr_failed" || $profile_status == "suspended") {

谢谢!

推荐答案

我已经获得了$ txn_type =="recurring_payment_suspended_due_to_max_failed_pa​​yment",还请注意,不是$ subscr_id,而是$ recurring_payment_id.至少那就是当我在Paypal沙箱中模拟失败的付款时发生的情况.

I've been getting $txn_type == "recurring_payment_suspended_due_to_max_failed_payment", also note that instead of $subscr_id you'll have a $recurring_payment_id instead. At least thats what happens when I simulate failed payments in the Paypal Sandbox.

这篇关于正确的Paypal IPN变量以暂停订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆