chore: implenet the external invoice
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user