phonepe #63

Merged
allentj merged 46 commits from phonepe into dev 2025-06-24 11:53:03 +00:00
Showing only changes of commit f0f2cd3411 - Show all commits

View File

@ -172,6 +172,7 @@ export const phonePeWebhook = onRequest({
let paymentType = orderData.metaInfo?.paymentType || 'Gym Membership';
let trainerId = orderData.metaInfo?.trainerId;
let trainerData = null;
let emailCustomer = membershipData?.fields?.['email'] || membershipData?.fields?.['Email Address'];
const discountPercentage = orderData.metaInfo?.discount || 0;
const hasDiscount = discountPercentage > 0;
@ -308,7 +309,7 @@ export const phonePeWebhook = onRequest({
const formattedDate = format(new Date(), 'dd/MM/yyyy');
if (membershipData?.fields?.['email']) {
if (emailCustomer) {
logger.info(`Preparing to send invoice email to customer: ${membershipData?.fields?.['email']}`);
try {
const emailSubject = isFreeplan