优化结构

This commit is contained in:
Yvan
2026-08-28 13:56:12 +08:00
parent 33ba777137
commit 56f9440a6b
32 changed files with 159 additions and 270 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import (
"errors"
"fmt"
bizpayment "kra/internal/biz/payment"
"kra/internal/paymentkit"
"net/http"
"net/url"
"strings"
@@ -120,7 +121,7 @@ func (a *wechatV3Adapter) Create(ctx context.Context, req *bizpayment.PaymentReq
}
func normalizeWechatV3TradeType(value string) string {
return strings.NewReplacer(".", "", "-", "_", " ", "_").Replace(strings.ToLower(strings.TrimSpace(value)))
return paymentkit.NormalizePaymentMethod(value)
}
func wechatV3CodePayResult(tradeNo string, rsp *gopayWechatV3.CodePayRsp) (*bizpayment.PaymentResult, error) {