Helpful Information
 
 
Category: XML
xml.Send for Transparent Database Engine

I am using the below code to link into a payment processor for e-commerce. My question is------
On the xml.send "info to be passed" line, how can I pass in ASP code that I request from the form such as------
<%
CardNo = Request.Form("strCcNumber")
ExpMonth = Request.Form("dtmCcExpire")
ExpYear = Request.Form("dtmCcExpire2")
Total = Request.Form("intTotal")
ID = Request.Form("intOrderID")
%>
------------------------


Passing values to Transparent Database Engine
<%

Response.Buffer = True
Dim objXMLHTTP, xml

'Create & initialize the XMLHTTP object
Set xml = Server.CreateObject("Microsoft.XMLHTTP")

sRemoteURL = "https://www.pl"

'Open the connection to the remote server
xml.Open "POST", sRemoteURL, False

'Send the request to the Transparent Database Engine
xml.Send "ePNAccount=060&CardNo=4356&ExpMonth=02&ExpYear=05" & _
"&Total=22.99&Address=401 Alma &Zip=85224&HTML=No"

'store the response
sResponse = xml.responseText

Response.Write "<html><body>"

'parse the response string and handle appropriately
sApproval = mid(sResponse, 2, 1)

if sApproval = "Y" then
updatedb()
Response.Write "Your transaction has been approved. "


iPosition = instr(sResponse, ",")
if iPosition > 0 then
iAvsLength = len(sResponse) - iPosition - 2
Response.Write "AVS Response: <b>" & _
mid(sResponse, iPosition + 2, iAvsLength) & "</b>"
end if
elseif sApproval = "N" then
Response.Write "Your transaction has been declined with the " & _
"following response: <b>" & mid(sResponse, 3, 16) & "</b><br>"
else
Response.Write "The processor was unable to handle your " & _
"transaction, having returned the following response: <b>" & _
sResponse & "</b><br>"
end if

Response.Write "</body></html>"

Set xml = Nothing
%>:confused: :confused: :confused:

If you cannot get an answer to you question and are not locked in to that particular payment processor, take a look at $$$ ON THE NET(tm) (http://www.shift4.com/default.cfm?page=otn.cfm).

Sorry I cannot help you more...










privacy (GDPR)