[Zope] sending form data offsite

Edward Muller edwardam@interlix.com
10 Mar 2003 18:02:08 -0600


urlencode takes a dictionary of params/values like this:

{
'param1' : 'value1',
'param2' : 'value2'
}

It cleans up spaces. I am using it for credit card processing and that
includes spaces in addresses, names and the like.

On Tue, 2003-03-11 at 01:46, Ed Colmar wrote:
> Thanks!
> 
> urlencode does the cleaning up of spaces and illegal characters?  What
> format does it expect?  Just a string?
> 
> Cheers!
> 
> -ed-
> 
> 
> On 6 Mar 2003, Edward Muller wrote:
> 
> > I use something like the following to do the exact a same thing...
> >
> > import string, urllib
> > from M2Crypto import m2urllib
> > encodedParams = urllib.urlencode(params)
> > url = m2urllib.FancyURLopener()
> > u =url.open('https://secure.post/location',encodedParams)
> > data = u.read()
> >
> > In an external method ... I use m2crypto because of good SSL support ...
> > You could probably use the regular httplib if you don't need SSL
> > support.
> >
> > On Wed, 2003-03-05 at 19:12, Ed Colmar wrote:
> > > Hi fellow zope hackers!
> > >
> > > I'm building a site for someone who wants to have the entire site within
> > > zope, to connect to dbs, etc...  But they use a service that requires them
> > > to post form data to a master server.
> > >
> > > Is there an easy way (in dtml or python) to do this without seeing the
> > > data transfer or ending up at th other server's pages?
> > >
> > > So far I've considered making an external method that uses lynx and dumps
> > > the return data.  Is this the best way?
> > >
> > > Thanks for the help!
> > >
> > > -ed-
> >
-- 
Edward Muller

Interlix - President

Web Hosting - PC Service & Support
Custom Programming - Network Service & Support

Phone: 417-862-0573
 Cell: 417-844-2435
  Fax: 417-862-0572

http://www.interlix.com