I have started writing tips on my different blog instead of this one. Make sure to follow that one so that you can get latest updates. Here is the link- StackBlogger: Tips and Tricks about Programming
Also follow my another Blog where I write how to make money online, tips about blogging, content creation etc. Here is the link- FlexiPlanet: A hub for Content Marketing.
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:
https://developer.intuit.com/docs/030_qbms/0070_advanced_topics/payment_wallet
and Call above function where you want to call.
As:
getSession("https://merchantaccount.ptc.quickbooks.com/j/AppGateway")
Enjoy…