This commit is contained in:
2026-06-30 10:33:56 +08:00
commit 6e047dc0a5
607 changed files with 65966 additions and 0 deletions
@@ -0,0 +1,3 @@
export interface IPayProvider {
payOrder(orderId: bigint): Promise<{ externalNo: string }>;
}
@@ -0,0 +1,15 @@
import { Injectable } from '@nestjs/common';
import { loadAppConfig } from '@dukang/shared-types';
import { IPayProvider } from './pay.interface';
@Injectable()
export class PayMockProvider implements IPayProvider {
private readonly config = loadAppConfig();
async payOrder(_orderId: bigint): Promise<{ externalNo: string }> {
if (!this.config.mockPay) {
throw new Error('Real WeChat pay not implemented in preV1');
}
return { externalNo: `MOCK-${Date.now()}` };
}
}