ASP.Net: Integrate QuickBooks Payment Gateway API in your website for payment processing

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
    request_xml = xmldom.InnerXml

    req.Method = "POST"
    req.ContentLength = request_xml.Length
    req.ContentType = "application/x-qbmsxml"
    myWriter = New StreamWriter(req.GetRequestStream)

    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.





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s