Permalink
Browse files

The previous code was throwing a 500 error. I fixed by importing bill…

…ing inside the handler and removing 'response=self' (self doesn't exist). I also changed the sender because you were sending the IPN class and not the instance.
  • Loading branch information...
1 parent 02e1d10 commit 65f69f0d83ce1a5f1fc1f5c163b4cddabe138f45 @nmonteiro nmonteiro committed Jan 5, 2012
Showing with 6 additions and 7 deletions.
  1. +6 −7 billing/integrations/pay_pal_integration.py
@@ -3,7 +3,6 @@
from paypal.standard.conf import POSTBACK_ENDPOINT, SANDBOX_POSTBACK_ENDPOINT
from django.conf.urls.defaults import patterns, include
from paypal.standard.ipn.signals import payment_was_flagged, payment_was_successful
-from billing.signals import transaction_was_successful, transaction_was_unsuccessful
class PayPalIntegration(Integration):
def __init__(self):
@@ -30,14 +29,14 @@ def get_urls(self):
return urlpatterns
def unsuccessful_txn_handler(sender, **kwargs):
- transaction_was_unsuccesful.send(sender=sender.__class__,
- type="purchase",
- response=self)
+ from billing.signals import transaction_was_unsuccessful
+ transaction_was_unsuccesful.send(sender=sender,
+ type="purchase")
def successful_txn_handler(sender, **kwargs):
- transaction_was_succesful.send(sender=sender.__class__,
- type="purchase",
- response=self)
+ from billing.signals import transaction_was_successful
+ transaction_was_succesful.send(sender=sender,
+ type="purchase")
payment_was_flagged.connect(unsuccessful_txn_handler)
payment_was_successful.connect(successful_txn_handler)

0 comments on commit 65f69f0

Please sign in to comment.