Check out the Latest Articles:
Django PayPal

Over the last few days I have been using johnboxalls paypal django integration and found it a breeze to work with.

I recommend following the steps posted on his site.

NOTE! one thing to keep in mind…

IPN results, keep your eye very closely to these.

The easiest way to make sure your signals are working perfectly is to test both the payment_was_successful and payment_was_flagged.

For many reasons the IPN can cause some confusion, ie duplicate txn_id, not the right sellers id and so on.

I also found that PayPal sends a flag even if the users payment has gone through, so monitor this closely

from paypal.standard.ipn.signals import payment_was_successful, payment_was_flagged

def show_me_the_money(sender, **kwargs):
    ipn_obj = sender
    # Undertake some action depending upon `ipn_obj`.
    if ipn_obj.custom == "Upgrade all users!":
        Users.objects.update(paid=True)
payment_was_successful.connect(show_me_the_money)


from paypal.standard.ipn.signals import payment_was_successful

def show_me_the_money_flagged(sender, **kwargs):
    ipn_obj = sender
    # Undertake some action depending upon `ipn_obj`.
    if ipn_obj.custom == "Upgrade all users!":
        Users.objects.update(paid=True)
payment_was_flagged.connect(show_me_the_money_flagged)



  1. It‘s quite in here! Why not leave a response?