优化结构
This commit is contained in:
@@ -33,6 +33,12 @@ func NormalizeRefundStatus(value, fallback string) string {
|
||||
}
|
||||
}
|
||||
|
||||
// NormalizePaymentMethod canonicalizes provider method identifiers while
|
||||
// leaving provider-specific classification to the integration adapter.
|
||||
func NormalizePaymentMethod(value string) string {
|
||||
return strings.NewReplacer(".", "_", "-", "_", " ", "_").Replace(strings.ToLower(strings.TrimSpace(value)))
|
||||
}
|
||||
|
||||
func ConfiguredInt64(values map[string]any, key string, fallback int64) int64 {
|
||||
value, ok := values[key]
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user