优化结构

This commit is contained in:
Yvan
2026-08-28 10:21:59 +08:00
parent a16d362bb5
commit fec3820464
19 changed files with 138 additions and 136 deletions
+6
View File
@@ -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 {