[web2py] Re: paymentech: post request

2012-07-09 Thread howesc
how about: import urllib2 r = urllib2.Request('https://orbitalvar1.paymentech.net/authorize:443', xml_request, {'Content-Type', 'application/PTI46', ...}) resp = urllib2.urlopen(r) see http://docs.python.org/library/urllib2.html On Sunday, July 8, 2012 6:44:12 PM UTC-7, Adi wrote: > > Thanks fo

[web2py] Re: paymentech: post request

2012-07-08 Thread Adi
Thanks for the response. Even though I got this response: 412 Precondition Failed, the code bellow seems to work fine. Will check more tomorrow. import sys, httplib, urllib, urllib2 target = "https://orbitalvar1.paymentech.net/authorize:443"; HOST, API_URL = urllib2.splithost(urllib2.splittype

[web2py] Re: paymentech: post request

2012-07-08 Thread howesc
i've never used HTTP lib before, and i found "This module defines classes which implement the client side of the HTTP and HTTPS protocols. It is normally not used directly — the module urllibuses it to handle URLs that use HTTP and HTTPS