diff --git a/app/api/controller/order/OrderController.php b/app/api/controller/order/OrderController.php index d52ba531..894f1833 100644 --- a/app/api/controller/order/OrderController.php +++ b/app/api/controller/order/OrderController.php @@ -306,12 +306,11 @@ class OrderController extends BaseApiController //微信小程序支付 $redirectUrl = $params['redirect'] ?? '/pages/payment/payment'; if ($addressId != $order['address_id']) { - $address = UserAddress::where(['address_id' => $addressId, 'uid' => Request()->userId])->find(); + $address = UserAddress::where(['id' => $addressId, 'uid' => Request()->userId])->find(); if ($address) { $_order['real_name'] = $address['real_name']; $_order['user_phone'] = $address['phone']; $_order['user_address'] = $address['detail']; - $_order['address_id'] = $addressId; StoreOrder::where(['id' => $order_id, 'uid' => Request()->userId])->update($_order); } } diff --git a/app/common/logic/PaymentLogic.php b/app/common/logic/PaymentLogic.php index 2f282aa0..98b0c7fb 100644 --- a/app/common/logic/PaymentLogic.php +++ b/app/common/logic/PaymentLogic.php @@ -43,7 +43,7 @@ class PaymentLogic extends BaseLogic $order['pay_price'] = $order['price']; } switch ($payWay) { - case PayEnum::WECHAT_PAY: + case PayEnum::WECHAT_PAY_MINI: $auth = UserAuth::where(['user_id' => $order['uid'], 'terminal' => $terminal])->findOrEmpty(); $order = [ 'out_trade_no' => $paySn,