Quellcode durchsuchen

fix ch_filter error

stanley-king vor 1 Jahr
Ursprung
Commit
6ea0f407b3

+ 2 - 2
docker/compose/homecuda/conf/php/php-swoole-debug.ini

@@ -1947,8 +1947,8 @@ output_buffering = On
 xdebug.default_enable=1
 xdebug.remote_enable=1
 xdebug.remote_handler=dbgp
-xdebug.remote_host=192.168.3.220
-xdebug.remote_port=9300
+xdebug.remote_host=39.99.233.218
+xdebug.remote_port=7002
 xdebug.remote_mode=req
 xdebug.remote_autostart=1
 xdebug.idekey=PHPSTORM

+ 5 - 3
helper/refill/order.php

@@ -383,7 +383,9 @@ class order
             } elseif ($this->mThirdPorductType == mtopcard\ThirdSinopecECouponPoroduct) {
                 $this->mThirdExtes['province'] = $params['province'];
             }
-        } else {
+        }
+        else
+        {
             $this->mProductCode = '';
             $this->mCurQuality = intval($params['quality']) ?? 0;
             $this->mThirdCardType = 1; //deafult value
@@ -406,9 +408,9 @@ class order
                 $this->mCardState = $params['cardno_state'];
                 $this->mIsValidate = $params['is_validate'] == 1;
             }
-
-            $this->mChannelFilter = new channel_filter($this->mMchid,$this->mMchOrder,$this->mCardType);
         }
+
+        $this->mChannelFilter = new channel_filter($this->mMchid,$this->mMchOrder,$this->mCardType);
     }
 
     public function ZeroRefillParams($order_id, $order_sn, $spec, $mch_amount, $channel_name, $channel_amout, $err_msg)

+ 32 - 0
test/fix/TestFix.php

@@ -0,0 +1,32 @@
+<?php
+
+define('APP_ID', 'test');
+define('BASE_ROOT_PATH', str_replace('/test/fix', '', dirname(__FILE__)));
+require_once(BASE_ROOT_PATH . '/global.php');
+require_once(BASE_CORE_PATH . '/lrlz.php');
+require_once(BASE_ROOT_PATH . '/fooder.php');
+
+require_once(BASE_HELPER_PATH . '/refill/XYZRefillFactory.php');
+require_once(BASE_HELPER_PATH . '/mtopcard/mtopcard.php');
+require_once(BASE_CORE_PATH . '/framework/function/http.php');
+
+
+use PHPUnit\Framework\TestCase;
+
+class TestFix extends TestCase
+{
+    public static function setUpBeforeClass() : void
+    {
+        Base::run_util();
+    }
+
+    public function testStart()
+    {
+        $body = '{"mchid":10493,"buyer_id":66939,"amount":100,"mch_order":"VRS1752264354401005568","notify_url":"https://beta-gw.jinbaozheng.com/open/api/vr/channel/notify/coconut_ll","org_quality":1,"card_type":7,"card_no":"13564998464","product_code":"LL_30000001473","quantity":"1","third_card_type":"1","third_product_type":1,"order_time":1706607366}';
+        $params = json_decode($body,true);
+
+        $state = refill\util::push_addthird($params);
+
+
+    }
+}