From 1763c5a521b646171c9c0c839b1c0317f1a54419 Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Mon, 25 Nov 2024 18:02:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=A1=8C=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Gh.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/api/controller/Gh.php b/app/api/controller/Gh.php index 573f31ad..d815c5bf 100644 --- a/app/api/controller/Gh.php +++ b/app/api/controller/Gh.php @@ -51,7 +51,7 @@ class Gh extends Api ); } // 工行支付 - public function pay($money="",$decive_info="111",$type="",$partner_id="",$store_type_id="",$order_id=0){ + public function pay($money="",$decive_info="111",$from="",$type="",$partner_id="",$store_type_id="",$order_id=0){ $user_id = $this->user_id; $merchant = 70; //商户获取金额比例 $our = 5; //服务费 @@ -120,6 +120,7 @@ class Gh extends Api // var_dump($request); $data['mer_id'] = "120448160200"; $data['ser_id'] = "120400005722"; + $data['$from'] = $from; $data['order_id'] = $order_id; $data['out_trade_no'] = $out; $data['pay_mode'] = "9"; @@ -186,9 +187,16 @@ class Gh extends Api ->update(['pay_status'=>1]); Db::name("distribution_member_apply")->where("id",$id)->update(['alog_id'=>$alog_id]); }else{ - Db::name("order") - ->where("id",$abutment['order_id']) - ->update(['order_status'=>1,'pay_status'=>1]); + if($abutment['form'] == "trade"){ + Db::name("order") + ->where("trade_id",$abutment['order_id']) + ->update(['order_status'=>1,'pay_status'=>1]); + }else{ + Db::name("order") + ->where("id",$abutment['order_id']) + ->update(['order_status'=>1,'pay_status'=>1]); + } + } }else{ return JsonServer::error('支付失败');