javascript - Restrict user to go BACK after Payment has been done -


i have integrated payment gateway in web application made in mvc4 razor. after payment has been done user redirected return url..

then process generating unique id ,sending payment details sms blah blah..

[nocache] public actionresult ipgresponse()         {             //send sms..             //save payment response..etc              return redirecttoaction("thankyouuploaddocument");         } 

then redirect action.

public actionresult thankyouuploaddocument()         {             //do              return view("thankyouuploaddocument" , paymentviewmodel);         } 

the problem when user hit .it goes ipgresponse() , steps again .

i have used [nocache]..but did not worked

i have restrict user go ipgresponse() or payment gateway again..

this should prevent caching:

        httpcontext.response.cache.setexpires(datetime.utcnow.adddays(-1));         httpcontext.response.cache.setvaliduntilexpires(false);         httpcontext.response.cache.setrevalidation(httpcacherevalidation.allcaches);         httpcontext.response.cache.setcacheability(httpcacheability.nocache);         httpcontext.response.cache.setnostore(); 

and idea server-check when form gets submitted , return error in case dark magic cache works. shouldn't.

edit: prevent browser's 'back' button loading cached page, question about. of course need check on page-enter see if transaction has taken place.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -