Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integrate HSBC E-commerce API with XML

Status
Not open for further replies.

BDC2

Programmer
Mar 14, 2002
435
GB
I'm trying to integrate HSBC Bank's e-payment API solution into a re-developed site but I'm not getting any help from them and their documentation is awful, can anyone help?

Customer enters their credit card details on my site using a form. I put the order information (not credit card info) into my database, then I must generate XML and re-post using a form to their server.

Their server responds with XML in the browser, but I'm left on their server and can't get back to my site. I must be missing something, as I don't see how I can use the browser to send XML and then receive a response in XML so that I can process it and then redirect them to a thank you page.

I have 2 questions,
What is the best way of re-posting the data after I have converted it to XML from a customer experience perspective?

How do I read back the XML from the browser and redirect them to a thank you page when the browser the browser is now pointing to their server? Is it possible to send and receive XML without using the browser?

BDC.
 
I didn't realise I could emulate POST using:

xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlHTTP.open "POST", " False
xmlHTTP.send xmlDoc

then get the response back using:

xmlDoc.async = False
If xmlDoc.loadXML(xmlHTTP.responseText) Then
Set Root = xmlDoc.documentElement
response.write("<?xml version=""1.0"" encoding=""UTF-8""?>")
response.write(Root.xml)
End if

I hope this can help someone else

BDC.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top