phonepe (#63)
All checks were successful
Deploy FitLien services to Dev / Deploy to Dev (push) Successful in 3m32s

Co-authored-by: AllenTJ7 <163137620+AllenTJ7@users.noreply.github.com>
Reviewed-on: #63
This commit is contained in:
Allen T J 2025-06-24 11:53:03 +00:00
parent 9cbdcf3c37
commit c80fb0c4b4

View File

@ -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}`);
}