mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-13 05:26:47 +00:00
🔧 fix(association): adjust checkout expiration and handle expired payment events in profile view
This commit is contained in:
@@ -91,7 +91,7 @@ $pay = function ($comment) {
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
'checkout' => [
|
'checkout' => [
|
||||||
'expirationMinutes' => 60 * 24 * 356,
|
'expirationMinutes' => 60 * 24,
|
||||||
'redirectURL' => url()->route('association.profile'),
|
'redirectURL' => url()->route('association.profile'),
|
||||||
'redirectAutomatically' => true,
|
'redirectAutomatically' => true,
|
||||||
'defaultLanguage' => 'de',
|
'defaultLanguage' => 'de',
|
||||||
@@ -122,6 +122,10 @@ $listenForPayment = function () {
|
|||||||
->get(
|
->get(
|
||||||
'https://pay.einundzwanzig.space/api/v1/stores/98PF86BoMd3C8P1nHHyFdoeznCwtcm5yehcAgoCYDQ2a/invoices/' . $paymentEvent->btc_pay_invoice,
|
'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') {
|
if ($response->json()['status'] === 'Settled') {
|
||||||
$paymentEvent->paid = true;
|
$paymentEvent->paid = true;
|
||||||
$paymentEvent->save();
|
$paymentEvent->save();
|
||||||
@@ -533,7 +537,8 @@ $loadEvents = function () {
|
|||||||
</td>
|
</td>
|
||||||
<td class="w-full block md:w-auto md:table-cell py-0.5 md:py-2">
|
<td class="w-full block md:w-auto md:table-cell py-0.5 md:py-2">
|
||||||
@if($payment->btc_pay_invoice)
|
@if($payment->btc_pay_invoice)
|
||||||
<x-button target="_blank" xs label="Quittung"
|
<x-button target="_blank" xs
|
||||||
|
label="Quittung"
|
||||||
href="https://pay.einundzwanzig.space/i/{{ $payment->btc_pay_invoice }}/receipt"/>
|
href="https://pay.einundzwanzig.space/i/{{ $payment->btc_pay_invoice }}/receipt"/>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user