Can't get IPN working

115 views
Skip to first unread message

Kai Timmer

unread,
Nov 10, 2010, 5:50:52 AM11/10/10
to django-paypal
When I receive a IPN on my endpoint I get this:

Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/django/core/servers/
basehttp.py", line 281, in run
self.finish_response()
File "/usr/local/lib/python2.6/dist-packages/django/core/servers/
basehttp.py", line 321, in finish_response
self.write(data)
File "/usr/local/lib/python2.6/dist-packages/django/core/servers/
basehttp.py", line 417, in write
self._write(data)
File "/usr/lib/python2.6/socket.py", line 300, in write
self.flush()
File "/usr/lib/python2.6/socket.py", line 286, in flush
self._sock.sendall(buffer)
error: [Errno 104] Connection reset by peer

My urls.py looks like this:

urlpatterns = patterns('mysite.payment.views',
(r'^thank_you/', 'thank_you'),
(r'^canceled/', 'canceled'),
(r'^paypal-ipn/', include('paypal.standard.ipn.urls'))
)

I have absolutely no Idea whats going on there. Tracing the requests
with wireshark, I see that paypal tries to send ssl messages. Maybe
that is the "problem"? But how would I be able to test my endpoint
without deploying it on a real webserver? And where it completely
looses me is this: when I grab the request that paypal sends in my own
view. I get a cleartext POST message, no ssl at all. Thats why I think
ssl isn't the problem. It would be really great if someone can put me
in the right direction here, because I'm completely lost :)

Thomas Parslow

unread,
Nov 11, 2010, 12:08:52 PM11/11/10
to django...@googlegroups.com
Hi Kai,

I'm not sure how much help I can be, but since no one else has replied
yet I'll give it a shot :)

PayPal IPNs should only be SSL if you've told PayPal to make them so
(by supplying an HTTPS url for the IPN endpoint). So maybe check you
haven't done that but otherwise it's probably not SSL (the fact that
you can see the request in plain text in your own view pretty much
proves that too).

It looks to me like PayPal is just dropping the connecting a bit
quicker than the built in webserver was expecting. This isn't
necessarily a problem, as long as you're getting the IPN data and
PayPal is showing the IPNs as received (check the "IPN History" page
which you can get to from the IPN settings page in your PayPal
account) then everything is fine.

Tom

> --
> You received this message because you are subscribed to the Google Groups "django-paypal" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-paypa...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-paypal?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages