基于用户帐户状态的弹出窗口
我想创建一个弹出窗口,这很简单,但是事情是这样的,如果您成为付费会员,我想隐藏它,如果您下个月不订阅,我希望它再次出现,我正在使用 paypal 按钮 html代码而不是 ipn,paypal 按钮位于网站的帐户部分,如果您愿意,我可以将其放在弹出窗口中,如果需要,我可以使用 ipn,而不是 html 代码,只是想要某人指导我如何完成了
I want to create a popup which is easy, but here's thing, I want to hide it if you become a paid member, and I want it to appear again if you don't subscribe the next month, I am using the paypal button html code and not the ipn, the paypal button is in the account section of the site, well if you want I can put it in the pop-up and i can use the ipn if i have to, instead of the html code just want someone to guide me on how it's done
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您将需要某种用户身份验证来查看某人是否购买了您的产品。这应该使用服务器端语言(PHP、Ruby 等)来处理,并且您可以根据用户是否已通过身份验证来更改页面的布局。
如果您没有任何服务器端代码,您可以使用在收到来自 PayPal 的成功回调时保存的 cookie,但这不会非常可靠,因为如果用户更改浏览器,则不会找到它们或电脑。
You're going to need some sort of user authentication to see if someone has purchased your product or not. This should be handled with a server-side language (PHP, Ruby, etc.) and you can change the layout of your page based on whether the user has authenticated or not.
If you don't have any server-side code, you could use cookies that are saved when you receive a successful callback from PayPal, but that isn't going to be very reliable because they won't be found if the user changes browsers or computers.
如果您不想使用后端,请使用 cookie。如果 cookie 中存储了正确的值,请使用 javascript 隐藏或更改页面上的元素
If you dont want to use a back-end then use cookies. If they have correct values stored in the cookie, use javascript to hide or change the elemts on the page