From 49c8f5e37fb730d5768c3d6d4af3c667d0cfc9e4 Mon Sep 17 00:00:00 2001 From: mzeros Date: Fri, 10 Jan 2025 19:26:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(channel):=20=E4=BF=AE=E5=A4=8D=E7=BE=8E?= =?UTF-8?q?=E5=9F=8E=E6=94=AF=E4=BB=98=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E7=9B=B8=E5=85=B3=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=96=87=E6=9C=AC-=20=E4=BF=AE=E6=94=B9=E6=90=BA=E8=BD=AC?= =?UTF-8?q?=E5=8F=B7=E7=A0=81=E6=A3=80=E6=B5=8B=E6=95=B0=E6=8D=AE=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=96=87=E6=9C=AC=20-=20=E4=BC=98=E5=8C=96=E7=BE=8E?= =?UTF-8?q?=E5=9F=8E=E6=94=AF=E4=BB=98=E6=9F=A5=E8=AF=A2=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=AF=B9=20query=5Fstatus=20?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD=20-=20=E8=B0=83=E6=95=B4=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E6=96=B9=E5=BC=8F=E4=BB=8E=20POST=20=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20GET-=20=E6=9B=B4=E6=96=B0=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9F=A5=E8=AF=A2=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9C=AA=E8=BF=94=E5=9B=9E=20query=5Fstatus?= =?UTF-8?q?=20=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/channel/service/system/Meicheng.php | 13 ++++++--- app/openapi/controller/Test.php | 38 ++++++++++++++++--------- app/setting/view/mobile_mnp/index.html | 2 +- 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/app/channel/service/system/Meicheng.php b/app/channel/service/system/Meicheng.php index 3e142c5..1643ebb 100644 --- a/app/channel/service/system/Meicheng.php +++ b/app/channel/service/system/Meicheng.php @@ -120,9 +120,12 @@ class Meicheng extends Core unset($request['sign']); unset($request['s_order']); $sign = strtoupper($this->_sign($request, array('userid', 'orderid', 'sporderid', 'merchantsubmittime', 'resultno'))); - if ($sign != $data['sign']) { - return false; + if(!isset($data['query_status']) ){ + if ($sign != $data['sign']) { + return false; + } } + $result = array(); $result['cash'] = 1; if ($data['resultno'] == 1) { @@ -180,17 +183,19 @@ class Meicheng extends Core $request['sign'] = $this->_sign($request, array('userid', 'sporderid')); $url = $this->host . 'searchpay.do'; - $response = $this->curl('post', $url, $request); + $response = $this->curl('get', $url, $request); $log['type'] = 'query_response'; $log['data'] = $response; $log['config'] = $this->data; $this->log($log); - $array = $this->json_decode($response); + $array = (array) simplexml_load_string($response); $result = array(); + $result = $array; $result['status'] = 4; + $result['query_status'] = 1; if (isset($array['resultno']) ) { if($array['resultno'] == '1'){ $result['status'] = 2; diff --git a/app/openapi/controller/Test.php b/app/openapi/controller/Test.php index 3197756..265e75a 100644 --- a/app/openapi/controller/Test.php +++ b/app/openapi/controller/Test.php @@ -7,7 +7,7 @@ use app\channel\service\CardService; use app\channel\service\ChannelService; use app\channel\service\KamiService; use app\channel\service\ProductService; -use app\gateway\controller\api\Notify; +use app\gateway\controller\v4\Notify; use app\gateway\service\RedisService; use app\kami\controller\getcookie\KaiDianBao; use app\kami\controller\getcookie\ZhongZhao; @@ -181,20 +181,28 @@ class Test extends Core public function test() { + $orde = OrderService::instance()->db()->where(['status'=>4,'cid'=>14])->select()->toArray(); + if($orde){ + foreach ($orde as $k=>$v){ + $channelService = ChannelService::instance(); + $result = $channelService->call('query', $v['cid'], $v); + + Log::write('test', 'runss', $result); + +// Log::write(''); +// var_dump($result);die; + if ($result['status'] != 4) { + + Log::write('test', 'runs', $result); + $notifyClass = new Notify($this->app); + $notifyClass->queue_query($v['order_id'], $result); + + var_dump([$v['order_id'],$result['status']]); - - $LockCardService = LockCardService::instance(); - - -// $cardno = $response['kami']['cardno']; -// $cardpwd = $response['kami']['cardpwd']; -// $expire_time = $response['kami']['expired']; - - $suoka = $LockCardService->call('',12, 2409301790976058, 123456, 123, 100,'Whymcl'); - - - return $suoka; + } + } + } } @@ -203,6 +211,10 @@ class Test extends Core + + + + public function stat_amount() { $day = input('day'); diff --git a/app/setting/view/mobile_mnp/index.html b/app/setting/view/mobile_mnp/index.html index dc4eb51..8136e35 100644 --- a/app/setting/view/mobile_mnp/index.html +++ b/app/setting/view/mobile_mnp/index.html @@ -1,7 +1,7 @@ {extend name="../../admin/view/table"} {block name="button"} - + {/block}