@using BTCPayServer.Client @using BTCPayServer.Services @inject BTCPayServer.Security.ContentSecurityPolicies Csp @inject BTCPayServerEnvironment Env @inject DisplayFormatter DisplayFormatter @model BTCPayServer.Models.ViewPullPaymentModel @{ ViewData["Title"] = Model.Title; ViewData["StoreBranding"] = Model.StoreBranding; Csp.UnsafeEval(); Layout = null; string StatusTextClass(string status) { switch (status) { case "Completed": case "In Progress": return "bg-success"; case "Cancelled": return "bg-danger"; default: return "bg-warning"; } } ViewData.SetBlazorAllowed(false); }
@if (Model.IsPending) { }
@if (!ViewContext.ModelState.IsValid) { @Html.ValidationSummary(string.Empty, new { @class = $"alert alert-danger mb-4 pb-0 {(ViewContext.ModelState.ErrorCount.Equals(1) ? "no-marker" : "")}" }) }
@if (!string.IsNullOrWhiteSpace(Model.Title)) {

@Model.Title

}
Start Date @Model.StartDate.ToString("g")
Last Updated @Model.LastRefreshed.ToString("g")
@if (!string.IsNullOrEmpty(Model.ResetIn)) {

Reset in   @Model.ResetIn

} @if (!string.IsNullOrEmpty(Model.Description)) {
@Safe.Raw(Model.Description)
}

Payment Details

@DisplayFormatter.Currency(Model.AmountDue, Model.Currency)
Available claim
@DisplayFormatter.Currency(Model.AmountCollected, Model.Currency)
Already claimed
@DisplayFormatter.Currency(Model.Amount, Model.Currency)
Claim limit

Claims

@if (Model.Payouts.Any()) {
@foreach (var invoice in Model.Payouts) { }
Destination Method Amount requested Status
@invoice.Destination @invoice.PaymentMethod.ToString() @invoice.AmountFormatted @if (!string.IsNullOrEmpty(invoice.Link)) { @invoice.Status.GetStateString() } else { @invoice.Status.GetStateString() }
} else {

No claim made yet.

}
@if (Model.LnurlEndpoint is not null) { var lnurlUri = LNURL.LNURL.EncodeUri(Model.LnurlEndpoint, "withdrawRequest", false).ToString(); var lnurlBech32 = LNURL.LNURL.EncodeUri(Model.LnurlEndpoint, "withdrawRequest", true).ToString(); var note = "

You can scan or open this link with a LNURL-Withdraw enabled wallet.

"; if (!Model.AutoApprove) { note += "

Please note that this pull payment does not automatically send out funds, but will process the payment after the LNURL-withdraw flow is completed.

"; } }