Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

ASP.N ET - Losing session when going to Payment Portal

Options
  • 11-06-2011 10:28am
    #1
    Moderators, Home & Garden Moderators, Regional Midwest Moderators, Regional West Moderators Posts: 16,723 Mod ✭✭✭✭


    Hoping someone can assist on this one.

    Site is ASP.NET and when the user logs in we authenticate them and this is stored within the session while the user is making the booking.
    On each page we ensure the user is authenticated in the page load. Works fine so far.

    Problem hit now in that we are using Barclays payments for the transactions.
    You have an "allowed URL", which is the webpage you are coming from, it its the "payment.aspx" page. That works fine as it then pops up the Barclays page and you enter your details, CC, address etc.
    When you are complete you hit the "Process Payment" button on the Barclays site it sends to back to your website ( you have to provide URL as part of the setup of the site.)

    This is where the problem is now for me and I can't seem to get a resolution to it. We we are returned from Barclays, even though it returns back to our website, it is returning an error and telling us that the "Return URL failed".
    The detail of the error is that its showing that instead of successfully returning to this URL:
    "http://13.13.18.13/bookings/cashtransactionff.aspx"
    what happening is that its going to this URL:
    "http://13.13.18.13/login.aspx?ReturnUrl=/bookings/cashtransactionff.aspx"

    From my understanding its like its coming back to the site "fresh" and trying to access that page, where in fact it should be returning to the already "opened" site.

    I hope this makes sense!

    Any thoughts?


Comments

  • Registered Users Posts: 11,979 ✭✭✭✭Giblet


    Have you debugged the session state and incoming request cookie values?


  • Moderators, Home & Garden Moderators, Regional Midwest Moderators, Regional West Moderators Posts: 16,723 Mod ✭✭✭✭yop


    Thanks for the reply.
    I can't debug it within VS as when I run the site its a "localhost" address and the payment gateway doesn't recognise it on the return URL.

    I have tried to attach to the process to debug but its not picking up any of the breakpoints!

    I am probably missing something there with that though?


  • Registered Users Posts: 11,979 ✭✭✭✭Giblet


    Are you in debug mode or release?


  • Moderators, Home & Garden Moderators, Regional Midwest Moderators, Regional West Moderators Posts: 16,723 Mod ✭✭✭✭yop


    Giblet wrote: »
    Are you in debug mode or release?

    Im in debug mode.


  • Registered Users Posts: 7,632 ✭✭✭Trampas


    Should your return url not be

    http://13.13.18.13/bookings/cashtransactionff.aspx

    or something like that.

    I remember a few years ago having something similar and I think I pass in the details that I need about the user onto the payment page e.g. Name and address as session values where been lost between my site and payment site.


  • Advertisement
  • Moderators, Home & Garden Moderators, Regional Midwest Moderators, Regional West Moderators Posts: 16,723 Mod ✭✭✭✭yop


    Trampas wrote: »
    Should your return url not be

    http://13.13.18.13/bookings/cashtransactionff.aspx

    or something like that.

    I remember a few years ago having something similar and I think I pass in the details that I need about the user onto the payment page e.g. Name and address as session values where been lost between my site and payment site.

    Sorry yes that is the return URL, typo in my original.
    for some reason when it comes back to that page it seems to think the user is not logged in and its throwing them back to the login page.

    Very frustrating.


  • Registered Users Posts: 2,781 ✭✭✭amen


    I can't debug it within VS as when I run the site its a "localhost" address and the payment gateway doesn't recognise it on the return URL.

    solution for that is you get asp.net to write to a log file (txt file) recording what you need to know.


    When you go to Barclays do you not pass user/session info to Barclays and then get them to pass the data back to you. Once you have it back you just revalidate your user.

    I'm sure its a type but if you processing orders I assume you are using https and not http ?


  • Registered Users Posts: 7,632 ✭✭✭Trampas


    you will need to assume the user is still logged in on the initial return.

    you pass the require info you need in the return to the payment page.

    this information should be in a it's own tag on the xml with authcode or payres

    i can have a look tomorrow when back in work as it was a few years ago since i did it


Advertisement