Hi, I am trying to implement a subscription process using PayPals (http://www.paypal.com) IPN (Immediate Payment Notification) service. This service sends me a notification of a payment (via http), directly from the paypal server. This is easy to process using Zope. However, I am required to validate the payment, using a secure link. My Zope Server needs to send a secure HTTP request to the remote Paypal server. My question involves two parts: What is the best way (or even a way) of sending an outbound server to server http request from my Zope server to another server? How can I send a https request (using a verisign certificate) from Zope / Python? Thanks Kevin
Hi Kevin,
What is the best way (or even a way) of sending an outbound server to server http request from my Zope server to another server?
I use an external method like this: from ZPublisher import Client def web_client(url = 'http://somehost/something', username = None, password = None, **kw): '''access http servers''' class gen_res: __allow_access_to_unprotected_subobjects__=1 f=gen_res() if kw: f.headers,f.body=apply(Client.call,(url,username,password),kw) else: f.headers,f.body=Client.call(url,username,password) return(f) This is very basic but works well for me for over a year.
How can I send a https request (using a verisign certificate) from Zope / Python?
If you want to do ssl, you have several options. Either make it all in python, there are some modules available for this (dont have them at hand at the moment), or you can simple proxy it, for example with stunnel. At least stunnel can be configured to use your certificate and has the advantage of beeing simple and secure. HTH Tino Wildenhain
participants (2)
-
Kevin Gill -
Tino Wildenhain