mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-14 06:36:46 +00:00
🎨 fix(profile): reset payment status and refresh payment event for accurate display in profile view.
This commit is contained in:
@@ -124,6 +124,7 @@ $listenForPayment = function () {
|
|||||||
);
|
);
|
||||||
if ($response->json()['status'] === 'Expired') {
|
if ($response->json()['status'] === 'Expired') {
|
||||||
$paymentEvent->btc_pay_invoice = null;
|
$paymentEvent->btc_pay_invoice = null;
|
||||||
|
$paymentEvent->paid = false;
|
||||||
$paymentEvent->save();
|
$paymentEvent->save();
|
||||||
}
|
}
|
||||||
if ($response->json()['status'] === 'Settled') {
|
if ($response->json()['status'] === 'Settled') {
|
||||||
@@ -135,6 +136,7 @@ $listenForPayment = function () {
|
|||||||
if ($paymentEvent->paid) {
|
if ($paymentEvent->paid) {
|
||||||
$this->currentYearIsPaid = true;
|
$this->currentYearIsPaid = true;
|
||||||
}
|
}
|
||||||
|
$paymentEvent = $paymentEvent->refresh();
|
||||||
$this->payments = $this->currentPleb
|
$this->payments = $this->currentPleb
|
||||||
->paymentEvents()
|
->paymentEvents()
|
||||||
->where('paid', true)
|
->where('paid', true)
|
||||||
|
|||||||
Reference in New Issue
Block a user