简体   繁体   English

从支付网关重定向后丢失用户 cookie 和会话数据

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

I am using ASP.net MVC5 for my e-commerce project .我在电子商务项目中使用 ASP.net MVC5。 I am not using any SSL .我没有使用任何 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 ie User.idenity sets back to null .我面临的问题是,当我将数据发布到支付网关时,它会处理支付并将响应发送回我们的 Web 应用程序操作方法,用户被注销,即 User.identity 设置回 null 。

I think it occurs beacuse of HTTP to HTTPS connection as every gateway uses https as a security.我认为这是因为 HTTP 到 HTTPS 连接的原因,因为每个网关都使用 https 作为安全性。 and after getting redirected to https it removes all the cookies and session data.在重定向到 https 后,它会删除所有 cookie 和会话数据。

But I don't want to use https connection in order to retain the User login session .但我不想使用 https 连接来保留用户登录会话。 Please tell me how to retain my user signin state after it gets redirected back from payment gateway.请告诉我如何在从支付网关重定向回来后保留我的用户登录状态。

Please check here I have faced similar issue while integrating CC avenue payment gateway.在此处查看我在集成 CC 大道支付网关时遇到过类似问题。 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".为了解决这个问题,我已经将 cookie 域名设置为<httpCookies domain="localhost" httpOnlyCookies="false" requireSSL="false" />和 sessionstate cookieSameSite="None"。 This has worked perfectly.这非常有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从第三方 API(支付网关)重定向后丢失 session 数据 - Losing session data after redirecting from a 3rd party API (payment gateway) 从会话存储/检索对象后,对象丢失事件处理程序 - Object is losing event handlers after being stored / retrieved from Session 从 ASP.NET MVC 5 中的支付网关重定向回来后的会话销毁问题 - session destroy problem after redirect back from payment gateway in ASP.NET MVC 5 在Postback之后丢失会话 - Losing the session after the Postback 如何在angularJS中接受来自支付网关服务器的http发布数据 - How to accept http posted data from payment gateway server in angularJS Session 在支付网关重定向到成功回调 url 在 asp mvc4 后被破坏 - Session getting destroyed after Payment gateway redirecting to success callback url in asp mvc4 当支付网关关闭时,如何在某些分钟后从 catch 语句中重新调用网关 API? - How to re-call gateway API from catch statement after certain minutes when payment gateway is down? 如何删除Cookie,重定向URL中的会话ID? - How to remove cookies,session ID's in redirected URL? C#.net Webform,避免会话超时丢失数据 - C#.net webform, avoid losing data from session timeout 重定向到登录后重定向回位置 - Redirect back to location after being redirected to login
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM