1

我在我的 django 应用程序中使用 django-paypal 作为支付解决方案。我正在尝试实现 IPN 处理程序。

当我在我的 IPN 处理 URL 收到一条 IPN 消息时会发生什么情况,django 服务器崩溃:

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

我的付款应用程序 urls.py 如下所示:

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

对我来说,错误消息毫无用处。如果有人可以帮助我,那就太好了。

4

2 回答 2

5

我承认我是个白痴:)

为此,您不需要 ssl。但是你需要做一个syncdb,然后才能使用它,......

上帝有时很容易,你只是看不到它。

于 2010-11-10T12:16:07.610 回答
0

Can you monitor precisely the packet that paypal is sending your server using tcpdump or wireshark? It looks like they may be terminating the connection early, but it's hard to tell much without a longer traceback and/or a packet dump.

Edit: I had forgotten about the https messages. Paypal probably requires HTTPS for those callbacks. The dev server won't support that, so unfortunately you will probably need to flesh out your server configuration before you can test that functionality.

于 2010-11-09T13:16:14.640 回答