Here I am going to explain that how to integrate QuickBooks API in your website.
QuickBooks is a payment gateway based website which provides the way to integrate your business with accounting and processing your payments easily with it.
Run below function from your Visual Studio VB project
Protected Function getSession(ByVal Site As String) Dim req As WebRequest = WebRequest.Create(Site) Dim xmldom As New XmlDocument Dim request_xml As String Dim myWriter As StreamWriter xmldom.Load(Server.MapPath("~\input.xml")) request_xml = xmldom.InnerXml req.Method = "POST" req.ContentLength = request_xml.Length req.ContentType = "application/x-qbmsxml" myWriter = New StreamWriter(req.GetRequestStream) myWriter.Write(request_xml) myWriter.Close() Dim resp As WebResponse = req.GetResponse() Dim s As Stream = resp.GetResponseStream() Dim sr As StreamReader = New StreamReader(s, Encoding.ASCII) Dim doc As String = sr.ReadToEnd() Return doc End Function
Where “input.xml” is a file which consist your XML parameters with Credit Card information.
Take a look that how “input.xml” file can be:
and Call above function where you want to call.