- 在支付宝支付接口中添加订单查询验证 - 当订单不存在时返回错误提示"订单不存在" - 防止因订单不存在导致的后续支付流程异常
@@ -23,6 +23,9 @@ class AliPay
{
$groupOrderId = request()->param('groupOrderId');
$groupOrder = StoreGroupOrder::where('group_order_id', $groupOrderId)->find()->toArray();
+ if (!$groupOrder) {
+ return app('json')->fail('订单不存在');
+ }
$access = new Access();
$res = $access->pay_huifu('ALI','',$groupOrder,'支付宝支付',env('APP_URL')."/api/hf_notify/pay");
return app('json')->success($res);