change the payment screen

This commit is contained in:
cnohall 2024-09-10 15:37:53 +09:00
parent 5d07317cfa
commit f1c25e678e

View File

@ -4,12 +4,11 @@
<div class="alert alert-failure mb-4" hidden id="errors"></div> <div class="alert alert-failure mb-4" hidden id="errors"></div>
<div class="blockonomics-payment-wrapper"> <div class="blockonomics-payment-wrapper">
<div class="progress-message"> <!-- <div class="progress-message">
Your payment txid has been recieved. Your payment txid has been recieved.
<!-- <span id="txid"></span> -->
<br/><br/> <br/><br/>
The <a id="link" href="{{ $invoice_redirect_url }}" target="_blank">invoice</a> will be marked as paid automatically once the payment is confirmed. The <a id="link" href="{{ $invoice_redirect_url }}" target="_blank">invoice</a> will be marked as paid automatically once the payment is confirmed.
</div> </div> -->
<div class="initial-state"> <div class="initial-state">
<div class="invoice-number">Invoice #{{$invoice_number}}</div> <div class="invoice-number">Invoice #{{$invoice_number}}</div>
<div>To pay, send exactly this BTC amount</div> <div>To pay, send exactly this BTC amount</div>
@ -104,9 +103,9 @@
console.log('Payment status:', data.status); console.log('Payment status:', data.status);
const isPaymentUnconfirmed = data.status === 0; const isPaymentUnconfirmed = data.status === 0;
const isPaymentPartiallyConfirmed = data.status === 1; const isPaymentPartiallyConfirmed = data.status === 1;
const isPaymentConfirmed = data.status === 2; // TODO: Do we need to handle Payment confirmed status?
const shouldSubmitForm = isPaymentUnconfirmed || isPaymentConfirmed || isPaymentPartiallyConfirmed; // This usually takes too long to happen, so we can just wait for the unconfirmed status?
if (shouldSubmitForm) { if (isPaymentUnconfirmed || isPaymentPartiallyConfirmed) {
document.querySelector('input[name="txid"]').value = data.txid || ''; document.querySelector('input[name="txid"]').value = data.txid || '';
document.getElementById('server-response').submit(); document.getElementById('server-response').submit();
} }
@ -164,7 +163,7 @@
transform: translateY(-50%); transform: translateY(-50%);
cursor: pointer; cursor: pointer;
} }
.progress-message { /* .progress-message {
display: none; display: none;
margin: 90px 0; margin: 90px 0;
max-width: 400px; max-width: 400px;
@ -174,7 +173,7 @@
#link { #link {
color: #007bff; color: #007bff;
text-decoration: underline; text-decoration: underline;
} } */
</style> </style>
<!-- @include('portal.ninja2020.gateways.includes.pay_now') --> <!-- @include('portal.ninja2020.gateways.includes.pay_now') -->