You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-user@tcl.apache.org by ag...@7wire.com on 2006/04/28 11:44:34 UTC

external billing server interface

hello,
i am wondering what the best approach is to solve the following:

i have a working website (apache 2 and mod_websh) with file-based 
server-side sessions. it produces URLs like 
http://192.168.10.21/service.ws3?XDp6dPEFi3xtaYvFCPSjJVslyQ7vJiVQrl80QgWn0f0NBH2DmH

all fine. now... to interface with an external card-billing website, the 
user's browser is sent to an exernal billing server; a URL is passed along, 
which the billing server later embeds into its page upon completion of the 
payment; it is used to send the customer back to my websh based site. the 
billing server... attaches parameters to this URL; for example:

http://www.7wire.com/returnpage.html?DATA=%3CIDP+MSGTYPE%3D%22PayConfirm%22+KEYID%3D%221%2D0%22+ID%3D%22EYzzx3ArSOQpSAWC6fxQAvx40000%22+TOKEN%3D%
22%28unused%29%22+VTVERIFY%3D%22%28obsolete%29%22+AMOUNT%3D%22555%22+CURRENCY%3D%22CHF%22+PROVIDERID%3D%2290%22+PROVIDERNAME%3D%22Safer
pay+Test+Card%22+ACCOUNTID%3D%2299999%2D94913159%22+ECI%3D%222%22+CCCOUNTRY%3D%22XX%22%2F%3E&SIGNATURE=51eb5c374e163539f8aff5cdb7249db6
aec8165738f1ec3e44ac73e3de9c530b8ffff2d55f90369d176538e4d0e3067e4635d531965b9c4b63089be50fd4ffff

i am wondering about what is the best way to marry the two: i'd like to 
keep the encrypted data from the websh environment, but need to gather the 
ID parameter from the billing server's reply. i wanted to essentially chain 
the two or embed the websh data like the SIGNATURE, but this would require 
pre-processing the querystring before it is dispatched under websh. from 
what i've seen from the sources, the url is not available to the tcl 
environment for manipulation before dispatching. i would either add this or 
process in C, but there may be a better way...??

andy


---------------------------------------------------------------------
To unsubscribe, e-mail: websh-user-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-user-help@tcl.apache.org


Re: external billing server interface

Posted by Ronnie Brunner <ro...@netcetera.ch>.
Hi

> i am wondering about what is the best way to marry the two: i'd like to 
> keep the encrypted data from the websh environment, but need to gather the 
> ID parameter from the billing server's reply. i wanted to essentially chain 
> the two or embed the websh data like the SIGNATURE, but this would require 
> pre-processing the querystring before it is dispatched under websh. from 
> what i've seen from the sources, the url is not available to the tcl 
> environment for manipulation before dispatching. i would either add this or 
> process in C, but there may be a better way...??

You can easily access the query string before dispatching as follows:

set query [web::request QUERY_STRING]
# do some manipulation on $query
web::dispatch -querystring $query

This allows you for example to extract the websh part of the original
query string and only pass this part to web::dispatch or pass both
parts separately.

Something like:

% set query "a=b&c=d&e=[web::encrypt "g h i k"]"
a=b&c=d&e=XDdCg9Ouu7bh9ZmT
% web::dispatch -querystring $query -cmd "" -postdata ""
% foreach p [lsort [web::param -names]] {puts "$p: '[web::param $p]'"}
a: 'b'
c: 'd'
e: 'XDdCg9Ouu7bh9ZmT'
% web::dispatch -querystring [web::param e] -cmd "" -postdata ""
% foreach p [lsort [web::param -names]] {puts "$p: '[web::param $p]'"}
a: 'b'
c: 'd'
e: 'XDdCg9Ouu7bh9ZmT'
g: 'h'
i: 'k'
%

I hope you get the idea

Regards
Ronnie
-- 
10 Jahre Netcetera - die Zukunft im Visier

Ronnie Brunner | ronnie.brunner@netcetera.ch
phone +41 (0)44 247 79 79 | fax +41 (0)44 247 70 75
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-user-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-user-help@tcl.apache.org