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
@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { loadAppConfig } from '@dukang/shared-types';
import type { IPayProvider, PayMethod, PayOrderResult } from './pay.interface';
import type { IPayProvider, PayMethod, PayOrderResult, RefundOrderResult } from './pay.interface';
import { PayMockProvider } from './pay.mock.provider';
import { PayWechatProvider } from './pay.wechat.provider';
@@ -24,4 +24,12 @@ export class PayRouterProvider implements IPayProvider {
): Promise<PayOrderResult> {
return this.resolve().payOrder(orderId, openId, platform, payMethod);
}
refundOrder(
orderId: bigint,
outRefundNo: string,
reason?: string,
): Promise<RefundOrderResult> {
return this.resolve().refundOrder(orderId, outRefundNo, reason);
}
}