From 52ce6efce1c9d3277789dcfdc32f5a1cd02717af Mon Sep 17 00:00:00 2001 From: wolter <11@gmail> Date: Wed, 23 Jul 2025 16:58:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=80=E6=AC=BE=E6=8E=A5=E5=8F=A3fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/thirdpay/do/pay_check.go | 6 ++++++ app/services/thirdpay/pay.go | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/services/thirdpay/do/pay_check.go b/app/services/thirdpay/do/pay_check.go index 56d4201..fdd34c0 100644 --- a/app/services/thirdpay/do/pay_check.go +++ b/app/services/thirdpay/do/pay_check.go @@ -42,6 +42,12 @@ func (w *PayCheck) CheckPayInfo() { if w.CheckCode != errorcode.Success { return } + + // 走收银台支付的订单可能没有支付方式兼容 + if w.Reqs.PayChannelId == 0 { + w.Reqs.PayChannelId = w.OldOrder.PayChannelId + } + w.CheckPayChannel() if w.CheckCode != errorcode.Success { return diff --git a/app/services/thirdpay/pay.go b/app/services/thirdpay/pay.go index cbbeb18..b9d61e0 100644 --- a/app/services/thirdpay/pay.go +++ b/app/services/thirdpay/pay.go @@ -55,12 +55,15 @@ func ThirdPayRefundCheck(ctx context.Context, refundReq *front.RefundReqs, appCh } copier.Copy(&req, refundReq) check = thirdpay.NewPayCheck(&ctx, &req, appCheck, ip) - //// 校验表单 - //check.CheckPayInfo() - //if check.CheckCode != errorcode.Success { - // return check, check.CheckCode - //} + check.CheckOrderRefund() + if check.CheckCode != errorcode.Success { + return check, check.CheckCode + } + + // 校验表单 + check.CheckPayInfo() + return check, check.CheckCode }