From 4b054fac56cde2db90f7dcf4b0256381c4031561 Mon Sep 17 00:00:00 2001 From: Allen T J Date: Wed, 21 May 2025 10:10:13 +0000 Subject: [PATCH] phonepe (#42) Co-authored-by: AllenTJ7 <163137620+AllenTJ7@users.noreply.github.com> Reviewed-on: https://git.cosqnet.com/cosqnet/fitlien-services/pulls/42 --- functions/src/payments/phonepe/invoice/invoiceService.ts | 4 ++-- functions/src/payments/phonepe/webhook.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/src/payments/phonepe/invoice/invoiceService.ts b/functions/src/payments/phonepe/invoice/invoiceService.ts index 95ffa7d..8c3d491 100644 --- a/functions/src/payments/phonepe/invoice/invoiceService.ts +++ b/functions/src/payments/phonepe/invoice/invoiceService.ts @@ -5,7 +5,7 @@ import * as path from 'path'; import { format } from 'date-fns'; import { sendEmailWithAttachmentUtil } from "../../../utils/emailService"; import { jsPDF } from "jspdf"; -import 'jspdf-autotable'; +import autoTable from 'jspdf-autotable'; const admin = getAdmin(); const logger = getLogger(); @@ -83,7 +83,7 @@ export class InvoiceService { doc.text(`Phone: ${data.phoneNumber}`, 20, 80); doc.text(`Email: ${data.email}`, 20, 90); - (doc as any).autoTable({ + autoTable(doc,{ startY: 110, head: [['No.', 'Description', 'HSN/SAC', 'Amount (INR)']], body: [ diff --git a/functions/src/payments/phonepe/webhook.ts b/functions/src/payments/phonepe/webhook.ts index 90a0a43..42aa29f 100644 --- a/functions/src/payments/phonepe/webhook.ts +++ b/functions/src/payments/phonepe/webhook.ts @@ -154,7 +154,7 @@ export const phonePeWebhook = onRequest({ logger.info(`Fetching user data for userId: ${userId}`); const userDoc = await admin.firestore() - .collection('users') + .collection('client_profiles') .doc(userId) .get(); if (userDoc.exists) {