feat(client): pay 支付领域模型 + PaymentApi + 支付流控制器(轮询 activated)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
This commit is contained in:
wangjia
2026-07-10 23:19:57 +08:00
parent 16b8823f1f
commit e66f79fdf6
7 changed files with 456 additions and 1 deletions
+3 -1
View File
@@ -91,12 +91,14 @@ class ApiClient {
Never _throwFromResponse(http.Response resp) {
String zh = '操作失败 (HTTP ${resp.statusCode})';
String en = 'Request failed (HTTP ${resp.statusCode})';
String? code;
try {
final b = jsonDecode(resp.body) as Map<String, dynamic>;
zh = b['message_zh'] as String? ?? zh;
en = b['message_en'] as String? ?? en;
code = b['code'] as String?;
} catch (_) {}
throw AuthApiException(statusCode: resp.statusCode, messageZh: zh, messageEn: en);
throw AuthApiException(statusCode: resp.statusCode, messageZh: zh, messageEn: en, code: code);
}
void dispose() => _client.close();