Differences

This shows you the differences between two versions of the page.

Link to this comparison view

quickbooks_qbms_integration_vbdotnet [2013/01/21 12:44] (current)
Line 1: Line 1:
 +====== QuickBooks Merchant Services with Visual Basic .NET ======
  
 +<code>
 +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("~\XML\GetSessionTicket.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 
 +</code>
quickbooks_qbms_integration_vbdotnet.txt · Last modified: 2013/01/21 12:44 (external edit)