Losing user cookies and session data after being redirected from payment gateway

为君一笑 提交于 2020-06-26 03:58:33

问题


I am using ASP.net MVC5 for my e-commerce project . I am not using any SSL . I have also successfully integrated the payment gateway. The problem i am facing is that while i am posting data to the payment gateway it process the payment and send backs the response to our web application action method the user gets logged out i.e. User.idenity sets back to null .

I think it occurs beacuse of HTTP to HTTPS connection as every gateway uses https as a security. and after getting redirected to https it removes all the cookies and session data.

But I don't want to use https connection in order to retain the User login session . Please tell me how to retain my user signin state after it gets redirected back from payment gateway.


回答1:


Please check here I have faced similar issue while integrating CC avenue payment gateway. To fix the issue, I have set the cookie domain name something like this <httpCookies domain="localhost" httpOnlyCookies="false" requireSSL="false" /> with sessionstate cookieSameSite="None". This has worked perfectly.



来源:https://stackoverflow.com/questions/39755885/losing-user-cookies-and-session-data-after-being-redirected-from-payment-gateway

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!