fix(v2): 币种错误映射 409/503(不再误导 500 重试)+ DailyLimit 量纲注释
- handler: ErrCurrencyMismatch → 409, ErrNoSettleCurrency → 503 - test: TestV2RetryCurrencyMismatch409 验证重试不同币种渠道返回 409 - config: DailyLimit 添加量纲注释(minor units) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
This commit is contained in:
+6
-4
@@ -27,10 +27,12 @@ type Config struct {
|
||||
// 只存 CredentialEnvPrefix,真值由 internal/accounts.Registry 运行时从环境变量
|
||||
// `<CredentialEnvPrefix>_<KEY>` 读取。
|
||||
type AccountConfig struct {
|
||||
AccountID string `mapstructure:"account_id"`
|
||||
Channel string `mapstructure:"channel"`
|
||||
Weight int `mapstructure:"weight"`
|
||||
Enabled bool `mapstructure:"enabled"`
|
||||
AccountID string `mapstructure:"account_id"`
|
||||
Channel string `mapstructure:"channel"`
|
||||
Weight int `mapstructure:"weight"`
|
||||
Enabled bool `mapstructure:"enabled"`
|
||||
// DailyLimit 单位为该账户所属渠道结算币种的最小单位(minor units)——渠道币种由 Capabilities().SettleCurrencies[0] 决定;
|
||||
// 跨币种账户的限额刻度互不可比,运营配置时按各自币种填。
|
||||
DailyLimit int64 `mapstructure:"daily_limit"`
|
||||
Region string `mapstructure:"region"`
|
||||
Subject string `mapstructure:"subject"`
|
||||
|
||||
Reference in New Issue
Block a user