Correct paypal IPN variable for suspended subscriptions

别等时光非礼了梦想. 提交于 2020-01-03 10:29:58

问题


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 == "suspended" || $txn_type == "suspended" || $txn_type == "subscr_failed" || $profile_status == "suspended") {

Thanks!


回答1:


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.



来源:https://stackoverflow.com/questions/12866602/correct-paypal-ipn-variable-for-suspended-subscriptions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!