Thought I had it, but on further review, it is still not working
right.
When I use 'MSXML2.ServerXMLHTTP' to post the page, the resulting URL
that appears ends up being on my computer, rather than the remote
server. So then the resulting buttons on THAT page fail, since they
are referencing relatively ( I suppose).
Am I missing something? Or could it mean there is an installation
problem of MSXML2 on my ISP's server. Any other suggestions?
Terry
Here are the two sample pages:
The html form I would like to simulate (this page will work if you
paste it)
test.html:
<HTML>
<HEAD>
<FORM METHOD="POST"
ACTION="https://esqa.moneris.com/hosted/index.php">
<INPUT TYPE="HIDDEN" NAME="store_id" VALUE="store1">
<INPUT TYPE="HIDDEN" NAME="charge_total" VALUE="1.01">
<INPUT TYPE="HIDDEN" NAME="return_URL"
VALUE="http://www.yahoo.com">
<INPUT TYPE="HIDDEN" NAME="receipt_URL"
VALUE="http://www.yahoo.com">
<INPUT TYPE="HIDDEN" NAME="hide_item" VALUE="1">
<INPUT TYPE="HIDDEN" NAME="hide_address" VALUE="1">
<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Click to proceed to
Secure Page">
</FORM>
</HEAD>
</HTML>
THE ASP page that should(?) submit the info automatically for me:
but, when I run this page, instead of
'https://esqa.moneris.com/hosted/index.php' appearing in my Browser
address bar, it shows:
http://mycomputer/mypath/test2.asp
It might be useful if someone could run this on their server (with
good MSXML2 install) to let me know if they get the same as the HTML
form above, or the same as I do.
========================
test2.asp:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<%
dim xmlhttp
url = "https://esqa.moneris.com/hosted/index.php"
set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "POST", url, false
xmlhttp.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"
formdata="store_id=store1&" & _
"charge_total=1.01&" & _
"return_URL= www.yahoo.com&" & _
"receipt_URL=www.yahoo.com&" & _
"hide_items=1&" & _
"hide_address=1"
xmlhttp.send formdata
Response.write xmlhttp.responseText
set xmlhttp = nothing
%>
</HEAD>
</HTML>
On Mon, 15 Dec 2003 20:06:28 -0500, "Ray at <%=sLocation%>"
<myfirstname at lane34 dot com> wrote:
Use the link that Chris posted. Are you trying to jerry-rig thins though?
One of your vendors instructs you to grab data from their website and put it
in your own? You'd think they'd offer something to do this for you.
Ray at work
"Terry" <sa********@shaw.ca> wrote in message
news:p4********************************@4ax.com.. . I will give a little more info. I was trying to keep it short and
probably confused things a bit by saying 'myNextPage.asp' ... that
page is actually on a 3rd party server.
I am trying to create a standardized ASP page I can call that will
handle 2 (or more) different processing methods for credit cards. One
of our 3rd party vendors accepts a post using a querystring. The
other vendor accepts a form post. So the modified code might look
something like this:
Is there a better to handle this?