有关在我的数据库中管理订阅付款状态的问题
开发一款人们每月付费使用的应用程序。他们可以按月或提前一年支付折扣价。
确保它们是最新的的最佳方法是什么?
我最好的猜测是,当他们付款时,会计算到期日期,然后每次他们登录应用程序时都会检查当前日期是否<<。到期日期。
最好的方法是什么?有哪些陷阱?必要的维护要求是什么?
Developing an app that people pay a monthly subscription to use. They can pay monthly or a year in advance for a reduced price.
What is the best way to make sure they are up to date?
My best guess is, when they make a payment, an expiration date is calculated and then each time they log in the app checks to see if the current date is < the expiration date.
What's the best way to do this? What are the pitfalls? What are necessary maintenance requirements?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为他们的订阅设置到期日期绝对是最佳选择。我想不出这有什么陷阱,这可能是迄今为止最简单的解决方案。此外,没有任何真正的维护要求 - 应用程序可以简单地检查当前日期是否在到期日期之前,如果是则运行,否则输出一条消息。
Setting an expiration date for their subscription is definitely the way to go. I can't think of any pitfalls to this, and it's probably by far the simplest solution. Also, there aren't any real maintenance requirements - the app can simply check if the current date is before the expiration date, and if it is it runs, otherwise it outputs a message.