This commit is contained in:
mkm 2024-05-11 17:02:15 +08:00
parent f84e4d8f8d
commit a7504f3660
2 changed files with 5 additions and 5 deletions

View File

@ -95,18 +95,18 @@ class RetailOrderController extends BaseApiController
$order = OrderLogic::createOrder($cartId, $addressId, null, $params);
if ($order != false) {
switch ($pay_type) {
case PayEnum::WECHAT_PAY:
case PayEnum::BALANCE_PAY:
//余额支付
$user = User::where('id', $this->request->userId)->find();
$res = RetailOrderLogic::payBalance($user, $order);
if (RetailOrderLogic::hasError()) {
return $this->fail(RetailOrderLogic::getError());
} else {
$res = RetailOrderLogic::paySuccess($order, ['money' => $order['actual']]);
if (RetailOrderLogic::hasError()) {
} else {
return $this->fail(RetailOrderLogic::getError());
}
} else {
return $this->fail(RetailOrderLogic::getError());
return $this->success('余额支付成功');
}
break;
case PayEnum::WECHAT_PAY:

View File

@ -23,7 +23,7 @@ return [
// 断线重连
'break_reconnect' => true,
// 关闭SQL监听日志
'trigger_sql' => true,
'trigger_sql' => false,
// 自定义分页类
'bootstrap' => ''
],