diff --git a/resources/views/pages/association/profile.blade.php b/resources/views/pages/association/profile.blade.php index a87e79b..3c62bfc 100644 --- a/resources/views/pages/association/profile.blade.php +++ b/resources/views/pages/association/profile.blade.php @@ -91,7 +91,7 @@ $pay = function ($comment) { ], ], 'checkout' => [ - 'expirationMinutes' => 60 * 24 * 356, + 'expirationMinutes' => 60 * 24, 'redirectURL' => url()->route('association.profile'), 'redirectAutomatically' => true, 'defaultLanguage' => 'de', @@ -122,6 +122,10 @@ $listenForPayment = function () { ->get( 'https://pay.einundzwanzig.space/api/v1/stores/98PF86BoMd3C8P1nHHyFdoeznCwtcm5yehcAgoCYDQ2a/invoices/' . $paymentEvent->btc_pay_invoice, ); + if ($response->json()['status'] === 'Expired') { + $paymentEvent->btc_pay_invoice = null; + $paymentEvent->save(); + } if ($response->json()['status'] === 'Settled') { $paymentEvent->paid = true; $paymentEvent->save(); @@ -533,7 +537,8 @@ $loadEvents = function () {