From 5c4f9b6371a2fb8b41b99c7c347c8292c9b8facb Mon Sep 17 00:00:00 2001 From: fsociety Date: Thu, 24 Oct 2024 17:02:26 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20fix(profile):=20reset=20payment?= =?UTF-8?q?=20status=20and=20refresh=20payment=20event=20for=20accurate=20?= =?UTF-8?q?display=20in=20profile=20view.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/pages/association/profile.blade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/views/pages/association/profile.blade.php b/resources/views/pages/association/profile.blade.php index 3c62bfc..0b3ca0d 100644 --- a/resources/views/pages/association/profile.blade.php +++ b/resources/views/pages/association/profile.blade.php @@ -124,6 +124,7 @@ $listenForPayment = function () { ); if ($response->json()['status'] === 'Expired') { $paymentEvent->btc_pay_invoice = null; + $paymentEvent->paid = false; $paymentEvent->save(); } if ($response->json()['status'] === 'Settled') { @@ -135,6 +136,7 @@ $listenForPayment = function () { if ($paymentEvent->paid) { $this->currentYearIsPaid = true; } + $paymentEvent = $paymentEvent->refresh(); $this->payments = $this->currentPleb ->paymentEvents() ->where('paid', true)