diff --git a/app-modules/payment/src/Filament/Actions/RefundBookingTableAction.php b/app-modules/payment/src/Filament/Actions/RefundBookingTableAction.php index 6f2d34b..86856cc 100644 --- a/app-modules/payment/src/Filament/Actions/RefundBookingTableAction.php +++ b/app-modules/payment/src/Filament/Actions/RefundBookingTableAction.php @@ -61,6 +61,17 @@ class RefundBookingTableAction auth()->id(), ); + // RefundBookingAction only dispatches RefundProcessed; + // the actual Confirmed → Cancelled flip happens in + // MarkBookingRefunded, which is queued (kept that way — + // it's the API/webhook path's source of truth too). Set + // it here as well, scoped to just this Filament action, + // so the row/page reflects it the moment this request + // finishes instead of after a queue worker catches up. + if ($record->status === BookingStatus::Confirmed) { + $record->update(['status' => BookingStatus::Cancelled]); + } + Notification::make() ->title('Refund processed') ->success()