diff --git a/resources/views/portal/ninja2020/gateways/blockonomics/pay.blade.php b/resources/views/portal/ninja2020/gateways/blockonomics/pay.blade.php index 0b0ca221c20b..59e25c5d110c 100644 --- a/resources/views/portal/ninja2020/gateways/blockonomics/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/blockonomics/pay.blade.php @@ -4,6 +4,10 @@
+
+ The payment is unconfirmed but in progress, please stay tuned. +
+
Invoice #{{$invoice_number}}
To pay, send exactly this BTC amount
@@ -16,6 +20,7 @@ ') }}" class="icon" alt="Copy Icon">
+
@@ -94,7 +99,14 @@ ws.onmessage = function(event) { const data = JSON.parse(event.data); console.log('Payment status:', data.status); - const isPaymentConfirmed = data.status == 2; + const isPaymentUnconfirmed = data.status === 0; + const isPaymentConfirmed = data.status === 2; + if (isPaymentUnconfirmed) { + // Hide all existing content + document.querySelector('.initial-state').style.display = 'none'; + document.querySelector('.progress-message').style.display = 'block'; + return; + } if (isPaymentConfirmed) { document.querySelector('input[name="txid"]').value = data.txid || ''; document.getElementById('server-response').submit(); @@ -120,6 +132,11 @@ margin-bottom: 20px; } .blockonomics-payment-wrapper { + padding: 12px; + display: flex; + justify-content: center; + } + .initial-state { justify-content: center; display: flex; flex-direction: column; @@ -148,6 +165,12 @@ transform: translateY(-50%); cursor: pointer; } + .progress-message { + display: none; + margin: 120px 0; + font-weight: bold; + font-size: 18px; + }