Python HTTPSConnection/HTTPResponse Problem

Edward Muller edwardam at interlix.com
Sun Sep 22 02:00:46 EDT 2002


I am trying to use HTTPSConnection and HTTPResponse objects to process
payments with Authorize.net. I've search (using google) the net and
couldn't find any solid examples, so I'm not sure if I'm doing this
right.

I *know* that I am creating and sending the request correctly because
Authorize.net sends me an email with the data in as verification. The
problem is that calling conn.getresponse() (actually calling
con.sock.makefile('rb',0) also does this) ends up hanging until the
connection times out.

Authorize.net AFAIK sends only one thing back in response to the HTTPS
POST, and that is a comma seperated list of values that include the
condition of the transaction (as you can interact with the customer).

My though was that perhaps the things get really messed up because the
data passed back isn't a normal HTTP response ... so I tried playing
with the behind the scenes stuff (peeking into httplib.py) .. . and
like I said above ... calling conn.sock.makefile('rb',0) ... which
looks like what I need to do to get a file object hangs as well ...

So I dunno...

Oh and PS conn is a HTTPSConnection instance ...

Any help would be very appreciated!



More information about the Python-list mailing list