Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add IPN signal for failed payments in subscription #30

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mij
Copy link

@mij mij commented Aug 18, 2013

Add a signal for PayPal notifying via IPN that a user's subscription failed a payment. This notification is crucial to respond to, because the event normally results in PayPal shortly discontinuing the subscription and the bussiness losing the customer.

mmic and others added 6 commits August 18, 2013 16:38
PayPal sends the Subscription ID as "recurring_payment_id" for transaction types = recurring_payment_*, and as "subscr_id" for transaction types = subscr_*

This follows on the everlasting ambiguity PayPal uses to call recurring payments. Transaction examples:
* subscription created, cancelled, payment -> txn_type = subscr_*
* subscription suspended, suspended due to tryout -> txn_type = recurring_payment_*
Indicate the datetime format of all DateTimeFields so they can be
correctly parsed. This change is made in particular for retry_at. When
users create a subscription which later fails an instalment, paypal
issues an IPN event with txn_type='subscr_failed' which indicates the
date of the next attempt. This event failed parsing by django-paypal,
and gets stored into the database with raw content and a flag. This
fixes the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants