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();