param('groupOrderId'); $groupOrder = StoreGroupOrder::where('group_order_id', $groupOrderId)->find()->toArray(); if (!$groupOrder) { return app('json')->fail('订单不存在'); } if ($groupOrder['paid'] == 1) { return app('json')->fail('订单已支付'); } $access = new Access(); $res = $access->pay_huifu('ALI','',$groupOrder,'支付宝支付',env('APP_URL')."/api/hf_notify/pay"); // 更新store_group_order表hf_pay_id StoreGroupOrder::update(['hf_pay_id'=>$res['id']],['group_order_id'=>$groupOrderId]); return app('json')->success($res); } }