Browse Source

qianqian qianqianman 026 and xiaoniu quality update

xiaoyu 3 years ago
parent
commit
11bdba72b2

+ 6 - 6
data/config/xyz/refill.ini.php

@@ -144,12 +144,12 @@ $feinimoshu_oil = ['name' => 'feinimoshu', 'store_id' => 57, 'qualitys' => '1',
     ],
     'period' => [], 'refill_type' => 'api'];
 
-$xiaoniu_oil = ['name' => 'xiaoniu', 'store_id' => 77,'qualitys' => '5',
+$xiaoniu_oil = ['name' => 'xiaoniu', 'store_id' => 77,'qualitys' => '3',
     'amount' => [
-        100 => [['goods_id' => 6740, 'price' => 98, 'quality' => 5, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6741, 'price' => 196, 'quality' => 5, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6742, 'price' => 490, 'quality' => 5, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6743, 'price' => 980, 'quality' => 5, 'card_type' => 'sinopec']]
+        100 => [['goods_id' => 6740, 'price' => 98, 'quality' => 3, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6741, 'price' => 196, 'quality' => 3, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6742, 'price' => 490, 'quality' => 3, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6743, 'price' => 980, 'quality' => 3, 'card_type' => 'sinopec']]
     ],
     'period' => [], 'refill_type' => 'api'];
 
@@ -173,7 +173,7 @@ $config['oil_providers'] = $oil_providers;
 
 $beixt_phone = ['name' => 'beixt', 'store_id' => 8,'qualitys' => '1',
     'amount' => [
-        50  => [['goods_id' => 6295, 'price' => 48.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6295, 'price' => 48.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         100 => [['goods_id' => 6296, 'price' => 97.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         200 => [['goods_id' => 6297, 'price' => 195,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],

+ 5 - 5
data/config/xyzadm/refill.ini.php

@@ -144,12 +144,12 @@ $feinimoshu_oil = ['name' => 'feinimoshu', 'store_id' => 57, 'qualitys' => '1',
     ],
     'period' => [], 'refill_type' => 'api'];
 
-$xiaoniu_oil = ['name' => 'xiaoniu', 'store_id' => 77,'qualitys' => '5',
+$xiaoniu_oil = ['name' => 'xiaoniu', 'store_id' => 77,'qualitys' => '3',
     'amount' => [
-        100 => [['goods_id' => 6740, 'price' => 98, 'quality' => 5, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6741, 'price' => 196, 'quality' => 5, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6742, 'price' => 490, 'quality' => 5, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6743, 'price' => 980, 'quality' => 5, 'card_type' => 'sinopec']]
+        100 => [['goods_id' => 6740, 'price' => 98, 'quality' => 3, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6741, 'price' => 196, 'quality' => 3, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6742, 'price' => 490, 'quality' => 3, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6743, 'price' => 980, 'quality' => 3, 'card_type' => 'sinopec']]
     ],
     'period' => [], 'refill_type' => 'api'];
 

+ 18 - 4
helper/refill/api/xyz/qianqian/RefillPhone.php

@@ -75,13 +75,27 @@ 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)) {
-                $order_state = ORDER_STATE_CANCEL;
-            } elseif ($status === '002') {
+            }
+            elseif (in_array($status,config::QueryErrCodes))
+            {
+                if ($status === '026')
+                {
+                    //订单不存在状态,三小时内查询可失败,超过则返回充值中
+                    if (time() - $refill_info['commit_time'] <= 10800) {
+                        $order_state = ORDER_STATE_CANCEL;
+                    } else {
+                        $order_state = ORDER_STATE_SEND;
+                    }
+                } else {
+                    $order_state = ORDER_STATE_CANCEL;
+                }
+            }
+            elseif ($status === '002') {
                 $order_state = ORDER_STATE_SEND;
             } else {
                 return [false, $status];

+ 16 - 3
helper/refill/api/xyz/qianqianman/RefillPhone.php

@@ -75,12 +75,25 @@ 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)) {
-                $order_state = ORDER_STATE_CANCEL;
+            }
+            elseif (in_array($status,config::QueryErrCodes))
+            {
+                if ($status === '026')
+                {
+                    //订单不存在状态,三小时内查询可失败,超过则返回充值中
+                    if (time() - $refill_info['commit_time'] <= 10800) {
+                        $order_state = ORDER_STATE_CANCEL;
+                    } else {
+                        $order_state = ORDER_STATE_SEND;
+                    }
+                } else {
+                    $order_state = ORDER_STATE_CANCEL;
+                }
             } elseif ($status === '002') {
                 $order_state = ORDER_STATE_SEND;
             } else {