Commits

Anonymous committed 52b0d51

Add @csrf_exempt to paypal_gateway.views.ipn

Comments (0)

Files changed (1)

bursar/gateway/paypal_gateway/views.py

 from django.shortcuts import render_to_response
 from django.template import RequestContext
 from django.views.decorators.cache import never_cache
+from django.views.decorators.csrf import csrf_exempt
 import logging
 
 log = logging.getLogger('bursar.gateway.paypal_gateway')
 
+@csrf_exempt
 @never_cache
-def ipn(request, settings=None):
+def ipn(request, SSL=None, settings=None):
     """PayPal IPN (Instant Payment Notification)
     Confirms that payment has been completed and marks invoice as paid.
     Adapted from IPN cgi script provided at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456361"""