Paypal IPN message INVALID -


I am using django, python and request. When I try to verify the IPN message with the following code:

  data = self.request.POST.copy () data ['cmd'] = "_notify-validate" url = "" If settings .debug: url = settings.payment ['paypal'] ['sandbox_ipn_endpoint'] other: url = settings.PAYMENT ['paypal'] ['live_ipn_endpoint'] self.logger.debug ("Tell us the IPN message Try to validate ") response = requests.post (url, data = data) Print response. Text  

I always get an INVALID response at the live end point. Any ideas why?

I've been with the following code:

  Query_string = Self.request.body.decode ('ascii') response = urlopen (url, b ("cmd = _notify-validate and% s"% query_string)) Read ()  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -