Skip to content

Commit 579d1e3

Browse files
committed
Enhance Registration UI and fix PhonePe calendar redirect
1 parent ad6cf3b commit 579d1e3

3 files changed

Lines changed: 183 additions & 184 deletions

File tree

backend/src/routes/registration.routes.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,12 @@ router.post('/orders/:id/verify-phonepe', async (req, res) => {
280280
// Enqueue ticket generation
281281
await enqueueTicketGeneration(order.id);
282282

283-
return res.json({ success: true, message: 'Payment verified successfully' });
283+
return res.json({
284+
success: true,
285+
message: 'Payment verified successfully',
286+
eventId: order.registration.eventId,
287+
orderId: order.id
288+
});
284289
}
285290

286291
if (statusResponse.paymentState === 'PENDING') {

frontend/src/pages/public/PhonePeCallbackPage.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ export default function PhonePeCallbackPage() {
3030
setStatus('success');
3131
toast.success('Payment successful! Check your email for the ticket.');
3232
setTimeout(() => {
33-
navigate('/success', { state: { orderId } });
33+
navigate('/success', {
34+
state: {
35+
orderId,
36+
eventId: response.data.eventId
37+
}
38+
});
3439
}, 2000);
3540
} else if (response.data.state === 'PENDING') {
3641
setStatus('pending');

0 commit comments

Comments
 (0)