diff --git a/functions/src/payments/phonepe/webhook.ts b/functions/src/payments/phonepe/webhook.ts index cfb462a..88c9c6f 100644 --- a/functions/src/payments/phonepe/webhook.ts +++ b/functions/src/payments/phonepe/webhook.ts @@ -120,7 +120,7 @@ export const phonePeWebhook = onRequest({ const orderData = orderDoc.data(); const membershipId = orderData.metaInfo?.membershipId; const bookingId = orderData.metaInfo?.bookingId; - const serviceId = orderData.metaInfo?.serviceId; + const paymentId = orderData.metaInfo?.paymentId; if (bookingId) { await processDayPassBooking(payload, orderData, bookingId); @@ -139,8 +139,8 @@ export const phonePeWebhook = onRequest({ if (paymentUpdateSuccess) { await processMembershipPayment(payload, orderData, membershipId); } - } else if (serviceId) { - await processServicePayment(payload, orderData, serviceId); + } else if (paymentId) { + await processServicePayment(payload, orderData, paymentId); } else { logger.error(`No membershipId, bookingId, or serviceId found in metaInfo for order: ${payload.merchantOrderId}`); }