优化:仅普通商户支持买单操作
This commit is contained in:
parent
92076147f8
commit
2f3acf42d9
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue