Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VS2005 ASP.NET VB.NET
Hi all,
 
I am developing payment gateway application using vb.net with the help of asp.net, 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
        Try
            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.Clear()
            HttpContext.Current.Response.Write("<html><head>")
            HttpContext.Current.Response.Write(String.Format("</head><body onload=""document.form1.submit()"">"))
            HttpContext.Current.Response.Write(String.Format("<form name=""form1"" method=""Post"" action=""https://payments.securetrading.net/process/payments/choice"">"))
            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 + """>"))
 
            HttpContext.Current.Response.Write("</form>")
            HttpContext.Current.Response.Write("</body></html>")
            HttpContext.Current.Response.End()
    
        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
        Response.Cache.SetCacheability(HttpCacheability.NoCache)
 
        If Session("user_id") <> Nothing Then
            If Not Page.IsPostBack Then
 
                If Session("user_type") = 1 Then
                    'show_adminmenus()
                End If
                lbluserwelcome.Text = "Welcome " & Session("user_name") & " " & Session("user_surname") & " to home"
            End If
        Else
            Session.Abandon() 'abandon that user session
            Server.Transfer("~/signin.aspx")
        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)
        Else
            lblBalance.Text = "Unable to retrieve your balance  at the moment .Please try again later"
        End If
    End Sub
Posted 12-Oct-12 1:21am
Edited 12-Oct-12 1:33am
(no name)105.8K
v2

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

  Print Answers RSS
0 OriginalGriff 250
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 DamithSL 125
4 Afzaal Ahmad Zeeshan 120
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 12 Oct 2012
Copyright © CodeProject, 1999-2014
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