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