User-1930983775 posted
I have an e-commerce app that submits to world pay for card processing, I use the session to store UserID for account related data filtering, and all apeared to work fine. However I have just noticed that if you go through the entire checkout process and return
to my site, the callback page does all the updates to the orders db, sends email and then calls session.abandon() to make sure the old cart & order ID's are destroyed. If you then add more items and checkout for a second time the callback fails. I then did
a further check, closing and reopening the browser, adding a few items, then calling session abandon() (via a cancel order page) and started shopping again, after checkout the callback failed! as far as I can see the only thing that could possibly be causing
this and the only thing that is the same between the two methods described above is the use of session.abandon() are there any other methods for ensuring all session data is cleared? Many thanks Que
User-583980620 posted
What's used in the callback page? Is there a session ID for the user that's getting wiped out? (Such as customer number?) I would try removing only the session objects you want removed, without clearing the whole session. Use Session.Remove(key), because not
only will it erase the value, it also erases the key name from session state. (Session[key]=null will erase the value but leave the variable behind.)