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);