stanley-king 3 anni fa
parent
commit
2f4224f21c
1 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. 7 3
      helper/refill/api/xyz/jinfeng/RefillPhone.php

+ 7 - 3
helper/refill/api/xyz/jinfeng/RefillPhone.php

@@ -86,12 +86,16 @@ class RefillPhone extends refill\IRefillPhone
                 if ($status === '026')
                 {
                     //订单不存在状态,三小时内查询可失败,超过则返回充值中.不可以在下单后的同时立马发起查询,否则返回该状态处理为充值中,至少隔30秒以上再发起查询
-                    if (time() - $refill_info['commit_time'] <= 10800 && time() - $refill_info['commit_time'] >= 30) {
-                        $order_state = ORDER_STATE_CANCEL;
+                    $commit_secs = time() - $refill_info['commit_time'];
+                    if ($commit_secs > 0 && $commit_secs < 30) {
+                        return [false, '时长不足'];
+                    } elseif ($commit_secs <= 10800 && $commit_secs >= 30) {
+                        $order_state = ORDER_STATE_NOEXIST;
                     } else {
                         $order_state = ORDER_STATE_SEND;
                     }
-                } else {
+                }
+                else {
                     $order_state = ORDER_STATE_CANCEL;
                 }
             }