chore: implenet the external invoice

This commit is contained in:
mahyargdz
2025-07-14 10:24:58 +03:30
parent 5fe82bb661
commit 11b8164c28
13 changed files with 241 additions and 30 deletions
@@ -2,7 +2,7 @@ import { BadGatewayException, Injectable } from "@nestjs/common";
import { PaymentMessage } from "../../../common/enums/message.enum";
import { GatewayEnum } from "../enums/gateway.enum";
import { ParsianGateway } from "../gateways/parsian.gateway";
// import { ParsianGateway } from "../gateways/parsian.gateway";
import { ZarinpalGateway } from "../gateways/zarinpal.gateway";
import { IPaymentGateway, IPaymentGatewayFactory } from "../interfaces/IPayment";
import { GatewayType } from "../types/gateway.type";
@@ -13,7 +13,7 @@ export class PaymentGatewayFactory implements IPaymentGatewayFactory {
constructor(
private readonly zarinpalGateway: ZarinpalGateway,
private readonly parsianGateway: ParsianGateway,
// private readonly parsianGateway: ParsianGateway,
) {
this.gateways = new Map<GatewayType, IPaymentGateway>();
this.initializeGateways();
@@ -21,7 +21,7 @@ export class PaymentGatewayFactory implements IPaymentGatewayFactory {
private initializeGateways(): void {
this.gateways.set(GatewayEnum.ZARINPAL, this.zarinpalGateway);
this.gateways.set(GatewayEnum.PARSIAN, this.parsianGateway);
// this.gateways.set(GatewayEnum.PARSIAN, this.parsianGateway);
}
getPaymentGateway(provider: GatewayType): IPaymentGateway {