From cc03510c46afa4b41fe979837fafa35a7336cd6f Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Fri, 7 Nov 2014 14:58:18 -0800 Subject: [PATCH] Forcing payments from paypal to not be duped. --- apps/profile/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/profile/models.py b/apps/profile/models.py index 3cf727269..21b5d497f 100644 --- a/apps/profile/models.py +++ b/apps/profile/models.py @@ -226,12 +226,15 @@ class Profile(models.Model): # Record Paypal payments paypal_payments = PayPalIPN.objects.filter(custom=self.user.username, + payment_status='Completed', txn_type='subscr_payment') if not paypal_payments.count(): paypal_payments = PayPalIPN.objects.filter(payer_email=self.user.email, + payment_status='Completed', txn_type='subscr_payment') if alt_email and not paypal_payments.count(): paypal_payments = PayPalIPN.objects.filter(payer_email=alt_email, + payment_status='Completed', txn_type='subscr_payment') if paypal_payments.count(): # Make sure this doesn't happen again, so let's use Paypal's email.