|AM trying to integrate an online payment system, where the secure payment gateway will send a notification to a specified URL on my site - I have given a generic handler (.ashx) address. I can read the data they send (it's a simple POST), but they require that I send back:
a notification with a response of: "HTTP/1.1 200 OK".
I am not sure what they want... Is a simple
context.Response.ContentType = "text/plain"
context.Response.Write("HTTP/1.1 200 OK")
enough? Perhaps necessarily preceded with
context.Response.StatusCode = 200
Or is something more sophisticated required, along the lines of
Dim req As System.Net.HttpWebRequest = System.Net.WebRequest.Create("https://secure-gateway-url")
req.Method = "POST"
req.ContentType = "application/x-www-form-urlencoded"
req.Accept = "HTTP/1.1 200 OK" ?????
req.Headers .Add ( ?????
Dim param As Byte() = context.Request.BinaryRead(HttpContext.Current.Request.ContentLength)
Dim strRequest As String = Encoding.ASCII.GetString(param)
req.ContentLength = strRequest.Length
Dim streamOut As System.IO.StreamWriter = New System.IO.StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII)
with what needed at the lines flagged ????
I’d be very grateful for any advice... thanks