From aa667df889a45a055c905cc53d8bdc9c202d3886 Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 11 Jul 2026 22:25:05 +0200 Subject: [PATCH] Add /donation/success route and flash messages for both outcomes Cancelled donations now show "Donation failed, but thank you for trying anyway." and successful ones show "Thank you for the donation!" on the dashboard after redirect. --- src/Website/Controller/HomeController.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Website/Controller/HomeController.php b/src/Website/Controller/HomeController.php index 32a492e..12b6ea5 100644 --- a/src/Website/Controller/HomeController.php +++ b/src/Website/Controller/HomeController.php @@ -33,6 +33,16 @@ final class HomeController extends AbstractController #[Route(path: '/donation/cancel', name: 'website_donation_cancel')] public function donationCancel(): Response { + $this->addFlash('info', 'Donation failed, but thank you for trying anyway.'); + + return $this->redirectToRoute('game_dashboard'); + } + + #[Route(path: '/donation/success', name: 'website_donation_success')] + public function donationSuccess(): Response + { + $this->addFlash('success', 'Thank you for the donation!'); + return $this->redirectToRoute('game_dashboard'); } }