From c6f8b7fc351a38cc9c750a7dc7947832c6b7b89e Mon Sep 17 00:00:00 2001 From: AllenTJ7 <163137620+AllenTJ7@users.noreply.github.com> Date: Tue, 20 May 2025 15:19:01 +0530 Subject: [PATCH] Update webhook.ts --- functions/src/payments/phonepe/webhook.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/functions/src/payments/phonepe/webhook.ts b/functions/src/payments/phonepe/webhook.ts index 05e4ee9..d392302 100644 --- a/functions/src/payments/phonepe/webhook.ts +++ b/functions/src/payments/phonepe/webhook.ts @@ -106,6 +106,15 @@ export const phonePeWebhook = onRequest({ } if (payload.state === 'COMPLETED') { + logger.info(`Payment COMPLETED for merchantOrderId: ${payload.merchantOrderId}, orderId: ${payload.orderId}`); + + logger.info('Payment completion details:', { + merchantOrderId: payload.merchantOrderId, + orderId: payload.orderId, + amount: payload.amount, + paymentInstrument: payload.paymentInstrument, + timestamp: new Date().toISOString() + }); try { const paymentUpdateSuccess = await updatePaymentDataAfterSuccess( payload.merchantOrderId,