如何在清除cookie后立即生效 [英] How to make it effective immediately after clear cookie

查看:145
本文介绍了如何在清除cookie后立即生效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就像这样的情况

我的客户去了我的商店买东西,所以一旦用户选择放入购物车的产品,我会生成一个cookie,当这个用户通过支付系统时,在从paypal支付的Vertify之后,我清除了cookie。



奇怪的事情发生在那里,当我再次点击我的购物车时,付费产品仍在购物车中,需要我的手动点击其他地方,然后清除购物车。



或手动刷新页面。



Doesn有谁知道如何解决这个问题?

The situation just like this
My client went to my store to buy stuffs, so once user select a product put into the shopping cart I gennerate a cookie, when this user go throught the payment system, after vertify paid from paypal, I clear the cookie.

Strange thing happen there, when I click my cart again, the paid products still in the cart,need my manually click some where else, then the cart clear.

or Manually refresh the page.

Doesn't anyone know how to solve this problem?

推荐答案

你应该考虑一个不使用cookie的解决方案,关于与从PayPal返回事件相关的动作(成功)你应该清理购物车(在你的代码后面)然后重定向到你的商店。
You should think to a solution without using cookies, on the action associated with the event "Return from PayPal" (with success) you should do the clearing of the shopping cart (in your code behind) then redirect to your shop.


这篇关于如何在清除cookie后立即生效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆