diff --git a/BTCPayServer.Tests/Checkoutv2Tests.cs b/BTCPayServer.Tests/Checkoutv2Tests.cs index fb0e8aee5..181e66a36 100644 --- a/BTCPayServer.Tests/Checkoutv2Tests.cs +++ b/BTCPayServer.Tests/Checkoutv2Tests.cs @@ -39,7 +39,6 @@ namespace BTCPayServer.Tests var supportUrl = "https://support.satoshisteaks.com/{InvoiceId}/"; s.GoToStore(); s.Driver.FindElement(By.Id("StoreWebsite")).SendKeys(storeUrl); - s.Driver.FindElement(By.Id("StoreSupportUrl")).SendKeys(supportUrl); s.Driver.FindElement(By.Id("Save")).Click(); Assert.Contains("Store successfully updated", s.FindAlertMessage().Text); @@ -47,6 +46,7 @@ namespace BTCPayServer.Tests s.Driver.WaitForAndClick(By.Id("Presets")); s.Driver.WaitForAndClick(By.Id("Presets_InStore")); Assert.True(s.Driver.SetCheckbox(By.Id("ShowPayInWalletButton"), true)); + s.Driver.FindElement(By.Id("SupportUrl")).SendKeys(supportUrl); s.Driver.FindElement(By.Id("Save")).SendKeys(Keys.Enter); Assert.Contains("Store successfully updated", s.FindAlertMessage().Text); diff --git a/BTCPayServer/Controllers/UIStoresController.cs b/BTCPayServer/Controllers/UIStoresController.cs index 26a8bda39..c499d1fd1 100644 --- a/BTCPayServer/Controllers/UIStoresController.cs +++ b/BTCPayServer/Controllers/UIStoresController.cs @@ -438,6 +438,7 @@ namespace BTCPayServer.Controllers vm.CustomLogo = storeBlob.CustomLogo; vm.SoundFileId = storeBlob.SoundFileId; vm.HtmlTitle = storeBlob.HtmlTitle; + vm.SupportUrl = storeBlob.StoreSupportUrl; vm.DisplayExpirationTimer = (int)storeBlob.DisplayExpirationTimer.TotalMinutes; vm.ReceiptOptions = CheckoutAppearanceViewModel.ReceiptOptionsViewModel.Create(storeBlob.ReceiptOptions); vm.AutoDetectLanguage = storeBlob.AutoDetectLanguage; @@ -613,6 +614,7 @@ namespace BTCPayServer.Controllers blob.CustomLogo = model.CustomLogo; blob.CustomCSS = model.CustomCSS; blob.HtmlTitle = string.IsNullOrWhiteSpace(model.HtmlTitle) ? null : model.HtmlTitle; + blob.StoreSupportUrl = string.IsNullOrWhiteSpace(model.SupportUrl) ? null : model.SupportUrl; blob.DisplayExpirationTimer = TimeSpan.FromMinutes(model.DisplayExpirationTimer); blob.AutoDetectLanguage = model.AutoDetectLanguage; blob.DefaultLang = model.DefaultLang; @@ -704,7 +706,6 @@ namespace BTCPayServer.Controllers Id = store.Id, StoreName = store.StoreName, StoreWebsite = store.StoreWebsite, - StoreSupportUrl = storeBlob.StoreSupportUrl, LogoFileId = storeBlob.LogoFileId, CssFileId = storeBlob.CssFileId, BrandColor = storeBlob.BrandColor, @@ -741,7 +742,6 @@ namespace BTCPayServer.Controllers } var blob = CurrentStore.GetStoreBlob(); - blob.StoreSupportUrl = model.StoreSupportUrl; blob.AnyoneCanInvoice = model.AnyoneCanCreateInvoice; blob.NetworkFeeMode = model.NetworkFeeMode; blob.PaymentTolerance = model.PaymentTolerance; diff --git a/BTCPayServer/Models/StoreViewModels/CheckoutAppearanceViewModel.cs b/BTCPayServer/Models/StoreViewModels/CheckoutAppearanceViewModel.cs index a59fcbbf5..3a5a675b7 100644 --- a/BTCPayServer/Models/StoreViewModels/CheckoutAppearanceViewModel.cs +++ b/BTCPayServer/Models/StoreViewModels/CheckoutAppearanceViewModel.cs @@ -76,6 +76,10 @@ namespace BTCPayServer.Models.StoreViewModels [Display(Name = "Custom HTML title to display on Checkout page")] public string HtmlTitle { get; set; } + [Display(Name = "Support URL")] + [MaxLength(500)] + public string SupportUrl { get; set; } + [Display(Name = "Show a timer … minutes before invoice expiration")] [Range(1, 60 * 24 * 24)] public int DisplayExpirationTimer { get; set; } diff --git a/BTCPayServer/Models/StoreViewModels/GeneralSettingsViewModel.cs b/BTCPayServer/Models/StoreViewModels/GeneralSettingsViewModel.cs index f47387428..90a68c430 100644 --- a/BTCPayServer/Models/StoreViewModels/GeneralSettingsViewModel.cs +++ b/BTCPayServer/Models/StoreViewModels/GeneralSettingsViewModel.cs @@ -22,10 +22,6 @@ namespace BTCPayServer.Models.StoreViewModels [MaxLength(500)] public string StoreWebsite { get; set; } - [Display(Name = "Support URL")] - [MaxLength(500)] - public string StoreSupportUrl { get; set; } - [Display(Name = "Brand Color")] public string BrandColor { get; set; } diff --git a/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml b/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml index 9ffda42f6..c85a93d05 100644 --- a/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml +++ b/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml @@ -238,6 +238,17 @@ +
{OrderId}
and {InvoiceId}
.
+ Can be any valid URI, such as a website, email, and Nostr.
+ {OrderId}
and {InvoiceId}
. Can be any valid URI, such as a website, email, and nostr.
-