mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
@@ -34,7 +34,6 @@ namespace BTCPayServer.Controllers
|
|||||||
var settings = app.GetSettings<CrowdfundSettings>();
|
var settings = app.GetSettings<CrowdfundSettings>();
|
||||||
var vm = new UpdateCrowdfundViewModel()
|
var vm = new UpdateCrowdfundViewModel()
|
||||||
{
|
{
|
||||||
NotificationEmailWarning = !await IsEmailConfigured(app.StoreDataId),
|
|
||||||
Title = settings.Title,
|
Title = settings.Title,
|
||||||
StoreId = app.StoreDataId,
|
StoreId = app.StoreDataId,
|
||||||
Enabled = settings.Enabled,
|
Enabled = settings.Enabled,
|
||||||
@@ -139,7 +138,6 @@ namespace BTCPayServer.Controllers
|
|||||||
MainImageUrl = vm.MainImageUrl,
|
MainImageUrl = vm.MainImageUrl,
|
||||||
EmbeddedCSS = vm.EmbeddedCSS,
|
EmbeddedCSS = vm.EmbeddedCSS,
|
||||||
NotificationUrl = vm.NotificationUrl,
|
NotificationUrl = vm.NotificationUrl,
|
||||||
NotificationEmail = vm.NotificationEmail,
|
|
||||||
Tagline = vm.Tagline,
|
Tagline = vm.Tagline,
|
||||||
PerksTemplate = vm.PerksTemplate,
|
PerksTemplate = vm.PerksTemplate,
|
||||||
DisqusEnabled = vm.DisqusEnabled,
|
DisqusEnabled = vm.DisqusEnabled,
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ namespace BTCPayServer.Controllers
|
|||||||
public string EmbeddedCSS { get; set; }
|
public string EmbeddedCSS { get; set; }
|
||||||
|
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public string NotificationEmail { get; set; }
|
|
||||||
public string NotificationUrl { get; set; }
|
public string NotificationUrl { get; set; }
|
||||||
public bool? RedirectAutomatically { get; set; }
|
public bool? RedirectAutomatically { get; set; }
|
||||||
}
|
}
|
||||||
@@ -99,7 +98,6 @@ namespace BTCPayServer.Controllers
|
|||||||
|
|
||||||
var vm = new UpdatePointOfSaleViewModel()
|
var vm = new UpdatePointOfSaleViewModel()
|
||||||
{
|
{
|
||||||
NotificationEmailWarning = !await IsEmailConfigured(app.StoreDataId),
|
|
||||||
Id = appId,
|
Id = appId,
|
||||||
StoreId = app.StoreDataId,
|
StoreId = app.StoreDataId,
|
||||||
Title = settings.Title,
|
Title = settings.Title,
|
||||||
@@ -116,7 +114,6 @@ namespace BTCPayServer.Controllers
|
|||||||
CustomCSSLink = settings.CustomCSSLink,
|
CustomCSSLink = settings.CustomCSSLink,
|
||||||
EmbeddedCSS = settings.EmbeddedCSS,
|
EmbeddedCSS = settings.EmbeddedCSS,
|
||||||
Description = settings.Description,
|
Description = settings.Description,
|
||||||
NotificationEmail = settings.NotificationEmail,
|
|
||||||
NotificationUrl = settings.NotificationUrl,
|
NotificationUrl = settings.NotificationUrl,
|
||||||
SearchTerm = $"storeid:{app.StoreDataId}",
|
SearchTerm = $"storeid:{app.StoreDataId}",
|
||||||
RedirectAutomatically = settings.RedirectAutomatically.HasValue ? settings.RedirectAutomatically.Value ? "true" : "false" : ""
|
RedirectAutomatically = settings.RedirectAutomatically.HasValue ? settings.RedirectAutomatically.Value ? "true" : "false" : ""
|
||||||
@@ -194,7 +191,6 @@ namespace BTCPayServer.Controllers
|
|||||||
CustomTipPercentages = ListSplit(vm.CustomTipPercentages),
|
CustomTipPercentages = ListSplit(vm.CustomTipPercentages),
|
||||||
CustomCSSLink = vm.CustomCSSLink,
|
CustomCSSLink = vm.CustomCSSLink,
|
||||||
NotificationUrl = vm.NotificationUrl,
|
NotificationUrl = vm.NotificationUrl,
|
||||||
NotificationEmail = vm.NotificationEmail,
|
|
||||||
Description = vm.Description,
|
Description = vm.Description,
|
||||||
EmbeddedCSS = vm.EmbeddedCSS,
|
EmbeddedCSS = vm.EmbeddedCSS,
|
||||||
RedirectAutomatically = string.IsNullOrEmpty(vm.RedirectAutomatically) ? (bool?)null : bool.Parse(vm.RedirectAutomatically)
|
RedirectAutomatically = string.IsNullOrEmpty(vm.RedirectAutomatically) ? (bool?)null : bool.Parse(vm.RedirectAutomatically)
|
||||||
|
|||||||
@@ -177,7 +177,6 @@ namespace BTCPayServer.Controllers
|
|||||||
OrderId = orderId,
|
OrderId = orderId,
|
||||||
NotificationURL =
|
NotificationURL =
|
||||||
string.IsNullOrEmpty(notificationUrl) ? settings.NotificationUrl : notificationUrl,
|
string.IsNullOrEmpty(notificationUrl) ? settings.NotificationUrl : notificationUrl,
|
||||||
NotificationEmail = settings.NotificationEmail,
|
|
||||||
RedirectURL = redirectUrl ?? Request.GetDisplayUrl(),
|
RedirectURL = redirectUrl ?? Request.GetDisplayUrl(),
|
||||||
FullNotifications = true,
|
FullNotifications = true,
|
||||||
ExtendedNotifications = true,
|
ExtendedNotifications = true,
|
||||||
@@ -306,7 +305,6 @@ namespace BTCPayServer.Controllers
|
|||||||
BuyerEmail = request.Email,
|
BuyerEmail = request.Email,
|
||||||
Price = price,
|
Price = price,
|
||||||
NotificationURL = settings.NotificationUrl,
|
NotificationURL = settings.NotificationUrl,
|
||||||
NotificationEmail = settings.NotificationEmail,
|
|
||||||
FullNotifications = true,
|
FullNotifications = true,
|
||||||
ExtendedNotifications = true,
|
ExtendedNotifications = true,
|
||||||
RedirectURL = request.RedirectUrl ??
|
RedirectURL = request.RedirectUrl ??
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ namespace BTCPayServer.Controllers
|
|||||||
BuyerInformation = invoice.BuyerInformation,
|
BuyerInformation = invoice.BuyerInformation,
|
||||||
Fiat = _CurrencyNameTable.DisplayFormatCurrency(prodInfo.Price, prodInfo.Currency),
|
Fiat = _CurrencyNameTable.DisplayFormatCurrency(prodInfo.Price, prodInfo.Currency),
|
||||||
TaxIncluded = _CurrencyNameTable.DisplayFormatCurrency(prodInfo.TaxIncluded, prodInfo.Currency),
|
TaxIncluded = _CurrencyNameTable.DisplayFormatCurrency(prodInfo.TaxIncluded, prodInfo.Currency),
|
||||||
NotificationEmail = invoice.NotificationEmail,
|
|
||||||
NotificationUrl = invoice.NotificationURL?.AbsoluteUri,
|
NotificationUrl = invoice.NotificationURL?.AbsoluteUri,
|
||||||
RedirectUrl = invoice.RedirectURL?.AbsoluteUri,
|
RedirectUrl = invoice.RedirectURL?.AbsoluteUri,
|
||||||
ProductInformation = invoice.ProductInformation,
|
ProductInformation = invoice.ProductInformation,
|
||||||
@@ -538,7 +537,6 @@ namespace BTCPayServer.Controllers
|
|||||||
PosData = model.PosData,
|
PosData = model.PosData,
|
||||||
OrderId = model.OrderId,
|
OrderId = model.OrderId,
|
||||||
//RedirectURL = redirect + "redirect",
|
//RedirectURL = redirect + "redirect",
|
||||||
NotificationEmail = model.NotificationEmail,
|
|
||||||
NotificationURL = model.NotificationUrl,
|
NotificationURL = model.NotificationUrl,
|
||||||
ItemDesc = model.ItemDesc,
|
ItemDesc = model.ItemDesc,
|
||||||
FullNotifications = true,
|
FullNotifications = true,
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ namespace BTCPayServer.HostedServices
|
|||||||
emailBody);
|
emailBody);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (invoice.NotificationURL != null)
|
if (invoice.NotificationURL != null)
|
||||||
{
|
{
|
||||||
var invoiceStr = NBitcoin.JsonConverters.Serializer.ToString(new ScheduledJob() { TryCount = 0, Notification = notification });
|
var invoiceStr = NBitcoin.JsonConverters.Serializer.ToString(new ScheduledJob() { TryCount = 0, Notification = notification });
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ namespace BTCPayServer.Models.AppViewModels
|
|||||||
[Display(Name = "Callback Notification Url")]
|
[Display(Name = "Callback Notification Url")]
|
||||||
[Uri]
|
[Uri]
|
||||||
public string NotificationUrl { get; set; }
|
public string NotificationUrl { get; set; }
|
||||||
[Display(Name = "Invoice IPN Notification")]
|
|
||||||
[EmailAddress]
|
|
||||||
public string NotificationEmail { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Display(Name = "Allow crowdfund to be publicly visible (still visible to you)")]
|
[Display(Name = "Allow crowdfund to be publicly visible (still visible to you)")]
|
||||||
@@ -99,8 +96,6 @@ namespace BTCPayServer.Models.AppViewModels
|
|||||||
[Display(Name = "Colors to rotate between with animation when a payment is made. First color is the default background. One color per line. Can be any valid css color value.")]
|
[Display(Name = "Colors to rotate between with animation when a payment is made. First color is the default background. One color per line. Can be any valid css color value.")]
|
||||||
public string AnimationColors { get; set; }
|
public string AnimationColors { get; set; }
|
||||||
|
|
||||||
public bool NotificationEmailWarning { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
// NOTE: Improve validation if needed
|
// NOTE: Improve validation if needed
|
||||||
public bool ModelWithMinimumData
|
public bool ModelWithMinimumData
|
||||||
|
|||||||
@@ -32,9 +32,6 @@ namespace BTCPayServer.Models.AppViewModels
|
|||||||
[Display(Name = "Callback Notification Url")]
|
[Display(Name = "Callback Notification Url")]
|
||||||
[Uri]
|
[Uri]
|
||||||
public string NotificationUrl { get; set; }
|
public string NotificationUrl { get; set; }
|
||||||
[Display(Name = "Invoice IPN Notification")]
|
|
||||||
[EmailAddress]
|
|
||||||
public string NotificationEmail { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[MaxLength(30)]
|
[MaxLength(30)]
|
||||||
@@ -84,7 +81,6 @@ namespace BTCPayServer.Models.AppViewModels
|
|||||||
}
|
}
|
||||||
}, nameof(SelectListItem.Value), nameof(SelectListItem.Text), RedirectAutomatically);
|
}, nameof(SelectListItem.Value), nameof(SelectListItem.Text), RedirectAutomatically);
|
||||||
|
|
||||||
public bool NotificationEmailWarning { get; set; }
|
|
||||||
public string EmbeddedCSS { get; set; }
|
public string EmbeddedCSS { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,13 +60,6 @@ namespace BTCPayServer.Models.InvoicingModels
|
|||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
|
||||||
[EmailAddress]
|
|
||||||
[DisplayName("Notification Email")]
|
|
||||||
public string NotificationEmail
|
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Uri]
|
[Uri]
|
||||||
[DisplayName("Notification Url")]
|
[DisplayName("Notification Url")]
|
||||||
public string NotificationUrl
|
public string NotificationUrl
|
||||||
|
|||||||
@@ -82,8 +82,6 @@ namespace BTCPayServer.Services.Apps
|
|||||||
"//github.com/ClaudiuHKS/AdvancedQuakeSounds/raw/master/sound/QuakeSounds/unstoppable.wav",
|
"//github.com/ClaudiuHKS/AdvancedQuakeSounds/raw/master/sound/QuakeSounds/unstoppable.wav",
|
||||||
"//github.com/ClaudiuHKS/AdvancedQuakeSounds/raw/master/sound/QuakeSounds/whickedsick.wav"
|
"//github.com/ClaudiuHKS/AdvancedQuakeSounds/raw/master/sound/QuakeSounds/whickedsick.wav"
|
||||||
};
|
};
|
||||||
|
|
||||||
public string NotificationEmail { get; set; }
|
|
||||||
}
|
}
|
||||||
public enum CrowdfundResetEvery
|
public enum CrowdfundResetEvery
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -143,15 +143,6 @@
|
|||||||
<input asp-for="NotificationUrl" class="form-control" />
|
<input asp-for="NotificationUrl" class="form-control" />
|
||||||
<span asp-validation-for="NotificationUrl" class="text-danger"></span>
|
<span asp-validation-for="NotificationUrl" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="NotificationEmail" class="control-label"></label>
|
|
||||||
@if (Model.NotificationEmailWarning)
|
|
||||||
{
|
|
||||||
<partial name="NotificationEmailWarning" model="@Model.StoreId" />
|
|
||||||
}
|
|
||||||
<input type="email" asp-for="NotificationEmail" class="form-control" />
|
|
||||||
<span asp-validation-for="NotificationEmail" class="text-danger"></span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input asp-for="Enabled" type="checkbox" class="form-check-input" />
|
<input asp-for="Enabled" type="checkbox" class="form-check-input" />
|
||||||
@@ -213,7 +204,6 @@
|
|||||||
<input asp-for="DisqusShortname" class="form-control" />
|
<input asp-for="DisqusShortname" class="form-control" />
|
||||||
<span asp-validation-for="DisqusShortname" class="text-danger"></span>
|
<span asp-validation-for="DisqusShortname" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" asp-for="NotificationEmailWarning" />
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button type="submit" class="btn btn-primary" id="SaveSettings">Save Settings</button>
|
<button type="submit" class="btn btn-primary" id="SaveSettings">Save Settings</button>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
|||||||
@@ -119,15 +119,6 @@
|
|||||||
<input asp-for="NotificationUrl" class="form-control" />
|
<input asp-for="NotificationUrl" class="form-control" />
|
||||||
<span asp-validation-for="NotificationUrl" class="text-danger"></span>
|
<span asp-validation-for="NotificationUrl" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="NotificationEmail" class="control-label"></label>
|
|
||||||
@if (Model.NotificationEmailWarning)
|
|
||||||
{
|
|
||||||
<partial name="NotificationEmailWarning" model="@Model.StoreId" />
|
|
||||||
}
|
|
||||||
<input type="email" asp-for="NotificationEmail" class="form-control" />
|
|
||||||
<span asp-validation-for="NotificationEmail" class="text-danger"></span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="RedirectAutomatically" class="control-label"></label>*
|
<label asp-for="RedirectAutomatically" class="control-label"></label>*
|
||||||
<select asp-for="RedirectAutomatically" asp-items="Model.RedirectAutomaticallySelectList" class="form-control"></select>
|
<select asp-for="RedirectAutomatically" asp-items="Model.RedirectAutomaticallySelectList" class="form-control"></select>
|
||||||
@@ -143,7 +134,6 @@
|
|||||||
<textarea asp-for="EmbeddedCSS" rows="10" cols="40" class="form-control"></textarea>
|
<textarea asp-for="EmbeddedCSS" rows="10" cols="40" class="form-control"></textarea>
|
||||||
<span asp-validation-for="EmbeddedCSS" class="text-danger"></span>
|
<span asp-validation-for="EmbeddedCSS" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" asp-for="NotificationEmailWarning" />
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button type="submit" class="btn btn-primary" id="SaveSettings">Save Settings</button>
|
<button type="submit" class="btn btn-primary" id="SaveSettings">Save Settings</button>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
|||||||
@@ -52,11 +52,6 @@
|
|||||||
<input asp-for="BuyerEmail" class="form-control" />
|
<input asp-for="BuyerEmail" class="form-control" />
|
||||||
<span asp-validation-for="BuyerEmail" class="text-danger"></span>
|
<span asp-validation-for="BuyerEmail" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="NotificationEmail" class="control-label"></label>
|
|
||||||
<input asp-for="NotificationEmail" class="form-control" />
|
|
||||||
<span asp-validation-for="NotificationEmail" class="text-danger"></span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="NotificationUrl" class="control-label"></label>
|
<label asp-for="NotificationUrl" class="control-label"></label>
|
||||||
<input asp-for="NotificationUrl" class="form-control" />
|
<input asp-for="NotificationUrl" class="form-control" />
|
||||||
|
|||||||
@@ -77,10 +77,6 @@
|
|||||||
<th>Total fiat due</th>
|
<th>Total fiat due</th>
|
||||||
<td>@Model.Fiat</td>
|
<td>@Model.Fiat</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<th>Notification Email</th>
|
|
||||||
<td>@Model.NotificationEmail</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Notification Url</th>
|
<th>Notification Url</th>
|
||||||
<td>@Model.NotificationUrl</td>
|
<td>@Model.NotificationUrl</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user