duannian4784 2014-02-18 05:30
浏览 39

如何限制用户10分钟在paypal上付款

I am working on booking website. When any user come to site, select any date & time for booking and go to paypal for payment. Before going to paypal, I am adding this entry to booking, so any other user can not go for booking on that specific time for that date. Now if user does not make payment on paypal and stay idle. In this case that time gets blocked. I want user should have 10 minutes to make a payment on paypal. If time exceeds user should redirect to my website with any flag, so I can remove that booking and that time - date will be available for booking to users.

I can use cron job which can remove bookings which are in pending status in database for more than 10 mins. Major problem I am facing is

1) When I go to paypal for payment and stay idle, paypal automatically redirect after 5 min (giving error of session time out)

2) But when I go to paypal and log in with sandbox account and then stay idle, if after 5 min, I try to do any activity, it gives error of time out, and redirect to login screen of paypal. So it allow me to login again and proceed for payment.

By this way user can even pay after 1 hour. If I delete booking entry using cron, it will create conflict because payment is completed and there is no entry in database.

I want way to explicitly redirect user from paypal to my site after 10 mins.

  • 写回答

3条回答 默认 最新

  • douba4933 2014-02-18 05:46
    关注
     <?php
       // Create and start timer firing after 10 minute
        $w1 = new EvTimer(600, 0, function () {
        echo "10 minute elapsed
    ";
        //Your Condition
      });
          ?>
    

    use Timer and Write your condition in the Timer and check the user payment status

    评论

报告相同问题?

悬赏问题

  • ¥20 模型在y分布之外的数据上预测能力不好如何解决
  • ¥15 processing提取音乐节奏
  • ¥15 gg加速器加速游戏时,提示不是x86架构
  • ¥15 python按要求编写程序
  • ¥15 Python输入字符串转化为列表排序具体见图,严格按照输入
  • ¥20 XP系统在重新启动后进不去桌面,一直黑屏。
  • ¥15 opencv图像处理,需要四个处理结果图
  • ¥15 无线移动边缘计算系统中的系统模型
  • ¥15 深度学习中的画图问题
  • ¥15 java报错:使用mybatis plus查询一个只返回一条数据的sql,却报错返回了1000多条