网上订票 [英] online ticket booking

查看:64
本文介绍了网上订票的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可用票:1
如果只有一张票并且有3位用户正在尝试预订票.

一个用户试图预订机票.

另外两个用户在恶作剧地预订机票,例如预订机票并前往付款站点而不付款,而他正在重复机票.

到目前为止我做了什么:


我会在用户预订机票时将其锁定
如果两个用户都在玩恶作剧,那么正在尝试预订机票的真实用户将无法轻松预订,因为他需要一次又一次尝试在这里可以做什么:(


如果许多用户试图在所有网站上预订剩余机票(1),我需要在所有预订系统中使用标准概念

在此先感谢

AVAILABLE TICKETS : 1
if there is one ticket and 3 user are trying to book it .

One user is trying to book the ticket.

other two user are playing a prank of booking a ticket like booking it and going to the payment site and not paying and he is repeating it .

what i have done till now:


i will lock the ticket when a user books it
if both the user are playing a prank the real user who is trying to book the ticket wont be able to book easily as he need to try again and again what can i do here :(


i need standard concepts used in all booking system if many user trying to book the remaining ticket(1) in all websites

thanks in advance

推荐答案

首先,一个用户如何到达付款页面?如果所选票证不再可用,则应该在对服务器的下一个请求中反映出来.

另一种选择是让用户像往常一样完成付款,但在内部将状态设置为应要求",这意味着应在有票时尽快将票分配给它,否则某人必须手动尝试通过尝试获取来解决此问题.将此用户的票证以其他方式分配给该用户.最坏的情况是,这将失败,用户将获得退款(可能会在下次购买时享受10%的折扣).在某些国家,有关于如何处理此类规则的规定.由于您的系统可能依赖于不仅向您出售票证而且向其他人出售票证的其他系统,因此票证之类的东西可能具有更宽松的特定规则.规则可能是,卖方有可能在例如24小时内取消购买,但当然应该向用户提及.

最好向用户显示有关下次往返服务器的票证不足的消息.对于网站而言,没有网络开销很难在页面上实时显示.我也不会担心这样的恶作剧,因为这样做实在没有乐趣.恶作剧者不会看到任何直接结果,因此不会立即满足于这样做.我们当然应该考虑那些没有生命但没有这种情况的人. ;-)

祝你好运!
First of all, how is it possible for user one to get to the payment page? If the selected ticket is not available anymore it should reflect this on the very next request to the server.

Another option would be to let user one finish the payment as usual but internally set the status to "on request", meaning that it should be assigned a ticket as soon as gets available or an someone must manually try to resolve this by trying to get a ticket for this user some other way and assign that to the user. The worst case would be that this fails and the user will get its money back (and maybe something like 10% off the next purchase). In some countries there are rules on how such should be handled. Something like tickets can have specific rules that are more lenient due to the fact that you system might depend on other systems that do not only sell tickets to you but also a lot of others. The rule could be that it is possible for the selling party to cancel the purchase in for example 24 hours but of course this should be mentioned to the user.

It would be best to show the user a message about being out of tickets on the next round trip to the server. For websites it is hard to show real time on the page without network overhead. I also wouldn''t be to worries such pranks because there is really no fun in doing it. The prankster won''t see any direct result and therefor won''t get instant gratification doing such a thing. We should of course mind about people that have no life but not in this situation. ;-)

Good luck!


这篇关于网上订票的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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