浏览代码

huiyuan remove official_sn check

xiaoyu 1 年之前
父节点
当前提交
e5ca69c9d2
共有 2 个文件被更改,包括 12 次插入14 次删除
  1. 4 5
      helper/refill/api/xyz/huiyuan/RefillCallBack.php
  2. 8 9
      helper/refill/api/xyz/huiyuan/RefillPhone.php

+ 4 - 5
helper/refill/api/xyz/huiyuan/RefillCallBack.php

@@ -31,20 +31,19 @@ class RefillCallBack implements refill\IRefillCallBack
         $order_sn = $params['bill_id'];
         $order_info = Model('vr_order')->getOrderInfoForNotify(['order_sn' => $order_sn]);
         if (empty($order_info)) {
-            return [false, false, false, false, ''];
+            return [false, false, false, false];
         }
 
-        $official_sn = '';
         $order_id = $order_info['order_id'];
         if ($status === '成功') {
             $official_sn = strtolower($params['operator_bill_no']) == 'null' ? '' : $params['operator_bill_no'];
             $data['official_sn'] = $official_sn;
             Model('refill_order')->edit($order_id, $data);
-            return [$order_id, true, false, true, $official_sn];
+            return [$order_id, true, false, true];
         } elseif ($status === '失败') {
-            return [$order_id, false, true, true, $official_sn];
+            return [$order_id, false, true, true];
         } else {
-            return [$order_id, false, false, false, $official_sn];
+            return [$order_id, false, false, false];
         }
     }
 }

+ 8 - 9
helper/refill/api/xyz/huiyuan/RefillPhone.php

@@ -99,17 +99,16 @@ class RefillPhone extends refill\IRefillPhone
 
         $resp = http_request(config::QUERY_URL, $params, 'POST', false, config::ExtHeaders);
         if (empty($resp)) {
-            return [false, '网络错误', ''];
+            return [false, '网络错误'];
         }
         else
         {
             $resp = $this->decode_tag($resp);
             if (empty($resp)) {
-                return [false, '网络错误', ''];
+                return [false, '网络错误'];
             }
             elseif ($resp['ret_code'] === '0')
             {
-                $official_sn = '';
                 $status = $resp['bill_status'];
                 if ($status === '成功') {
                     $official_sn = $resp['operator_bill_no'];
@@ -121,25 +120,25 @@ class RefillPhone extends refill\IRefillPhone
                 } elseif ($status === '处理中') {
                     $order_state = ORDER_STATE_SEND;
                 } else {
-                    return [false, $resp['ret_msg'], $official_sn];
+                    return [false, $resp['ret_msg']];
                 }
-                return [true, $order_state, $official_sn];
+                return [true, $order_state];
             }
             elseif ($resp['ret_code'] === '-1')
             {
                 if ($resp['bill_status'] === '失败' || $resp['ret_msg'] === '接口单失败') {
-                    return [true, ORDER_STATE_CANCEL, ''];
+                    return [true, ORDER_STATE_CANCEL];
                 }else{
-                    return [false, $resp['ret_msg'], ''];
+                    return [false, $resp['ret_msg']];
                 }
             }
             elseif ($resp['ret_code'] === '8' && (time() - $refill_info['commit_time'] >= 600))
             {
-                return [true, ORDER_STATE_NOEXIST, ''];
+                return [true, ORDER_STATE_NOEXIST];
             }
             else
             {
-                return [false, $resp['ret_msg'], ''];
+                return [false, $resp['ret_msg']];
             }
         }
     }