fix: 收银台bug

This commit is contained in:
wolter 2026-01-12 18:51:17 +08:00
parent 12d22f7437
commit 3985f4f744
1 changed files with 6 additions and 2 deletions

View File

@ -260,8 +260,12 @@ func WxOrderQuery(ctx context.Context, wxConfig WxPay, orderNo string) (PayOrder
case "CLOSED":
tradeState = "CLOSED"
}
amountTotal := wxRsp.Response.Amount.Total
payerTotal := wxRsp.Response.Amount.PayerTotal
amountTotal := 0
payerTotal := 0
if wxRsp.Response.Amount != nil {
amountTotal = wxRsp.Response.Amount.Total
payerTotal = wxRsp.Response.Amount.PayerTotal
}
outTradeNo, _ := strconv.Atoi(wxRsp.Response.OutTradeNo)
return PayOrderQueryInfo{