feat: 修改订单控制器中的核销码验证、订单支付、退款申请等方法

This commit is contained in:
mkm 2024-06-08 20:40:28 +08:00
parent 9f44216503
commit e6acf8b542

View File

@ -80,7 +80,6 @@ class OrderController extends BaseApiController
$res['page_no'] = $params['page_no'];
$res['page_size'] = $params['page_size'];
return $this->success('ok', $res);
}
#[
@ -199,8 +198,8 @@ class OrderController extends BaseApiController
//现金支付
PayNotifyLogic::handle('cash_pay', $order['order_id']);
return $this->success('现金支付成功');
case PayEnum::WECHAT_PAY:
//微信支付
case PayEnum::WECHAT_PAY_MINI:
//微信小程序支付
$redirectUrl = $params['redirect'] ?? '/pages/payment/payment';
$result = PaymentLogic::pay($pay_type, 'wechat_common', $order, $this->userInfo['terminal'] ?? 1, $redirectUrl);
if (PaymentLogic::hasError()) {
@ -303,8 +302,8 @@ class OrderController extends BaseApiController
PayNotifyLogic::handle('cash_pay', $order['order_id']);
return $this->success('现金支付成功');
break;
case PayEnum::WECHAT_PAY:
//微信支付
case PayEnum::WECHAT_PAY_MINI:
//微信小程序支付
$redirectUrl = $params['redirect'] ?? '/pages/payment/payment';
if ($addressId != $order['address_id']) {
$address = UserAddress::where(['address_id' => $addressId, 'uid' => Request()->userId])->find();
@ -547,10 +546,5 @@ class OrderController extends BaseApiController
} else {
return $this->fail('取消失败');
}
}
}