)}
);
}
function ButtonsSection(): VNode {
if (payResult) {
if (payResult.type === ConfirmPayResultType.Pending) {
return (
Processing...
);
}
return ;
}
if (payStatus.status === PreparePayResultType.PaymentPossible) {
return (
Pay {amountToString(payStatus.amountEffective)}
);
}
if (payStatus.status === PreparePayResultType.InsufficientBalance) {
return (
{balance ? (
Your balance of {amountToString(balance)} is not enough to pay
for this purchase
) : (
Your balance is not enough to pay for this purchase.
)}
goToWalletManualWithdraw(amountRaw.currency)}
>
Withdraw digital cash
);
}
if (payStatus.status === PreparePayResultType.AlreadyConfirmed) {
return (
{payStatus.paid && contractTerms.fulfillment_message && (
Merchant message}
text={contractTerms.fulfillment_message}
kind="neutral"
/>
)}
{!payStatus.paid && }
);
}
return ;
}
return (
Digital cash payment
{payStatus.status === PreparePayResultType.AlreadyConfirmed &&
(payStatus.paid ? (
payStatus.contractTerms.fulfillment_url ? (
Already paid, you are going to be redirected to{" "}
{payStatus.contractTerms.fulfillment_url}
) : (
Already paid
)
) : (
Already claimed
))}
{payResult && payResult.type === ConfirmPayResultType.Done && (
Payment complete
{!payResult.contractTerms.fulfillment_message ? (
payResult.contractTerms.fulfillment_url ? (
You are going to be redirected to $
{payResult.contractTerms.fulfillment_url}
) : (
You can close this page.
)
) : (
payResult.contractTerms.fulfillment_message
)}