Skip to content

Commit ed81808

Browse files
feat: 添加 V3协议扩展 additionalAuthInfo
1 parent 796b55a commit ed81808

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/alipay.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,10 @@ export class AlipaySdk {
453453
authString += `,app_cert_sn=${this.config.appCertSn}`;
454454
}
455455
authString += `,nonce=${randomUUID()},timestamp=${Date.now()}`;
456+
if (this.config.additionalAuthInfo) {
457+
authString += `,${this.config.additionalAuthInfo}`;
458+
}
459+
456460
// 签名字符串拼接格式:
457461
//
458462
// ```txt

src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,6 @@ export interface AlipaySdkConfig {
6060
wsServiceUrl?: string;
6161
/** httpClient 请求代理 */
6262
proxyAgent?: ProxyAgent;
63+
/** Authorization 扩展信息 */
64+
additionalAuthInfo?: string;
6365
}

0 commit comments

Comments
 (0)