@inject LanguageService LangService @inject BTCPayServerEnvironment Env @inject IFileService FileService @inject IEnumerable UiExtensions @inject PaymentMethodHandlerDictionary PaymentMethodHandlerDictionary @using BTCPayServer.Services @using BTCPayServer.Abstractions.Contracts @using Microsoft.AspNetCore.Mvc.TagHelpers @model PaymentModel @{ Layout = null; ViewData["Title"] = Model.HtmlTitle; var hasPaymentPlugins = UiExtensions.Any(extension => extension.Location == "checkout-payment-method"); var paymentMethodCount = Model.AvailableCryptos.Count; var logoUrl = !string.IsNullOrEmpty(Model.LogoFileId) ? await FileService.GetFileUrl(Context.Request.GetAbsoluteRootUri(), Model.LogoFileId) : Model.CustomLogoLink; } @functions { private string PaymentMethodName(PaymentModel.AvailableCrypto pm) { return Model.AltcoinsBuild ? $"{pm.PaymentMethodName} {pm.CryptoCode}" : pm.PaymentMethodName.Replace("Bitcoin (", "").Replace(")", "").Replace("Lightning ", ""); } private string ToJsValue(object value) { return Safe.Json(value).ToString()?.Replace("\"", "'"); } } @if (!string.IsNullOrEmpty(Model.BrandColor)) { }
@if (!string.IsNullOrEmpty(logoUrl)) { }

@Model.StoreName

@Model.ItemDesc
@if (Model.IsUnsetTopUp) {

} else {

@Model.BtcDue @Model.CryptoCode

}
{{timeText}}
@if (paymentMethodCount > 1 || hasPaymentPlugins) {
@foreach (var crypto in Model.AvailableCryptos) { @PaymentMethodName(crypto) } @await Component.InvokeAsync("UiExtensionPoint", new { location = "checkout-payment-method", model = Model })
}

@if (Env.CheatMode) { }
{{srvModel.orderAmount}} {{ srvModel.cryptoCode }}
{{srvModel.orderAmountFiat}}
{{ srvModel.networkFee }} {{ srvModel.cryptoCode }}
{{srvModel.btcPaid }} {{ srvModel.cryptoCode }}
{{srvModel.btcDue}} {{ srvModel.cryptoCode }}
@if (Env.CheatMode) { } @foreach (var paymentMethodHandler in PaymentMethodHandlerDictionary .Select(handler => handler.GetCheckoutUISettings()) .Where(settings => settings != null) .DistinctBy(pm => pm.ExtensionPartial)) { } @await Component.InvokeAsync("UiExtensionPoint", new { location = "checkout-payment", model = Model })