feat(trade): connect WeChat refund API and callback flow

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-03 21:45:33 +08:00
parent e93e4b8f84
commit ab10431001
20 changed files with 455 additions and 61 deletions
+10
View File
@@ -21,6 +21,16 @@ export type WechatPayOrderResult =
| { mode: 'mock'; externalNo: string; order?: Record<string, unknown> }
| { mode: 'jsapi'; prepay: WechatJsapiPrepayParams; orderId: string };
/** 微信退款回调解密结果 */
export type WechatRefundNotifyResult = {
outRefundNo: string;
refundId: string;
status: 'SUCCESS' | 'PROCESSING' | 'ABNORMAL' | 'CLOSED';
amountFen: number;
outTradeNo?: string;
transactionId?: string;
};
/** 业务错误码:微信支付前需完成微信授权 */
export const WECHAT_AUTH_REQUIRED = 'WECHAT_AUTH_REQUIRED';