|
@@ -79,14 +79,14 @@ class StoreOrder extends BaseController
|
|
|
$extend = (array)$this->request->param('extend', []);
|
|
|
$mark = (array)$this->request->param('mark', []);
|
|
|
$payType = $this->request->param('pay_type');
|
|
|
- $payment_type = $this->request->param('payment_type',1); //1.正常购买 2.百分比支付
|
|
|
+ $is_percentage = (int)$this->request->param('is_percentage',0); //0.正常购买 1.百分比支付
|
|
|
$post = (array)$this->request->param('post');
|
|
|
|
|
|
$isPc = $payType === 'pc';
|
|
|
if ($isPc) {
|
|
|
$payType = 'balance';
|
|
|
}
|
|
|
- if($payment_type == 2){ //多个商品不能用百分比支付
|
|
|
+ if($is_percentage == 1){ //多个商品不能用百分比支付
|
|
|
if(count($cartId) > 1){
|
|
|
return app('json')->fail('参数错误');
|
|
|
}
|
|
@@ -112,8 +112,8 @@ class StoreOrder extends BaseController
|
|
|
// if (!$addressId)
|
|
|
// return app('json')->fail('请选择地址');
|
|
|
|
|
|
- $groupOrder = app()->make(LockService::class)->exec('order.create', function () use ($orderCreateRepository, $receipt_data, $mark, $extend, $cartId, $payType, $takes, $couponIds, $useIntegral, $addressId, $post) {
|
|
|
- return $orderCreateRepository->v2CreateOrder(array_search($payType, StoreOrderRepository::PAY_TYPE), $this->request->userInfo(), $cartId, $extend, $mark, $receipt_data, $takes, $couponIds, $useIntegral, $addressId, $post);
|
|
|
+ $groupOrder = app()->make(LockService::class)->exec('order.create', function () use ($orderCreateRepository, $receipt_data, $mark, $extend, $cartId, $payType, $takes, $couponIds, $useIntegral, $addressId, $post,$is_percentage) {
|
|
|
+ return $orderCreateRepository->v2CreateOrder(array_search($payType, StoreOrderRepository::PAY_TYPE), $this->request->userInfo(), $cartId, $extend, $mark, $receipt_data, $takes, $couponIds, $useIntegral, $addressId, $post,$is_percentage);
|
|
|
});
|
|
|
|
|
|
if ($groupOrder['pay_price'] == 0) {
|