From f518d4bc9d6ce1db6fbcc50849f03f6fceff15c6 Mon Sep 17 00:00:00 2001 From: Allen T J Date: Tue, 24 Jun 2025 08:55:48 +0000 Subject: [PATCH] phonepe (#62) Co-authored-by: AllenTJ7 <163137620+AllenTJ7@users.noreply.github.com> Reviewed-on: https://git.cosqnet.com/cosqnet/fitlien-services/pulls/62 --- functions/src/payments/phonepe/webhook.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/functions/src/payments/phonepe/webhook.ts b/functions/src/payments/phonepe/webhook.ts index 86bb323..cfb462a 100644 --- a/functions/src/payments/phonepe/webhook.ts +++ b/functions/src/payments/phonepe/webhook.ts @@ -627,15 +627,15 @@ async function processMembershipPayment(payload: any, orderData: any, membership } } -async function processServicePayment(payload: any, orderData: any, serviceId: string) { +async function processServicePayment(payload: any, orderData: any, paymentId: string) { try { - logger.info(`Processing service payment for serviceId: ${serviceId}`); + logger.info(`Processing service payment for serviceId: ${paymentId}`); - const serviceRef = admin.firestore().collection('service_payments').doc(serviceId); + const serviceRef = admin.firestore().collection('service_payments').doc(paymentId); const serviceDoc = await serviceRef.get(); if (!serviceDoc.exists) { - logger.error(`Service booking not found for serviceId: ${serviceId}`); + logger.error(`Service booking not found for serviceId: ${paymentId}`); return; } @@ -651,7 +651,7 @@ async function processServicePayment(payload: any, orderData: any, serviceId: st updatedAt: admin.firestore.FieldValue.serverTimestamp() }); - logger.info(`Updated service booking status to 'CONFIRMED' for serviceId: ${serviceId}`); + logger.info(`Updated service booking status to 'CONFIRMED' for serviceId: ${paymentId}`); const serviceData = serviceDoc.data(); const gymId = orderData.metaInfo?.gymId || serviceData?.gymId;