From ae19a611b37a1bc20f6291da2fbab45797cd0465 Mon Sep 17 00:00:00 2001 From: Allen T J Date: Tue, 20 May 2025 08:04:46 +0000 Subject: [PATCH] phonepe (#30) Co-authored-by: AllenTJ7 <163137620+AllenTJ7@users.noreply.github.com> Reviewed-on: https://git.cosqnet.com/cosqnet/fitlien-services/pulls/30 --- functions/src/payments/phonepe/invoice/index.ts | 5 +++-- functions/src/payments/phonepe/invoice/invoiceService.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/functions/src/payments/phonepe/invoice/index.ts b/functions/src/payments/phonepe/invoice/index.ts index 3d423aa..daa2183 100644 --- a/functions/src/payments/phonepe/invoice/index.ts +++ b/functions/src/payments/phonepe/invoice/index.ts @@ -2,11 +2,12 @@ import { getInvoiceUrl } from './getInvoiceUrl'; import { InvoiceService } from './invoiceService'; import { processInvoice } from './processInvoice'; import { sendInvoiceEmail } from './sendInvoiceEmail'; +import { directGenerateInvoice } from './directInvoice'; -// Export all invoice-related functions export { getInvoiceUrl, InvoiceService, processInvoice, - sendInvoiceEmail + sendInvoiceEmail, + directGenerateInvoice, }; diff --git a/functions/src/payments/phonepe/invoice/invoiceService.ts b/functions/src/payments/phonepe/invoice/invoiceService.ts index 8f2db0b..eb8a1e5 100644 --- a/functions/src/payments/phonepe/invoice/invoiceService.ts +++ b/functions/src/payments/phonepe/invoice/invoiceService.ts @@ -7,7 +7,7 @@ import { sendEmailWithAttachmentUtil } from "../../../utils/emailService"; import * as pdfMake from 'pdfmake/build/pdfmake'; import * as pdfFonts from 'pdfmake/build/vfs_fonts'; -(pdfMake as any).vfs = pdfFonts.vfs; +(pdfMake as any).vfs = (pdfFonts as any).pdfMake ? (pdfFonts as any).pdfMake.vfs : pdfFonts.vfs; const admin = getAdmin(); const logger = getLogger();