feat: payment service with IPG

This commit is contained in:
matin jamshidi
2025-01-03 11:29:33 +03:30
parent f2fb7188ad
commit 6c80c1138f
23 changed files with 495 additions and 96 deletions
+18
View File
@@ -0,0 +1,18 @@
import { Injectable } from "@nestjs/common";
import { ZarinPalGateway } from "./gateways/zarinpal";
@Injectable()
export class PaymentGateway {
constructor(
private zarinpalGateway: ZarinPalGateway,
) { }
async requestPayment(data: any) {
return await this.zarinpalGateway.processPayment(data.amount, data.userId, data.callbackPath);
}
async verifyPayment(data: any) {
return await this.zarinpalGateway.verifyPayment(data.authority, data.amount);
}
}