浏览代码

Merge branch 'raccount' of 39.97.239.116:gyfl/xyzshop into raccount

xiaoyu 2 年之前
父节点
当前提交
8ac5a59351

+ 8 - 6
helper/rbridge/fulu/Bridge.php

@@ -20,26 +20,28 @@ class Bridge implements IBridge
         $dispatcher = function ($product_num)
         $dispatcher = function ($product_num)
         {
         {
             global $fulu_product;
             global $fulu_product;
-            if(empty($fulu_product)) return config::DEFAULT_MCHID;
+            if(empty($fulu_product)) return [config::DEFAULT_MCHID,[]];
 
 
             foreach ($fulu_product as $mchid => $product_infos)
             foreach ($fulu_product as $mchid => $product_infos)
             {
             {
                 if(array_key_exists($product_num, $product_infos)) {
                 if(array_key_exists($product_num, $product_infos)) {
-                    $card_type = $product_infos[$product_num];
-                    return [$mchid,$card_type];
+                    $card_types = $product_infos[$product_num];
+                    return [$mchid,$card_types];
                 }
                 }
             }
             }
             
             
-            return [config::DEFAULT_MCHID,0];
+            return [config::DEFAULT_MCHID,[]];
         };
         };
 
 
         $params = $this->aes_decrypt($params);
         $params = $this->aes_decrypt($params);
         if (empty($params)) {
         if (empty($params)) {
             return [false, '数据解密失败'];
             return [false, '数据解密失败'];
         }
         }
+        $json_str = json_encode($params);
+        Log::record("fulu add params: {$json_str}", Log::DEBUG);
 
 
         $SupProductId = $params['SupProductId'];
         $SupProductId = $params['SupProductId'];
-        [$mchid,$mch_card_type] = $dispatcher($SupProductId);
+        [$mchid,$mch_card_types] = $dispatcher($SupProductId);
         $chargeType = intval($params['OrderType']);
         $chargeType = intval($params['OrderType']);
 
 
         //订单类型:1话费 2流量 3卡密 4直充,
         //订单类型:1话费 2流量 3卡密 4直充,
@@ -56,7 +58,7 @@ class Bridge implements IBridge
             'amount' => $params['SupProductFaceValue'],
             'amount' => $params['SupProductFaceValue'],
             'card_no' => $params['ChargeAccount'],
             'card_no' => $params['ChargeAccount'],
             'mch_order' => $params['Id'],
             'mch_order' => $params['Id'],
-            'mch_card_type' => $mch_card_type,
+            'mch_card_types' => $mch_card_types,
             'notify_url' => config::MCH_NOTIFY_URL];
             'notify_url' => config::MCH_NOTIFY_URL];
 
 
         $code = refill\util::push_add($input);
         $code = refill\util::push_add($input);

+ 54 - 13
helper/rbridge/fulu/product.php

@@ -6,22 +6,63 @@ global $fulu_product;
 $fulu_product = [
 $fulu_product = [
     10300 => [
     10300 => [
         //移动
         //移动
-        500081315 => 4,
-        500081172 => 4,
-        500081316 => 4,
-        500081298 => 4,
+        500081315 => [4, 5, 6],
+        500081172 => [4, 5, 6],
+        500081316 => [4, 5, 6],
+        500081298 => [4, 5, 6],
 
 
         //联通
         //联通
-        500081303 => 5,
-        500081193 => 5,
-        500081304 => 5,
-        500081302 => 5,
+        500081303 => [4, 5, 6],
+        500081193 => [4, 5, 6],
+        500081304 => [4, 5, 6],
+        500081302 => [4, 5, 6],
 
 
         //电信
         //电信
-        500081305 => 6,
-        500081213 => 6,
-        500081306 => 6,
-        500081214 => 6
-    ]
+        500081305 => [4, 5, 6],
+        500081213 => [4, 5, 6],
+        500081306 => [4, 5, 6],
+        500081214 => [4, 5, 6]
+    ],
+
+    10294 => [
+        //移动
+        500081627 => [4, 5, 6], //60%成功率 30分回调
+        500081628 => [4, 5, 6], //80%成功率 1-30分回调
+        500081629 => [4, 5, 6], //80%成功率 1-30分回调
+        500081630 => [4, 5, 6], //80%成功率 1-30分回调
+
+        //联通
+        500081631 => [5, 6], //60%成功率 1-30分回调
+        500081632 => [5, 6], //80%成功率 1-30分回调
+        500081633 => [5, 6], //80%成功率 1-30分回调
+        500081634 => [5, 6], //80%成功率 1-30分回调
+
+        //电信
+        500081635 => [5, 6], //60%成功率 1-30分回调
+        500081636 => [5, 6], //80%成功率 1-30分回调
+        500081637 => [5, 6], //80%成功率 1-30分回调
+        500081638 => [5, 6], //80%成功率 1-30分回调
+    ],
+
+    //95%成功率 1-10分回调
+    10299 => [
+        //移动
+        500081639 => [4, 5, 6],
+        500081640 => [4, 5, 6],
+        500081642 => [4, 5, 6],
+        500081643 => [4, 5, 6],
+
+        //联通
+        500081666 => [5, 6],
+        500081667 => [5, 6],
+        500081668 => [5, 6],
+        500081669 => [5, 6],
+
+        //电信
+        500081670 => [5, 6],
+        500081671 => [5, 6],
+        500081672 => [5, 6],
+        500081673 => [5, 6]
+    ],
 ];
 ];
 
 

二进制
helper/refill/api/xyz/guochuang/20220614陕西电信调价函.jpg


+ 2 - 1
helper/refill/api/xyz/guochuang/config.php

@@ -83,6 +83,7 @@ class config
         "4-10-16" => 10.14, "4-20-16" => 20.28, "4-30-16" => 30.21, "4-50-16" => 50.15, "4-100-16" => 100.3, "4-200-16" => 200.6, "4-300-16" => 300.9, "4-500-16" => 501.5,//河南 16
         "4-10-16" => 10.14, "4-20-16" => 20.28, "4-30-16" => 30.21, "4-50-16" => 50.15, "4-100-16" => 100.3, "4-200-16" => 200.6, "4-300-16" => 300.9, "4-500-16" => 501.5,//河南 16
         "4-50-4" => 49.75, "4-100-4" => 99.5, "4-200-4" => 199,//山西 4
         "4-50-4" => 49.75, "4-100-4" => 99.5, "4-200-4" => 199,//山西 4
         "4-10-24" => 10.21, "4-20-24" => 20.22, "4-30-24" => 30.24, "4-50-24" => 50.25, "4-100-24" => 100.3, "4-200-24" => 200.4, "4-300-24" => 300.6, "4-500-24" => 501,//贵州 24
         "4-10-24" => 10.21, "4-20-24" => 20.22, "4-30-24" => 30.24, "4-50-24" => 50.25, "4-100-24" => 100.3, "4-200-24" => 200.4, "4-300-24" => 300.6, "4-500-24" => 501,//贵州 24
+        "4-10-30" => 10.12, "4-20-30" => 20.24, "4-30-30" => 30.03, "4-50-30" => 50.05, "4-100-30" => 100.1, "4-200-30" => 200.2, "4-300-30" => 300.3, "4-500-30" => 500.5,//宁夏 30
         //联通
         //联通
         "5-10-19" => 10.04, "5-20-19" => 20.08, "5-30-19" => 30.06, "5-50-19" => 50.1, "5-100-19" => 100.2, "5-200-19" => 200.4, "5-300-19" => 300.6, "5-500-19" => 501,//广东 19
         "5-10-19" => 10.04, "5-20-19" => 20.08, "5-30-19" => 30.06, "5-50-19" => 50.1, "5-100-19" => 100.2, "5-200-19" => 200.4, "5-300-19" => 300.6, "5-500-19" => 501,//广东 19
         "5-10-1" => 9.99, "5-20-1" => 19.98, "5-30-1" => 29.97, "5-50-1" => 49.95, "5-100-1" => 99.9, "5-200-1" => 199.8, "5-300-1" => 299.7, "5-500-1" => 499.5,//北京 1
         "5-10-1" => 9.99, "5-20-1" => 19.98, "5-30-1" => 29.97, "5-50-1" => 49.95, "5-100-1" => 99.9, "5-200-1" => 199.8, "5-300-1" => 299.7, "5-500-1" => 499.5,//北京 1
@@ -90,7 +91,7 @@ class config
         "5-10-14" => 10.04, "5-20-14" => 20.08, "5-30-14" => 30.06, "5-50-14" => 50.1, "5-100-14" => 100.1, "5-200-14" => 200.2, "5-300-14" => 300.3, "5-500-14" => 500.5,//江西 14
         "5-10-14" => 10.04, "5-20-14" => 20.08, "5-30-14" => 30.06, "5-50-14" => 50.1, "5-100-14" => 100.1, "5-200-14" => 200.2, "5-300-14" => 300.3, "5-500-14" => 500.5,//江西 14
         "5-20-23" => 20.08, "5-30-23" => 30.12, "5-50-23" => 50.2, "5-100-23" => 100.4, "5-200-23" => 200.8, "5-300-23" => 301.2, "5-500-23" => 502,//四川 23
         "5-20-23" => 20.08, "5-30-23" => 30.12, "5-50-23" => 50.2, "5-100-23" => 100.4, "5-200-23" => 200.8, "5-300-23" => 301.2, "5-500-23" => 502,//四川 23
         //电信
         //电信
-        "6-10-27" => 10.02, "6-20-27" => 20.04, "6-30-27" => 30.06, "6-50-27" => 50.1, "6-100-27" => 100.2, "6-200-27" => 200.4, "6-300-27" => 298.5, "6-500-27" => 497.5,//陕西 27
+        "6-10-27" => 9.955, "6-20-27" => 19.91, "6-30-27" => 29.865, "6-50-27" => 49.775, "6-100-27" => 99.55, "6-200-27" => 199.1, "6-300-27" => 298.5, "6-500-27" => 497.5,//陕西 27
         "6-10-4" => 9.935, "6-20-4" => 19.87, "6-30-4" => 29.805, "6-50-4" => 49.675, "6-100-4" => 99.35, "6-200-4" => 198.7, "6-300-4" => 298.05, "6-500-4" => 496.75,//山西 4
         "6-10-4" => 9.935, "6-20-4" => 19.87, "6-30-4" => 29.805, "6-50-4" => 49.675, "6-100-4" => 99.35, "6-200-4" => 198.7, "6-300-4" => 298.05, "6-500-4" => 496.75,//山西 4
         "6-10-18" => 10.04, "6-20-18" => 20.08, "6-30-18" => 30.12, "6-50-18" => 50.15, "6-100-18" => 100.3, "6-200-18" => 200.6, "6-300-18" => 300.9, "6-500-18" => 501.5,//湖南 18
         "6-10-18" => 10.04, "6-20-18" => 20.08, "6-30-18" => 30.12, "6-50-18" => 50.15, "6-100-18" => 100.3, "6-200-18" => 200.6, "6-300-18" => 300.9, "6-500-18" => 501.5,//湖南 18
         "6-10-15" => 10.21, "6-20-15" => 20.22, "6-30-15" => 30.231, "6-50-15" => 50.25, "6-100-15" => 100.3, "6-200-15" => 200.3, "6-300-15" => 300.45, "6-500-15" => 500.75,//山东 15
         "6-10-15" => 10.21, "6-20-15" => 20.22, "6-30-15" => 30.231, "6-50-15" => 50.25, "6-100-15" => 100.3, "6-200-15" => 200.3, "6-300-15" => 300.45, "6-500-15" => 500.75,//山东 15

+ 2 - 1
helper/refill/api/yl/guochuang/config.php

@@ -83,6 +83,7 @@ class config
         "4-10-16" => 10.14, "4-20-16" => 20.28, "4-30-16" => 30.21, "4-50-16" => 50.15, "4-100-16" => 100.3, "4-200-16" => 200.6, "4-300-16" => 300.9, "4-500-16" => 501.5,//河南 16
         "4-10-16" => 10.14, "4-20-16" => 20.28, "4-30-16" => 30.21, "4-50-16" => 50.15, "4-100-16" => 100.3, "4-200-16" => 200.6, "4-300-16" => 300.9, "4-500-16" => 501.5,//河南 16
         "4-50-4" => 49.75, "4-100-4" => 99.5, "4-200-4" => 199,//山西 4
         "4-50-4" => 49.75, "4-100-4" => 99.5, "4-200-4" => 199,//山西 4
         "4-10-24" => 10.21, "4-20-24" => 20.22, "4-30-24" => 30.24, "4-50-24" => 50.25, "4-100-24" => 100.3, "4-200-24" => 200.4, "4-300-24" => 300.6, "4-500-24" => 501,//贵州 24
         "4-10-24" => 10.21, "4-20-24" => 20.22, "4-30-24" => 30.24, "4-50-24" => 50.25, "4-100-24" => 100.3, "4-200-24" => 200.4, "4-300-24" => 300.6, "4-500-24" => 501,//贵州 24
+        "4-10-30" => 10.12, "4-20-30" => 20.24, "4-30-30" => 30.03, "4-50-30" => 50.05, "4-100-30" => 100.1, "4-200-30" => 200.2, "4-300-30" => 300.3, "4-500-30" => 500.5,//宁夏 30
         //联通
         //联通
         "5-10-19" => 10.04, "5-20-19" => 20.08, "5-30-19" => 30.06, "5-50-19" => 50.1, "5-100-19" => 100.2, "5-200-19" => 200.4, "5-300-19" => 300.6, "5-500-19" => 501,//广东 19
         "5-10-19" => 10.04, "5-20-19" => 20.08, "5-30-19" => 30.06, "5-50-19" => 50.1, "5-100-19" => 100.2, "5-200-19" => 200.4, "5-300-19" => 300.6, "5-500-19" => 501,//广东 19
         "5-10-1" => 9.99, "5-20-1" => 19.98, "5-30-1" => 29.97, "5-50-1" => 49.95, "5-100-1" => 99.9, "5-200-1" => 199.8, "5-300-1" => 299.7, "5-500-1" => 499.5,//北京 1
         "5-10-1" => 9.99, "5-20-1" => 19.98, "5-30-1" => 29.97, "5-50-1" => 49.95, "5-100-1" => 99.9, "5-200-1" => 199.8, "5-300-1" => 299.7, "5-500-1" => 499.5,//北京 1
@@ -90,7 +91,7 @@ class config
         "5-10-14" => 10.04, "5-20-14" => 20.08, "5-30-14" => 30.06, "5-50-14" => 50.1, "5-100-14" => 100.1, "5-200-14" => 200.2, "5-300-14" => 300.3, "5-500-14" => 500.5,//江西 14
         "5-10-14" => 10.04, "5-20-14" => 20.08, "5-30-14" => 30.06, "5-50-14" => 50.1, "5-100-14" => 100.1, "5-200-14" => 200.2, "5-300-14" => 300.3, "5-500-14" => 500.5,//江西 14
         "5-20-23" => 20.08, "5-30-23" => 30.12, "5-50-23" => 50.2, "5-100-23" => 100.4, "5-200-23" => 200.8, "5-300-23" => 301.2, "5-500-23" => 502,//四川 23
         "5-20-23" => 20.08, "5-30-23" => 30.12, "5-50-23" => 50.2, "5-100-23" => 100.4, "5-200-23" => 200.8, "5-300-23" => 301.2, "5-500-23" => 502,//四川 23
         //电信
         //电信
-        "6-10-27" => 10.02, "6-20-27" => 20.04, "6-30-27" => 30.06, "6-50-27" => 50.1, "6-100-27" => 100.2, "6-200-27" => 200.4, "6-300-27" => 298.5, "6-500-27" => 497.5,//陕西 27
+        "6-10-27" => 9.955, "6-20-27" => 19.91, "6-30-27" => 29.865, "6-50-27" => 49.775, "6-100-27" => 99.55, "6-200-27" => 199.1, "6-300-27" => 298.5, "6-500-27" => 497.5,//陕西 27
         "6-10-4" => 9.935, "6-20-4" => 19.87, "6-30-4" => 29.805, "6-50-4" => 49.675, "6-100-4" => 99.35, "6-200-4" => 198.7, "6-300-4" => 298.05, "6-500-4" => 496.75,//山西 4
         "6-10-4" => 9.935, "6-20-4" => 19.87, "6-30-4" => 29.805, "6-50-4" => 49.675, "6-100-4" => 99.35, "6-200-4" => 198.7, "6-300-4" => 298.05, "6-500-4" => 496.75,//山西 4
         "6-10-18" => 10.04, "6-20-18" => 20.08, "6-30-18" => 30.12, "6-50-18" => 50.15, "6-100-18" => 100.3, "6-200-18" => 200.6, "6-300-18" => 300.9, "6-500-18" => 501.5,//湖南 18
         "6-10-18" => 10.04, "6-20-18" => 20.08, "6-30-18" => 30.12, "6-50-18" => 50.15, "6-100-18" => 100.3, "6-200-18" => 200.6, "6-300-18" => 300.9, "6-500-18" => 501.5,//湖南 18
         "6-10-15" => 10.21, "6-20-15" => 20.22, "6-30-15" => 30.231, "6-50-15" => 50.25, "6-100-15" => 100.3, "6-200-15" => 200.3, "6-300-15" => 300.45, "6-500-15" => 500.75,//山东 15
         "6-10-15" => 10.21, "6-20-15" => 20.22, "6-30-15" => 30.231, "6-50-15" => 50.25, "6-100-15" => 100.3, "6-200-15" => 200.3, "6-300-15" => 300.45, "6-500-15" => 500.75,//山东 15

+ 5 - 5
helper/refill/order.php

@@ -19,7 +19,7 @@ class order
     private $mLastOrderID;
     private $mLastOrderID;
     private $mOriginQuality;
     private $mOriginQuality;
     private $mCurQuality;
     private $mCurQuality;
-    private $mMchCardType; //用于产品和卡类型绑定的充值机构.
+    private $mMchCardTypes; //用于产品和卡类型绑定的充值机构.
 
 
     private $mCardType;
     private $mCardType;
     private $mRegionNo;
     private $mRegionNo;
@@ -42,7 +42,7 @@ class order
         $this->mProductCode = '';
         $this->mProductCode = '';
         $this->mThirdPorductType = 0;
         $this->mThirdPorductType = 0;
         $this->mMatchRatio = false;
         $this->mMatchRatio = false;
-        $this->mMchCardType = 0;
+        $this->mMchCardTypes = [];
     }
     }
 
 
     public function mchid() {
     public function mchid() {
@@ -130,11 +130,11 @@ class order
 
 
     public function match_card_type()
     public function match_card_type()
     {
     {
-        if($this->mMchCardType === 0) {
+        if(empty($this->mMchCardTypes)) {
             return true;
             return true;
         }
         }
         else {
         else {
-            return $this->mMchCardType === $this->card_type();
+            return in_array($this->card_type(),$this->mMchCardTypes);
         }
         }
     }
     }
 
 
@@ -218,7 +218,7 @@ class order
         $this->mQuantity   = $params['quantity'] ?? 1;
         $this->mQuantity   = $params['quantity'] ?? 1;
         $this->mOriginQuality = intval($params['org_quality']) ?? 0;
         $this->mOriginQuality = intval($params['org_quality']) ?? 0;
         $this->mMatchRatio = $params['match_ratio'] ?? false;
         $this->mMatchRatio = $params['match_ratio'] ?? false;
-        $this->mMchCardType = $params['mch_card_type'] ?? 0;
+        $this->mMchCardTypes = $params['mch_card_types'] ?? [];
 
 
         $card_type = intval($params['card_type']) ?? 0;
         $card_type = intval($params['card_type']) ?? 0;
         if($card_type == mtopcard\ThirdRefillCard)
         if($card_type == mtopcard\ThirdRefillCard)

+ 1 - 3
helper/statistics/refill_balance.php

@@ -246,14 +246,12 @@ class refill_balance
             $in = $transfer_calcer($transfer_detail);
             $in = $transfer_calcer($transfer_detail);
             $balance = ncPriceFormat($in - $order_stat['mch_amounts']);
             $balance = ncPriceFormat($in - $order_stat['mch_amounts']);
         } else {
         } else {
-            $transfer_detail = [];
             $pid = $this->mStoreidPID[$cid];
             $pid = $this->mStoreidPID[$cid];
             $pay_time = $this->provider_paytime_finder($pid, $start,$end);
             $pay_time = $this->provider_paytime_finder($pid, $start,$end);
             $out = $this->provider_amount_stat($pid, $pay_time, $end);
             $out = $this->provider_amount_stat($pid, $pay_time, $end);
             $cname = $this->mProviderNames[$cid];
             $cname = $this->mProviderNames[$cid];
 
 
-            $in = $transfer_calcer($transfer_detail);
-            $balance = ncPriceFormat($in - $order_stat['channel_amounts']);
+            $balance = ncPriceFormat($out - $order_stat['channel_amounts']);
         }
         }
 
 
         if ($start == 0) {
         if ($start == 0) {