-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
530 expire checkout sessions last spot (#556)
* Webhook expires other checkout sessions when the last booking spot is taken. * codegen * Refactored logic to calculate available slots. * removed isLastSpotTaken() from BookingSlotsService.ts * codegen * NZ doesn't accept async payment * Added parsing of session.metadata[BOOKING_SLOTS_KEY] to handle the metadata correctly. Adjusted the logic to filter sessions based on the booking slot IDs from parsed metadata. * initialised booking data/slot services in function rather than passing it through. * Used relevant method in StripeService.ts to fetch sessions 24hrs ago. * codegen * codegen * Moved isLastSpotTaken function to BookingUtils.ts and wrote tests. * prettier
- Loading branch information
1 parent
6dab60b
commit 6a78876
Showing
3 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters