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,pay_type StoreGroupOrder::update(['hf_pay_id' => $res['id'], 'pay_type' => 4], ['group_order_id' => $groupOrderId]); // 更新store_order表pay_type StoreGroupOrder::update(['pay_type' => 4], ['group_order_id' => $groupOrderId]); return app('json')->success($res); } }