phonepe #53
@ -5,7 +5,7 @@ import * as path from 'path';
|
|||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import { sendEmailWithAttachmentUtil } from "../../../utils/emailService";
|
import { sendEmailWithAttachmentUtil } from "../../../utils/emailService";
|
||||||
import { jsPDF } from "jspdf";
|
import { jsPDF } from "jspdf";
|
||||||
import 'jspdf-autotable';
|
import autoTable from 'jspdf-autotable';
|
||||||
const admin = getAdmin();
|
const admin = getAdmin();
|
||||||
const logger = getLogger();
|
const logger = getLogger();
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ export class InvoiceService {
|
|||||||
doc.text(`Phone: ${data.phoneNumber}`, 20, 80);
|
doc.text(`Phone: ${data.phoneNumber}`, 20, 80);
|
||||||
doc.text(`Email: ${data.email}`, 20, 90);
|
doc.text(`Email: ${data.email}`, 20, 90);
|
||||||
|
|
||||||
(doc as any).autoTable({
|
autoTable(doc,{
|
||||||
startY: 110,
|
startY: 110,
|
||||||
head: [['No.', 'Description', 'HSN/SAC', 'Amount (INR)']],
|
head: [['No.', 'Description', 'HSN/SAC', 'Amount (INR)']],
|
||||||
body: [
|
body: [
|
||||||
|
|||||||
@ -154,7 +154,7 @@ export const phonePeWebhook = onRequest({
|
|||||||
|
|
||||||
logger.info(`Fetching user data for userId: ${userId}`);
|
logger.info(`Fetching user data for userId: ${userId}`);
|
||||||
const userDoc = await admin.firestore()
|
const userDoc = await admin.firestore()
|
||||||
.collection('users')
|
.collection('client_profiles')
|
||||||
.doc(userId)
|
.doc(userId)
|
||||||
.get();
|
.get();
|
||||||
if (userDoc.exists) {
|
if (userDoc.exists) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user