优化结构
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
bizpayment "kra/internal/biz/payment"
|
||||
"kra/internal/paymentkit"
|
||||
"strings"
|
||||
|
||||
"github.com/go-pay/gopay"
|
||||
@@ -71,7 +72,7 @@ func lakalaCreateMethod(extra, config map[string]any) string {
|
||||
if method == "" {
|
||||
method = firstAny(config, "method", "pay_method", "trade_type")
|
||||
}
|
||||
return strings.NewReplacer(".", "_", "-", "_", " ", "_").Replace(strings.ToLower(strings.TrimSpace(method)))
|
||||
return paymentkit.NormalizePaymentMethod(method)
|
||||
}
|
||||
|
||||
func lakalaCreateResult(tradeNo string, rsp *lakala.PaymentRsp) (*bizpayment.PaymentResult, error) {
|
||||
|
||||
Reference in New Issue
Block a user