fix payment visible methods and resume recovery

This commit is contained in:
IanShaw027
2026-04-21 00:14:05 +08:00
parent 5d58c7c6fb
commit 16be82b959
6 changed files with 201 additions and 19 deletions

View File

@@ -310,12 +310,14 @@ func buildWxpayResultURL(returnURL string, req payment.CreatePaymentRequest) (st
return "", fmt.Errorf("return URL must be an absolute http(s) URL")
}
values := url.Values{}
values := u.Query()
values.Set("out_trade_no", strings.TrimSpace(req.OrderID))
if paymentType := strings.TrimSpace(req.PaymentType); paymentType != "" {
values.Set("payment_type", paymentType)
}
u.Path = wxpayResultPath
if strings.TrimSpace(u.Path) == "" {
u.Path = wxpayResultPath
}
u.RawPath = ""
u.RawQuery = values.Encode()
u.Fragment = ""