Page 1 of 1
Parsing Paypal Recurring Subscriptions
Posted: Mon Dec 17, 2012 2:47 pm
by volomike
I posted the following on StackOverflow and got no response. Anyone have an idea what statuses to check for in PayPal? I'm using a PHP script for a membership site I wrote. I need to parse txn_type value from the PayPal IPN so that if someone stops payment, has an end of term, or otherwise cancels their subscription, I can have my PHP script email a membership admin so that he can stop their account.
http://stackoverflow.com/questions/1385 ... on-ran-out
Re: Parsing Paypal Recurring Subscriptions
Posted: Mon Dec 17, 2012 3:36 pm
by califdon
I've never dealt with subscriptions, so I can't help you, but have you tried the PayPal forums? Back when I was working on a PayPal enabled site, I found them to be fairly responsive.
Re: Parsing Paypal Recurring Subscriptions
Posted: Sat Dec 22, 2012 1:41 pm
by Eric!
You'll get txn_type='subscr_cancel'
Here's the
docs:
[text]txn_type:
'subscr_signup" This Instant Payment Notification is for a subscription sign-up.
"subscr_cancel" This Instant Payment Notification is for a subscription cancellation.
"subscr_modify" This Instant Payment Notification is for a subscription modification.
"subscr_failed" This Instant Payment Notification is for a subscription payment failure.
"subscr_payment" This Instant Payment Notification is for a subscription payment.
"subscr_eot" This Instant Payment Notification is for a subscription's end of term.
subscr_date:
Transaction-specific Start date or cancellation date depending on whether transaction is "subscr_signup" or "subscr_cancel"
subscr_effective:
Transaction-specific Date when the subscription modification will be effective (only for txn_type = subscr_modify)[/text]
Re: Parsing Paypal Recurring Subscriptions
Posted: Sun Dec 23, 2012 8:37 pm
by volomike
I found that all I really need to look for are:
subscr_cancel
subscr_eot
As far as "membership ran out" type reactions in my code, I should ignore all the others as just "noise". I mean subscr_failed, for instance, is not something to be concerned about because after 3 attempts after receiving a subscr_failed, PayPal automatically sends subscr_cancel. To react on subscr_failed, disabling a subscription for instance, would not be the right way to handle things.