[thelist] Server2Server Communication

Chris at globet.com Chris at globet.com
Fri Apr 21 08:43:17 CDT 2006


> My problem is this:
> The payment gateway sent the response to the client browser, 
> not to my site so that it can appropriately redirect the 
> client browser to the right page depending on the result of 
> the response of the browser.

Re-read Ken's post, and read up on the Redirect() method of the Response
object. The redirect does not occur on the server as it appears. When
invoked, the Redirect() method tells the server to return an HTTP
response of status 302, "Object Moved". The browser then requests the
specified resource.

You need to use the ServerXMLHttp object as Ken suggested. Your code
will look something like this, depending on the version of MSXML you
have installed on the server:

dim http, gatewayResponse, Gateway, InitParam, ErrorCode

Gateway = "https://www.somepaymentgateway.com/init"
InitParam = "merchant=12345&amount=1.00&currency=USD ..."

Set http = server.CreateObject("MSXML2.ServerXMLHttp")

http.open("GET", Gateway & InitParam, false)
gatewayResponse = http.responseText
Set http = nothing

Read up on the methods of the ServerXMLHttp object, and you shoujld be
in a position to implement your requirements. There is no simpler way
(to my knowledge) to achieve what you want.


Chris Marsh
Web Developer
Tel: +44 20 8246 4804 Ext 828
Fax: +44 20 8246 4808

Any opinions expressed in this email are those of the individual and not
necessarily the Company. This message is intended for the use of the
individual or entity to which it is addressed and may contain
information that is confidential and privileged and exempt from
disclosure under applicable law. If the reader of this message is not
the intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited.
If you have received this communication in error, please contact the
sender immediately and delete it from your system. 

More information about the thelist mailing list