修复支付网关地址空白字符

This commit is contained in:
yml
2026-06-15 00:53:05 +08:00
parent a275a006eb
commit 4a0d615926
4 changed files with 80 additions and 8 deletions
@@ -374,7 +374,7 @@ func (c *Client) post(ctx context.Context, endpoint string, reqData map[string]a
if err != nil {
return nil, err
}
url := strings.TrimRight(c.cfg.GatewayURL, "/") + endpoint
url := strings.TrimRight(strings.TrimSpace(c.cfg.GatewayURL), "/") + endpoint
req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(body))
if err != nil {
return nil, err