sending httpwebrequest to payment gateway
Hi all
ok my registration page for ecommerce is the final page before going to credit card gateway
The customer fills in all there details on my site and i then pass them to the gateway
i would like to do this in code if possible and will httpwebrequest handle what i want to do
VB Code:
Dim myRequest As HttpWebRequest = CType(HttpWebRequest.Create("http://www.creditcardgateway.com/"), HttpWebRequest)
myRequest.AllowAutoRedirect = False
myRequest.Method = "POST"
myRequest.ContentType = "application/x-www-form-urlencoded"
'Create post stream
Dim RequestStream As Stream = myRequest.GetRequestStream()
Dim SomeBytes() As Byte = Encoding.UTF8.GetBytes(strToSend)
RequestStream.Write(SomeBytes, 0, SomeBytes.Length)
RequestStream.Close()
'Send request and get response
Dim myResponse As HttpWebResponse = CType(myRequest.GetResponse(), HttpWebResponse)
but the real question is how to take the user to the page once ive posted the stuff
????