|
@@ -92,8 +92,10 @@ class StoreOrder extends BaseController
|
|
|
}
|
|
|
//如果商品没设置支付百分比也不能选择百分比支付
|
|
|
$cart_info = $cartRepository->findOrCreate(array('cart_id'=>$cartId[0]));
|
|
|
- $product_id = $cart_info->product_id;
|
|
|
- var_dump($product_id);exit();
|
|
|
+ $product_info = $ProductRepository->findOrCreate(array('product_id'=>$cart_info->product_id));
|
|
|
+ if(empty($product_info->pay_percentage)){
|
|
|
+ return app('json')->fail('该商品不支持百分比支付');
|
|
|
+ }
|
|
|
}
|
|
|
if (!in_array($payType, StoreOrderRepository::PAY_TYPE, true))
|
|
|
return app('json')->fail('请选择正确的支付方式');
|