feat: ( notifications ) add payment/cancellation events and ticket confirmation

This commit is contained in:
Abubeker Yasin
2026-06-19 15:49:30 +03:00
parent fcbc59e95b
commit 2288a9efda
7 changed files with 280 additions and 39 deletions

View File

@@ -622,6 +622,12 @@ export class PaymentsService {
failureMessage: event.failureMessage,
});
}
const failedBooking = await this.prisma.booking.findUnique({
where: { id: event.referenceId },
});
if (failedBooking) {
this.eventEmitter.emit("payment.failed", { booking: failedBooking });
}
return { processed: true };
}