Hi,
For many months I have been trying to get parse XML data to the HSBC payment gateway. Finally, I can get the data from a form to the server in XML and receive a reply. This is great but I get a whole load of xml back and I need to pull only certain elements.
Could anyone see what I can do with this(Response.Write xmlhttp.responsexml.xml) to change it to pull <FileTime></FileTime> out without all the other XML nodes?
Any help would be great thanks a lot.
CODE:
<%@ Language=vbScript%>
<%
'value = Request.Form("id")
cardtype = "Mastercard" 'Request.Form
cardauth = "cardsuth" ' FIND THIS FROM 170
cardnumber = Request.Form("cardnumber")
expirydate = Request.Form("cardnumber")
amount = Request.Form("amount")
DataToSend = "<EngineDocList><DocVersion DataType='String'>1.0</DocVersion><EngineDoc><ContentType DataType='String'>OrderFormDoc</ContentType><User><ClientId DataType='S32'>12121</ClientId><Name DataType='String'>XML Payments</Name><Password DataType='String'>password</Password></User><Instructions><Pipeline DataType='String'>PaymentNoFraud</Pipeline></Instructions><OrderFormDoc><Mode DataType='String'>Y</Mode><Consumer><PaymentMech><Type DataType='String'>" & cardtype & "</Type><CreditCard><Number DataType='String'>" & cardnumber & "</Number><Expires DataType='ExpirationDate' Locale='826'>" & expirydate & "</Expires></CreditCard></PaymentMech></Consumer><Transaction><Type DataType='String'>" & cardauth & "</Type><CurrentTotals><Totals><Total DataType='Money' Currency='826'>" & amount &"</Total></Totals></CurrentTotals></Transaction></OrderFormDoc></EngineDoc></EngineDocList>"
dim xmlhttp
set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST"," xmlhttp.setRequestHeader "Content-Type", "application/x- xmlhttp.send DataToSend
Response.ContentType = "text/xml"
Response.Write xmlhttp.responsexml.xml
Set xmlhttp = nothing
%>
For many months I have been trying to get parse XML data to the HSBC payment gateway. Finally, I can get the data from a form to the server in XML and receive a reply. This is great but I get a whole load of xml back and I need to pull only certain elements.
Could anyone see what I can do with this(Response.Write xmlhttp.responsexml.xml) to change it to pull <FileTime></FileTime> out without all the other XML nodes?
Any help would be great thanks a lot.
CODE:
<%@ Language=vbScript%>
<%
'value = Request.Form("id")
cardtype = "Mastercard" 'Request.Form
cardauth = "cardsuth" ' FIND THIS FROM 170
cardnumber = Request.Form("cardnumber")
expirydate = Request.Form("cardnumber")
amount = Request.Form("amount")
DataToSend = "<EngineDocList><DocVersion DataType='String'>1.0</DocVersion><EngineDoc><ContentType DataType='String'>OrderFormDoc</ContentType><User><ClientId DataType='S32'>12121</ClientId><Name DataType='String'>XML Payments</Name><Password DataType='String'>password</Password></User><Instructions><Pipeline DataType='String'>PaymentNoFraud</Pipeline></Instructions><OrderFormDoc><Mode DataType='String'>Y</Mode><Consumer><PaymentMech><Type DataType='String'>" & cardtype & "</Type><CreditCard><Number DataType='String'>" & cardnumber & "</Number><Expires DataType='ExpirationDate' Locale='826'>" & expirydate & "</Expires></CreditCard></PaymentMech></Consumer><Transaction><Type DataType='String'>" & cardauth & "</Type><CurrentTotals><Totals><Total DataType='Money' Currency='826'>" & amount &"</Total></Totals></CurrentTotals></Transaction></OrderFormDoc></EngineDoc></EngineDocList>"
dim xmlhttp
set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST"," xmlhttp.setRequestHeader "Content-Type", "application/x- xmlhttp.send DataToSend
Response.ContentType = "text/xml"
Response.Write xmlhttp.responsexml.xml
Set xmlhttp = nothing
%>