stanley-king il y a 1 an
Parent
commit
0cc8d9722f

+ 1 - 1
helper/refill/api/xyz/xuyou_hf/RefillPhone.php

@@ -31,8 +31,8 @@ class RefillPhone extends refill\IRefillPhone
         $params['backurl'] = config::NOTIFY_URL;
         $params['sign'] = $sign;
         $params = json_encode($params);
-        $resp = http_post_data(config::ORDER_URL, $params , config::ExtHeaders);
 
+        $resp = http_post_data(config::ORDER_URL, $params , config::ExtHeaders);
         if (empty($resp)) {
             return [false, '系统错误', true];
         }

+ 7 - 5
helper/refill/api/xyz/xuyouoil/RefillOil.php

@@ -32,10 +32,9 @@ class RefillOil extends refill\IRefillOil
         $params = $this->req_params($card_no, $params['order_sn'], $params['productid'], $params['province']);
         $sign = $this->sign($params);
         $params['sign'] = $sign;
-
         $params = json_encode($params);
-        $resp = http_post_data(config::ORDER_URL, $params , config::ExtHeaders, $net_errno);
 
+        $resp = http_post_data(config::ORDER_URL, $params , config::ExtHeaders, $net_errno);
         if (empty($resp)) {
             return [false, '系统错误', true];
         }
@@ -77,9 +76,11 @@ class RefillOil extends refill\IRefillOil
             if (empty($resp)) {
                 return [false, '系统错误', ''];
             }
-            else {
+            else
+            {
                 $offical_sn = '';
                 $status = $resp['status'];
+
                 if ($status === 2) {
                     $offical_sn = $resp['voucher'];
                     $updata['official_sn'] = $offical_sn;
@@ -89,11 +90,12 @@ class RefillOil extends refill\IRefillOil
                     $order_state = ORDER_STATE_CANCEL;
                 } elseif ($status === 1) {
                     $order_state = ORDER_STATE_SEND;
-                } elseif ($status === 4 && (time() - $refill_info['commit_time'] > 300)) {
+                } elseif ($status === 4 && (time() - $refill_info['commit_time'] > 600)) {
                     $order_state = ORDER_STATE_NOEXIST;
                 } else {
                     return [false, $status, $offical_sn];
                 }
+
                 return [true, $order_state, $offical_sn];
             }
         }
@@ -130,7 +132,7 @@ class RefillOil extends refill\IRefillOil
     {
         $key = config::KEY;
         $content  = "mchid={$params['mchid']}&orderid={$params['orderid']}&number={$params['number']}&productid={$params['productid']}";
-        $content .= "&timestamp={$params['timestamp']}&youka={$params['youka']}&key={$key}";
+        $content .= "&timestamp={$params['timestamp']}&youka={$params['youka']}&key=$key";
         return md5($content);
     }
 

+ 0 - 4
helper/refill/api/xyz/xuyouoil/config.php

@@ -6,7 +6,6 @@ namespace refill\xuyouoil;
 class config
 {
     #旭友油卡
-
     const ORDER_URL = 'http://123.56.68.57:1008/hqorder/api/youkasubmit';
     const QUERY_URL = 'http://123.56.68.57:1008/hqorder/api/query';
     const BALANCE_URL = 'http://123.56.68.57:1008/hqorder/api/balance';
@@ -15,7 +14,4 @@ class config
     const KEY = '52e4fd509410446a8259fd8a93de6c85';
     const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
     const ExtHeaders = ['Content-Type: application/json'];
-
-
-
 }

BIN
helper/refill/api/xyz/xuyouoil/~$接口文档V1.0(1).docx