User944339287 posted
Hi guys. my website will post to this URL http://localhost:58315/post-testing/https://testsecureacceptance.cybersource.com/pay when I trigger it at http://localhost:58315/post-testing/
How can i fix it? tqtq
below is my code for posting value to specific URL (https://testsecureacceptance.cybersource.com/pay)
Public Sub New()
inputValues = New NameValueCollection()
Url = "https://testsecureacceptance.cybersource.com/pay"
Method = "post"
FormName = "ePayment"
End Sub
Public Sub Post()
Dim context = HttpContext.Current
context.Response.Clear()
context.Response.Write("<html><head>")
context.Response.Write(String.Format("</head><body onload=""document.{0}.submit()"">", FormName))
context.Response.Write(String.Format("<form name=""{0}"" method=""{1}"" action=""{2}"" >", FormName, Method, Url))
For i As Integer = 0 To inputValues.Keys.Count - 1
context.Response.Write(String.Format("<input name=""{0}"" type=""hidden"" value=""{1}"">", HttpUtility.HtmlEncode(inputValues.Keys(i)), HttpUtility.HtmlEncode(inputValues(inputValues.Keys(i)))))
Next
context.Response.Write("</form>")
context.Response.Write("</body></html>")
context.Response.[End]()
End Sub