🎨 fix(profile): reset payment status and refresh payment event for accurate display in profile view.

This commit is contained in:
fsociety
2024-10-24 17:02:26 +02:00
parent 52109394bd
commit 5c4f9b6371

View File

@@ -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)