Click here to Skip to main content
11,811,971 members (54,200 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VS2005 VB ASP.NET Visual-Studio , +
Hi all,

I am developing payment gateway application using with the help of, the thing is i done this application perfectly but i got some page redirecting issue, my payment flow should like this, (registerd user only can able to click payment button) that is user can click the payment button its sudently go to payment page ,in this i can pass the value through post method only.In this page user can able to submit their account details .once they submit the pay button, the page has been redirect to mypaysuccess.aspx were i mentioned in the code. But my point is that page cannot be redirect to mypaysuccess.aspx which is redirecting to anothor page that is signin.aspx but it should i need to redirect mypaysuccess.aspx only .also the same user once again do the above flow with the same browser then its working fine the page has been redirect to mypaysuccess.aspx page.So this is my problem. please find out my application code which i declared in the mentioned payment page.please give me a drop of solution which is very helpful for me your thoughts...

payment button click page:
Protected Sub ibRegister_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ibRegister.Click
            Dim result() As String = New String(5) {}
            Dim objCls As clsCommon = New clsCommon()
            Dim amount As String
            amount = drpAmount.Text.Trim().Substring(1)
            result = objCls.beforetrans(Session("user_name").ToString(), Session("user_id").ToString(), Session("user_email").ToString(), Convert.ToInt32(amount))
            ttid = result(0)
            ttkey = result(1)
            Session.Add("user_amount", amount)
            'Session.Add("user_ttid", ttid)
            'Session.Add("user_ttkey", ttkey)

            HttpContext.Current.Response.Write(String.Format("</head><body onload=""document.form1.submit()"">"))
            HttpContext.Current.Response.Write(String.Format("<form name=""form1"" method=""Post"" action="""">"))
            HttpContext.Current.Response.Write(String.Format("<input name=""sitereference"" type=""hidden"" value=""test_payment2342"">"))
            HttpContext.Current.Response.Write(String.Format("<input name=""currencyiso3a"" type=""hidden"" value=""GBP"">"))
            HttpContext.Current.Response.Write(String.Format("<input name=""mainamount"" type=""hidden"" value=""" + amount + """>"))
            HttpContext.Current.Response.Write(String.Format("<input name=""version"" type=""hidden"" value=""1"">"))
            HttpContext.Current.Response.Write(String.Format("<input name=""orderreference"" type=""hidden"" value=""" + Session("user_id").ToString() + """>"))
            HttpContext.Current.Response.Write(String.Format("<input name=""ttid"" type=""hidden"" value=""" + ttid + """>"))
            HttpContext.Current.Response.Write(String.Format("<input name=""ttkey"" type=""hidden"" value=""" + ttkey + """>"))
        Catch ex As Exception
        End Try
    End Sub
mypaysuccess.aspx page:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Session("user_id") <> Nothing Then
            If Not Page.IsPostBack Then
                If Session("user_type") = 1 Then
                End If
                lbluserwelcome.Text = "Welcome " & Session("user_name") & " " & Session("user_surname") & " to home"
            End If
            Session.Abandon() 'abandon that user session
        End If
        Dim result() As String
        Dim clsobj As clsCommon = New clsCommon
        result = clsobj.fnGetCustomerAccountinfo(Session("user_id"))
        If result(0) = 1 Then
            lblBalance.Text = "My Account Balance is:;" & result(2)
            lblBalance.Text = "Unable to retrieve your balance  at the moment .Please try again later"
        End If
    End Sub
Posted 12-Oct-12 0:21am
Edited 12-Oct-12 0:33am
(no name)117.2K

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 KrunalRohit 354
1 Palash Mondal_ 185
2 CHill60 180
3 OriginalGriff 178
4 Abhinav S 175
0 OriginalGriff 3,888
1 KrunalRohit 2,392
2 CPallini 2,240
3 Maciej Los 2,155
4 ppolymorphe 1,725

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 12 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100