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('支付失败');