stanley-king 3 years ago
parent
commit
c4e100c273

+ 11 - 5
helper/refill/api/xyz/lingzhman/RefillPhone.php

@@ -75,12 +75,16 @@ class RefillPhone extends refill\IRefillPhone
             }
 
             $status = $resp['status'];
-            if ($status === '001') {
+            if ($status === '001')
+            {
                 $order_state = ORDER_STATE_SUCCESS;
                 $save['official_sn'] = strtolower($resp['voucherNo']) == 'null' ? '' : $resp['voucherNo'];
                 Model('refill_order')->edit($refill_info['order_id'], $save);
-            } elseif (in_array($status,config::QueryErrCodes)) {
-                if ($status === '026') {
+            }
+            elseif (in_array($status,config::QueryErrCodes))
+            {
+                if ($status === '026')
+                {
                     //订单不存在状态,三小时内查询可失败,超过则返回充值中
                     if (time() - $refill_info['commit_time'] <= 10800) {
                         $order_state = ORDER_STATE_CANCEL;
@@ -90,9 +94,11 @@ class RefillPhone extends refill\IRefillPhone
                 } else {
                     $order_state = ORDER_STATE_CANCEL;
                 }
-            } elseif ($status === '002') {
+            }
+            elseif ($status === '002') {
                 $order_state = ORDER_STATE_SEND;
-            } else {
+            }
+            else {
                 return [false, $status];
             }
 

+ 12 - 6
helper/refill/api/xyz/lingzhman48/RefillPhone.php

@@ -79,20 +79,26 @@ class RefillPhone extends refill\IRefillPhone
                 $order_state = ORDER_STATE_SUCCESS;
                 $save['official_sn'] = strtolower($resp['voucherNo']) == 'null' ? '' : $resp['voucherNo'];
                 Model('refill_order')->edit($refill_info['order_id'], $save);
-            } elseif (in_array($status,config::QueryErrCodes)) {
-                if ($status === '026') {
+            }
+            elseif (in_array($status,config::QueryErrCodes))
+            {
+                if ($status === '026')
+                {
                     //订单不存在状态,三小时内查询可失败,超过则返回充值中
-                    if (time() - $refill_info['commit_time'] <= 10800) {
+                    if (time() - $refill_info['commit_time'] <= 3600 * 3) {
                         $order_state = ORDER_STATE_CANCEL;
                     } else {
                         $order_state = ORDER_STATE_SEND;
                     }
-                } else {
+                }
+                else {
                     $order_state = ORDER_STATE_CANCEL;
                 }
-            } elseif ($status === '002') {
+            }
+            elseif ($status === '002') {
                 $order_state = ORDER_STATE_SEND;
-            } else {
+            }
+            else {
                 return [false, $status];
             }