优化结构

This commit is contained in:
Yvan
2026-08-27 22:33:43 +08:00
parent 5052835fcb
commit e407d3ac10
86 changed files with 3151 additions and 726 deletions
+2 -8
View File
@@ -56,17 +56,11 @@ func first(values map[string]string, keys ...string) string {
}
func text(values map[string]any, key string) string {
value, _ := values[key].(string)
return value
return paymentutil.Text(values, key)
}
func firstAny(values map[string]any, keys ...string) string {
for _, key := range keys {
if value, ok := values[key].(string); ok && value != "" {
return value
}
}
return ""
return paymentutil.FirstText(values, keys...)
}
// Compatibility shims keep channel adapters focused on protocol and