2020-11-09 01:11:03 -06:00
|
|
|
@using BTCPayServer.Payments
|
2020-09-15 11:09:09 +02:00
|
|
|
@model CheckoutExperienceViewModel
|
2018-03-27 14:48:32 +09:00
|
|
|
@{
|
|
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
2021-04-08 15:32:42 +02:00
|
|
|
ViewData.SetActivePageAndTitle(StoreNavPages.Checkout, "Checkout experience", Context.GetStoreData().StoreName);
|
2020-07-22 15:28:31 +02:00
|
|
|
}
|
|
|
|
|
2018-03-27 14:48:32 +09:00
|
|
|
<div class="row">
|
2021-04-08 15:32:42 +02:00
|
|
|
<div class="col-lg-8">
|
2018-03-27 14:48:32 +09:00
|
|
|
<form method="post">
|
2021-04-08 15:32:42 +02:00
|
|
|
@if (!ViewContext.ModelState.IsValid)
|
|
|
|
{
|
|
|
|
<div asp-validation-summary="All" class="text-danger"></div>
|
|
|
|
}
|
2020-07-22 15:30:58 +02:00
|
|
|
<h4 class="mb-3">Payment</h4>
|
2020-09-15 11:09:09 +02:00
|
|
|
@if (Model.PaymentMethods.Any())
|
|
|
|
{
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="DefaultPaymentMethod"></label>
|
|
|
|
<select asp-for="DefaultPaymentMethod" asp-items="Model.PaymentMethods" class="form-control w-auto"></select>
|
|
|
|
</div>
|
|
|
|
<table class="table table-bordered table">
|
|
|
|
<tr>
|
|
|
|
<td colspan="3" class="text-decoration-none">
|
|
|
|
Enable payment methods only when amount is..
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
@for (var index = 0; index < Model.PaymentMethodCriteria.Count; index++)
|
|
|
|
{
|
|
|
|
var criteria = Model.PaymentMethodCriteria[index];
|
2020-11-09 01:11:03 -06:00
|
|
|
<tr>
|
2020-09-15 11:09:09 +02:00
|
|
|
<td class="border-right-0 border-left-0 pt-3">
|
2021-04-08 15:32:42 +02:00
|
|
|
<input type="hidden" asp-for="PaymentMethodCriteria[index].PaymentMethod"/>
|
2020-09-15 11:09:09 +02:00
|
|
|
@PaymentMethodId.Parse(criteria.PaymentMethod).ToPrettyString()
|
|
|
|
</td>
|
|
|
|
<td class="border-right-0 border-left-0 ">
|
|
|
|
<select asp-for="PaymentMethodCriteria[index].Type"
|
|
|
|
class="form-control"
|
|
|
|
asp-items="@((PaymentMethodCriteriaViewModel.CriteriaType[]) Enum.GetValues(typeof(PaymentMethodCriteriaViewModel.CriteriaType))).Select(s => new SelectListItem(PaymentMethodCriteriaViewModel.ToString(s), s.ToString()))">
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
<td class="border-right-0 border-left-0">
|
2021-04-08 15:32:42 +02:00
|
|
|
<input placeholder="6.15 USD" asp-for="PaymentMethodCriteria[index].Value" class="form-control my-0" style="max-width: 20ch;"/>
|
2020-09-15 11:09:09 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
</table>
|
|
|
|
}
|
|
|
|
|
2020-11-09 01:11:03 -06:00
|
|
|
<div class="form-group">
|
2019-10-13 20:07:41 -07:00
|
|
|
<div class="form-check">
|
2021-04-08 15:32:42 +02:00
|
|
|
<input asp-for="RequiresRefundEmail" type="checkbox" class="form-check-input"/>
|
2019-10-13 20:07:41 -07:00
|
|
|
<label asp-for="RequiresRefundEmail" class="form-check-label"></label>
|
|
|
|
</div>
|
2018-04-26 11:13:44 +09:00
|
|
|
</div>
|
2018-04-03 17:39:28 +09:00
|
|
|
<div class="form-group">
|
2019-10-13 20:07:41 -07:00
|
|
|
<div class="form-check">
|
2021-04-08 15:32:42 +02:00
|
|
|
<input asp-for="LightningAmountInSatoshi" type="checkbox" class="form-check-input"/>
|
2019-10-13 20:07:41 -07:00
|
|
|
<label asp-for="LightningAmountInSatoshi" class="form-check-label"></label>
|
|
|
|
</div>
|
2020-07-22 15:30:58 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2020-05-19 16:26:03 -05:00
|
|
|
<div class="form-check">
|
2021-04-08 15:32:42 +02:00
|
|
|
<input asp-for="LightningPrivateRouteHints" type="checkbox" class="form-check-input"/>
|
2020-05-19 16:26:03 -05:00
|
|
|
<label asp-for="LightningPrivateRouteHints" class="form-check-label"></label>
|
|
|
|
</div>
|
2020-07-22 15:30:58 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-10-13 20:07:41 -07:00
|
|
|
<div class="form-check">
|
2021-04-08 15:32:42 +02:00
|
|
|
<input asp-for="OnChainWithLnInvoiceFallback" type="checkbox" class="form-check-input"/>
|
2020-11-09 01:11:03 -06:00
|
|
|
<label asp-for="OnChainWithLnInvoiceFallback" class="form-check-label"></label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-04-07 06:08:42 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-check">
|
|
|
|
<input asp-for="LazyPaymentMethods" type="checkbox" class="form-check-input" />
|
|
|
|
<label asp-for="LazyPaymentMethods" class="form-check-label"></label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-09 01:11:03 -06:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-check">
|
|
|
|
<input asp-for="RedirectAutomatically" type="checkbox" class="form-check-input" />
|
2019-10-07 21:06:12 -07:00
|
|
|
<label asp-for="RedirectAutomatically" class="form-check-label"></label>
|
2019-10-13 20:07:41 -07:00
|
|
|
</div>
|
2020-07-22 15:30:58 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-10-07 21:06:12 -07:00
|
|
|
<div class="form-check">
|
2021-04-08 15:32:42 +02:00
|
|
|
<input asp-for="ShowRecommendedFee" type="checkbox" class="form-check-input"/>
|
2019-10-07 21:06:12 -07:00
|
|
|
<label asp-for="ShowRecommendedFee" class="form-check-label"></label>
|
|
|
|
<p class="form-text text-muted">Fee will be shown for BTC and LTC onchain payments only.</p>
|
|
|
|
</div>
|
2019-04-11 11:53:31 +02:00
|
|
|
</div>
|
2019-11-06 16:21:33 -08:00
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="RecommendedFeeBlockTarget"></label>
|
2021-04-08 15:32:42 +02:00
|
|
|
<input asp-for="RecommendedFeeBlockTarget" class="form-control" style="width:8ch"/>
|
2019-11-06 16:21:33 -08:00
|
|
|
<span asp-validation-for="RecommendedFeeBlockTarget" class="text-danger"></span>
|
|
|
|
</div>
|
2020-07-22 15:30:58 +02:00
|
|
|
|
|
|
|
<h4 class="mt-5 mb-3">Appearance</h4>
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="DefaultLang"></label>
|
|
|
|
<select asp-for="DefaultLang" asp-items="Model.Languages" class="form-control w-auto"></select>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="HtmlTitle"></label>
|
2021-04-08 15:32:42 +02:00
|
|
|
<input asp-for="HtmlTitle" class="form-control"/>
|
2020-07-22 15:30:58 +02:00
|
|
|
<span asp-validation-for="HtmlTitle" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="CustomLogo"></label>
|
2021-04-08 15:32:42 +02:00
|
|
|
<a href="https://docs.btcpayserver.org/Theme/#checkout-page-themes" target="_blank">
|
|
|
|
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>
|
|
|
|
</a>
|
|
|
|
<input asp-for="CustomLogo" class="form-control"/>
|
2020-07-22 15:30:58 +02:00
|
|
|
<span asp-validation-for="CustomLogo" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="CustomCSS"></label>
|
2021-04-08 15:32:42 +02:00
|
|
|
<a href="https://docs.btcpayserver.org/Theme/#checkout-page-themes" target="_blank">
|
|
|
|
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>
|
|
|
|
</a>
|
|
|
|
<input asp-for="CustomCSS" class="form-control"/>
|
2020-07-22 15:30:58 +02:00
|
|
|
<span asp-validation-for="CustomCSS" class="text-danger"></span>
|
|
|
|
<p class="form-text text-muted">
|
|
|
|
Bundled Themes:
|
|
|
|
<a href="#" onclick="return setTheme(1);">Legacy</a>
|
|
|
|
| <a href="#" onclick="return setTheme(2);">Dark</a>
|
|
|
|
@* | <a href="#" onclick="return setTheme(0);">Default</a>*@
|
|
|
|
</p>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function setTheme(themeChoice) {
|
|
|
|
if (themeChoice === 1) { // reserving 0 for potential clear down the road
|
|
|
|
$('#CustomCSS').val('/checkout/css/themes/legacy.css');
|
|
|
|
} else if (themeChoice == 2) {
|
|
|
|
$('#CustomCSS').val('/checkout/css/themes/dark.css');
|
|
|
|
} else {
|
|
|
|
$('#CustomCSS').val('');
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</div>
|
2018-04-08 00:08:15 -05:00
|
|
|
<button name="command" type="submit" class="btn btn-primary" value="Save">Save</button>
|
2018-03-27 14:48:32 +09:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@section Scripts {
|
2021-04-08 15:32:42 +02:00
|
|
|
<partial name="_ValidationScriptsPartial" />
|
2018-03-27 14:48:32 +09:00
|
|
|
}
|