[Zope] Re: paypal IPN. Debug messages missing. Script goes zombie
Sascha Welter
zopelist at betabug.ch
Fri Jul 8 05:40:58 EDT 2005
(Thu, Jul 07, 2005 at 12:00:30PM -0400) zope-request at zope.org wrote/schrieb/egrapse:
> From: Ed Colmar <ed at greengraphics.net>
> I've been hacking together a few seperate paypal IPN connections, some
> code from basion, and some from random web scrapings... Anyway...
> Things are working for the most part, except that this method for some
> reason dies when using urllib.urlopen(), and what is really wierd is
> that I get no error message, it just hangs.
>
> I am running an older version of zope, but I have never seen this
> behaviour before. The debug (-D) flag is set in start.
>
> here is the code I am using... As far as I can tell my syntax is
> proper... ???
> ... snip ...
> data =
> urllib.urlopen('https://www.sandbox.paypal.com/cgi-bin/webscr',
> requestform)
When doing urlopen, you will want to use timeoutsocket.py (included in
newer versions of python (or zope), found as a simple file on the web in
the ol' times of zope 2.5.1. Without this your connectiion will just
hang at the urlopen command, *as there is no timeout*.
Also look out for what others have aid in respect to https, no
expirience with that myself.
There are some applications for Plone to use PayPal (PloneMall /
PlonePayPal), you might want to look at these for sample code too.
Regards,
Sascha
More information about the Zope
mailing list