From 78e5ebc17e05117b06d68153f4d205d32c2d3f17 Mon Sep 17 00:00:00 2001 From: pigeon Date: Sun, 7 Jun 2026 19:12:09 +0800 Subject: [PATCH] =?UTF-8?q?docs(plan):=20=E4=BF=AE=E6=AD=A3=20AlipayApiCli?= =?UTF-8?q?ent=20=E5=AD=97=E6=AE=B5=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AlipayApiClient 构造需 (appId, privateKey, publicKey), AppCredentialsVO 无这两个字段(按 spec 在 certificates JSON 数组里)。 AlipayApiClient.getAccessToken 当前抛 UnsupportedOperationException, 所以 privateKey/publicKey 暂用空串占位,cert 解析留作后续 Task。 --- ...26-06-07-wechat-alipay-credentials-runtime-plan.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/superpowers/plans/2026-06-07-wechat-alipay-credentials-runtime-plan.md b/superpowers/plans/2026-06-07-wechat-alipay-credentials-runtime-plan.md index dd76ffe..dc19d2d 100644 --- a/superpowers/plans/2026-06-07-wechat-alipay-credentials-runtime-plan.md +++ b/superpowers/plans/2026-06-07-wechat-alipay-credentials-runtime-plan.md @@ -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);