diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 4964f4f8a..5d808912e 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -25,6 +25,7 @@ use app\common\model\user\UserAddress; use app\common\model\user\UserRecharge; use app\common\model\user\UserShip; use app\common\model\user_sign\UserSign; +use app\common\service\Curl; use app\common\service\PushService; use support\Log; use think\facade\Db; @@ -585,6 +586,19 @@ class PayNotifyLogic extends BaseLogic $financeLogic = new StoreFinanceFlowLogic(); $user_sing = new UserSign(); $off_activity = Config::where('name', 'off_activity')->value('value'); + try{ + $url=getenv('WETCHA_PUSH'); + if($url){ + $order_id=$order['order_id']; + $pay_price=$order['pay_price']; + $arr=["msgtype"=>"markdown","markdown"=>["content"=> "有新的订单请及时跟踪\n + >单号:$order_id + >金额:$pay_price"]]; + (new Curl())->post($url,$arr); + } + }catch(\Exception $e){ + Log::error('推送订单失败',['order_id'=>$order['id'],'error'=>$e->getMessage()]); + } if ($off_activity == 1) { //-----活动价结算更改 $financeLogic->order = $order;