接入顺成支付并优化配置列表

This commit is contained in:
yml
2026-06-18 21:33:15 +08:00
parent 40ae14d450
commit 6d385478a6
13 changed files with 1763 additions and 40 deletions
@@ -62,12 +62,29 @@ func (r *Repository) validateCreateRequest(req CreateRequest) error {
return ErrTermNoRequired
}
}
if req.Provider == "shuncheng" {
if req.GatewayURL == "" {
return ErrGatewayURLRequired
}
if req.SignKey == "" {
return ErrSignKeyRequired
}
if req.NotifyKey == "" {
return ErrNotifyKeyRequired
}
if req.NotifyURL == "" {
return ErrNotifyURLRequired
}
if extraString(req.ExtraConfig, "secret_id") == "" {
return ErrSecretIDRequired
}
}
return nil
}
func isValidProvider(value string) bool {
return value == "leshua" || value == "lakala" || value == "mock"
return value == "leshua" || value == "lakala" || value == "shuncheng" || value == "mock"
}
func isValidSignType(value string) bool {