diff --git a/app/controller/api/store/order/OnlinePay.php b/app/controller/api/store/order/OnlinePay.php index 8b5c510..607a7a0 100644 --- a/app/controller/api/store/order/OnlinePay.php +++ b/app/controller/api/store/order/OnlinePay.php @@ -52,6 +52,11 @@ class OnlinePay extends BaseController{ if (!in_array($payInfo['pay_type'], StoreOrderRepository::PAY_TYPE, true)) return app('json')->fail('请选择正确的支付方式'); if ((float)$payInfo['money'] <= 0) return app('json')->fail('支付金额必须大于0!'); if ((int)$payInfo['mer_id'] <= 0) return app('json')->fail('请选择商户!'); + // 判断:当前商户是否支持买单 商户类别:0=普通商户,1=酒道馆,2=供应商 + $merchantType = (int)app()->make(MerchantRepository::class)->getSearch([]) + ->where('mer_id', (int)$payInfo['mer_id']) + ->value('merchant_type'); + if($merchantType != 0) return app('json')->fail('该商户不支持当前操作!'); // 发起支付 $groupOrder = app() ->make(LockService::class)