Sorry just made a change to "payResult. asp" Check that page again if you seen it before I made the edits.
passing variable from asp.net to asp
Collapse
X
-
Ryna, a 404 error means that it can't find the page that you're redirecting to.
You should check to make sure that the URLs are correct.
Try using the .NET debugger (that comes with VisualStudio) to step through your code and make sure that the URLs are pointing to the right place. If you don't want to use the debugger for some reason you could try hard coding the URL of the payResult.asp page:
Code:'What are you doing here????? If (Left(Request.Form("return_url"), 7) <> "http://") Then errorInput = errorInput & "Invalid return URL path! <BR>" errorExist = True Response.Redirect("inputerror.aspx") 'The following line will not be executed.................. 'Anything that comes after a Response.Redirect is not executed Response.Redirect("InvalidUrlError.aspx") Else Session("res") = response_code Session("text") = response_text 'Instead of this please try hard coding the return url ' Response.Redirect((Request.Form("return_url"))) 'Try this instead '(Make sure that the URL is correctly pointing to the payResult.asp page): Response.Redirect("http://localhost/websiteDirectory/payResult.asp?res=" & response_code,True) End If
Comment
-
hi croCrew...
my fault.The codes that you want me to test it works but
Response.Redire ct(Request.Form ("return_url ") & "?res=" & response_code & "&text=" & response_text)
the one in bold there's curly line below...
it says variable"respon se_text" is used before it has been assigned a value.A null reference exception could result in at runtime.
it almost working..Comment
-
when I enter the wrong credit card it did not show the error message
which is : response_text = "Invalid Credit Card No"
however when it is successful(ente r correct information) it print out this line:
Response.Write( "Thank You for buying GOODS from our online Store!")Comment
Comment