docs(plan): 修正 AlipayApiClient 字段映射
AlipayApiClient 构造需 (appId, privateKey, publicKey), AppCredentialsVO 无这两个字段(按 spec 在 certificates JSON 数组里)。 AlipayApiClient.getAccessToken 当前抛 UnsupportedOperationException, 所以 privateKey/publicKey 暂用空串占位,cert 解析留作后续 Task。
This commit is contained in:
@@ -236,10 +236,17 @@
|
||||
}
|
||||
|
||||
// 3. 用最新凭证动态构造 API 客户端
|
||||
// 字段映射说明(2026-06-07 修正):
|
||||
// - AlipayApiClient 构造需要 (appId, privateKey, publicKey)
|
||||
// - AppCredentialsVO 没有 privateKey/publicKey 字段
|
||||
// - 按 spec 私钥/公钥存在 certificates JSON 数组里
|
||||
// - 当前 AlipayApiClient.getAccessToken() 仍抛 UnsupportedOperationException
|
||||
// (未接入 SDK),所以 privateKey/publicKey 暂用空串占位
|
||||
// - 后续 Task:Alipay SDK 集成 + certificates JSON 解析
|
||||
AlipayApiClient alipayApiClient = new AlipayApiClient(
|
||||
creds.getAppId(),
|
||||
creds.getAppKey(),
|
||||
creds.getAesKey() == null ? "" : creds.getAesKey());
|
||||
"", // privateKey 占位
|
||||
""); // publicKey 占位
|
||||
|
||||
// 4. 调用支付宝 API 获取 userId(按 spec 第 5.4 节:userId 作为唯一标识)
|
||||
AlipayApiClient.AlipayTokenResponse alipayResponse = alipayApiClient.getAccessToken(code);
|
||||
|
||||
Reference in New Issue
Block a user