Blog Archive for January 9, 2011

PayPal IPN Messages for Subscriptions

January 9, 2011

When paypal does an IPN POST for subscriptions, you'll actually get two different POST calls. One of these indicates that a new subscription has been taken out, the second indicates that a payment has been made.

The example values below are taken from Django code - a u prefix on …

Tags: paypal ipn

Paypal Confirm IPN with Django

January 9, 2011

Here's some code to confirm a PayPal IPN using Django

def _request_confirm(request):
    """
    Confirm IPN with paypal
    """
    lConfirm = "/cgi-bin/webscr?cmd=_notify-validate&"
    lConfirm += request.META['QUERY_STRING']
    lConnection = httplib.HTTPSConnection(settings.PAYPAL_CONFIRM_URL)
    lHeaders = {"Host" : settings.PAYPAL_CONFIRM_URL …