Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c05cb75
feat: add time-based cancellation fees for no-show fee events
devin-ai-integration[bot] Sep 4, 2025
4bd2585
fix: replace any type with proper type guards for metadata
devin-ai-integration[bot] Sep 4, 2025
cf23e6b
fix: handle JsonValue type compatibility in shouldChargeCancellationFee
devin-ai-integration[bot] Sep 4, 2025
7c3d9c6
Refactor Devin changes to Stripe options
joeauyeung Sep 4, 2025
0be2fda
Undo Devin changes to advanced tab
joeauyeung Sep 4, 2025
3c18561
Add translations
joeauyeung Sep 4, 2025
defe6c2
Pass props to CancelBooking
joeauyeung Sep 4, 2025
5d9fcef
Display no show fee charge for attendee
joeauyeung Sep 4, 2025
c5b8471
WIP
joeauyeung Sep 4, 2025
004df7f
Anstract shouldChargeNoSHowCancellationFee
joeauyeung Sep 5, 2025
6b85588
Abstract `handleNoShowFee`
joeauyeung Sep 5, 2025
7b23906
Add to
joeauyeung Sep 5, 2025
70392ae
Refactor `chargeCard.handler`
joeauyeung Sep 5, 2025
f1b1d23
Remove Devin code
joeauyeung Sep 5, 2025
a91bb71
Type fix in `shouldChargeNoShowCancellationFee`
joeauyeung Sep 5, 2025
0194d6d
Create `processNoSHowFeeOnCancellation`
joeauyeung Sep 5, 2025
4d11139
Process no show fee on cancellation
joeauyeung Sep 5, 2025
b20e678
Type fix
joeauyeung Sep 5, 2025
2522dc0
Skip processing no show fee if organizer or admin is cancelling
joeauyeung Sep 5, 2025
7fd6ead
Add translation
joeauyeung Sep 5, 2025
1706303
Dynamically get and in
joeauyeung Sep 5, 2025
c915116
Remove unused translations
joeauyeung Sep 5, 2025
dde41b9
Undo dev change
joeauyeung Sep 5, 2025
d3b0c85
Merge branch 'main' into devin/1757001996-no-show-cancellation-fees
joeauyeung Sep 5, 2025
4dbe76f
Refactor logic
joeauyeung Sep 5, 2025
8670a9a
Type fix
joeauyeung Sep 5, 2025
eba5f77
Merge branch 'main' into devin/1757001996-no-show-cancellation-fees
alishaz-polymath Sep 5, 2025
a2851eb
remove any
alishaz-polymath Sep 5, 2025
fc28e29
revert WEBAPP_URL_FOR_OAUTH
alishaz-polymath Sep 5, 2025
78e8507
Clean up console.log remnants
alishaz-polymath Sep 5, 2025
5cda957
test: add comprehensive tests for time-based cancellation fees
devin-ai-integration[bot] Sep 5, 2025
6e6b2a8
test: add comprehensive tests for time-based cancellation fees
devin-ai-integration[bot] Sep 5, 2025
3a40b01
test: add comprehensive tests for time-based cancellation fees
devin-ai-integration[bot] Sep 5, 2025
7cd8b47
test: add comprehensive unit and E2E tests for time-based cancellatio…
devin-ai-integration[bot] Sep 5, 2025
2cb59da
Revert dev change
joeauyeung Sep 5, 2025
fb46587
Add missing translation
joeauyeung Sep 5, 2025
236b461
Remove Devin code
joeauyeung Sep 5, 2025
2fa873d
Revert Devin changes
joeauyeung Sep 5, 2025
cad3731
test: fix attendee cancellation test logic and ensure comprehensive t…
devin-ai-integration[bot] Sep 5, 2025
8c760ac
Fix tests
joeauyeung Sep 5, 2025
8823fbd
test: add comprehensive unit tests for no-show fee payment functions
devin-ai-integration[bot] Sep 5, 2025
72b123a
Don't block cancel flow for failed payment processing
joeauyeung Sep 5, 2025
f0efdb2
Await single attendee getTranslation in `handleNoShowFee`
joeauyeung Sep 5, 2025
6cb4fbf
Merge branch main
joeauyeung Sep 5, 2025
7170296
Add missing data
joeauyeung Sep 5, 2025
967ad12
Undo old strings
joeauyeung Sep 5, 2025
4dff3e2
Type fix
joeauyeung Sep 5, 2025
4fe7629
Merge branch 'main' into devin/unit-tests-no-show-fees-1757085131
emrysal Sep 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions packages/features/bookings/lib/handleCancelBooking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,16 +456,24 @@ async function handler(input: CancelBookingInput) {
updatedBookings.push(updatedBooking);

if (bookingToDelete.payment.some((payment) => payment.paymentOption === "ON_BOOKING")) {
await processPaymentRefund({
booking: bookingToDelete,
teamId,
});
try {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrapping these payment functions in a try/catch since the booking is already cancelled. If these fail we shouldn't throw an error to the user

await processPaymentRefund({
booking: bookingToDelete,
teamId,
});
} catch (error) {
log.error(`Error processing payment refund for booking ${bookingToDelete.uid}:`, error);
}
} else if (bookingToDelete.payment.some((payment) => payment.paymentOption === "HOLD")) {
await processNoShowFeeOnCancellation({
booking: bookingToDelete,
payments: bookingToDelete.payment,
cancelledByUserId: userId,
});
try {
await processNoShowFeeOnCancellation({
booking: bookingToDelete,
payments: bookingToDelete.payment,
cancelledByUserId: userId,
});
} catch (error) {
log.error(`Error processing no-show fee for booking ${bookingToDelete.uid}:`, error);
}
}
}

Expand Down
Loading
Loading