fix: remove ipn via email #1241 (#1337)

* fix: remove ipn via email #1241

* fix: remove ipn via email #1241
This commit is contained in:
hannes 2020-02-24 20:21:03 +08:00 committed by GitHub
parent a354f7d9dd
commit f097ecdc80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 1 additions and 57 deletions

View File

@ -34,7 +34,6 @@ namespace BTCPayServer.Controllers
var settings = app.GetSettings<CrowdfundSettings>();
var vm = new UpdateCrowdfundViewModel()
{
NotificationEmailWarning = !await IsEmailConfigured(app.StoreDataId),
Title = settings.Title,
StoreId = app.StoreDataId,
Enabled = settings.Enabled,
@ -139,7 +138,6 @@ namespace BTCPayServer.Controllers
MainImageUrl = vm.MainImageUrl,
EmbeddedCSS = vm.EmbeddedCSS,
NotificationUrl = vm.NotificationUrl,
NotificationEmail = vm.NotificationEmail,
Tagline = vm.Tagline,
PerksTemplate = vm.PerksTemplate,
DisqusEnabled = vm.DisqusEnabled,

View File

@ -83,7 +83,6 @@ namespace BTCPayServer.Controllers
public string EmbeddedCSS { get; set; }
public string Description { get; set; }
public string NotificationEmail { get; set; }
public string NotificationUrl { get; set; }
public bool? RedirectAutomatically { get; set; }
}
@ -99,7 +98,6 @@ namespace BTCPayServer.Controllers
var vm = new UpdatePointOfSaleViewModel()
{
NotificationEmailWarning = !await IsEmailConfigured(app.StoreDataId),
Id = appId,
StoreId = app.StoreDataId,
Title = settings.Title,
@ -116,7 +114,6 @@ namespace BTCPayServer.Controllers
CustomCSSLink = settings.CustomCSSLink,
EmbeddedCSS = settings.EmbeddedCSS,
Description = settings.Description,
NotificationEmail = settings.NotificationEmail,
NotificationUrl = settings.NotificationUrl,
SearchTerm = $"storeid:{app.StoreDataId}",
RedirectAutomatically = settings.RedirectAutomatically.HasValue ? settings.RedirectAutomatically.Value ? "true" : "false" : ""
@ -194,7 +191,6 @@ namespace BTCPayServer.Controllers
CustomTipPercentages = ListSplit(vm.CustomTipPercentages),
CustomCSSLink = vm.CustomCSSLink,
NotificationUrl = vm.NotificationUrl,
NotificationEmail = vm.NotificationEmail,
Description = vm.Description,
EmbeddedCSS = vm.EmbeddedCSS,
RedirectAutomatically = string.IsNullOrEmpty(vm.RedirectAutomatically) ? (bool?)null : bool.Parse(vm.RedirectAutomatically)

View File

@ -177,7 +177,6 @@ namespace BTCPayServer.Controllers
OrderId = orderId,
NotificationURL =
string.IsNullOrEmpty(notificationUrl) ? settings.NotificationUrl : notificationUrl,
NotificationEmail = settings.NotificationEmail,
RedirectURL = redirectUrl ?? Request.GetDisplayUrl(),
FullNotifications = true,
ExtendedNotifications = true,
@ -306,7 +305,6 @@ namespace BTCPayServer.Controllers
BuyerEmail = request.Email,
Price = price,
NotificationURL = settings.NotificationUrl,
NotificationEmail = settings.NotificationEmail,
FullNotifications = true,
ExtendedNotifications = true,
RedirectURL = request.RedirectUrl ??

View File

@ -65,7 +65,6 @@ namespace BTCPayServer.Controllers
BuyerInformation = invoice.BuyerInformation,
Fiat = _CurrencyNameTable.DisplayFormatCurrency(prodInfo.Price, prodInfo.Currency),
TaxIncluded = _CurrencyNameTable.DisplayFormatCurrency(prodInfo.TaxIncluded, prodInfo.Currency),
NotificationEmail = invoice.NotificationEmail,
NotificationUrl = invoice.NotificationURL?.AbsoluteUri,
RedirectUrl = invoice.RedirectURL?.AbsoluteUri,
ProductInformation = invoice.ProductInformation,
@ -538,7 +537,6 @@ namespace BTCPayServer.Controllers
PosData = model.PosData,
OrderId = model.OrderId,
//RedirectURL = redirect + "redirect",
NotificationEmail = model.NotificationEmail,
NotificationURL = model.NotificationUrl,
ItemDesc = model.ItemDesc,
FullNotifications = true,

View File

@ -128,6 +128,7 @@ namespace BTCPayServer.HostedServices
emailBody);
}
if (invoice.NotificationURL != null)
{
var invoiceStr = NBitcoin.JsonConverters.Serializer.ToString(new ScheduledJob() { TryCount = 0, Notification = notification });

View File

@ -26,9 +26,6 @@ namespace BTCPayServer.Models.AppViewModels
[Display(Name = "Callback Notification Url")]
[Uri]
public string NotificationUrl { get; set; }
[Display(Name = "Invoice IPN Notification")]
[EmailAddress]
public string NotificationEmail { get; set; }
[Required]
[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.")]
public string AnimationColors { get; set; }
public bool NotificationEmailWarning { get; set; }
// NOTE: Improve validation if needed
public bool ModelWithMinimumData

View File

@ -32,9 +32,6 @@ namespace BTCPayServer.Models.AppViewModels
[Display(Name = "Callback Notification Url")]
[Uri]
public string NotificationUrl { get; set; }
[Display(Name = "Invoice IPN Notification")]
[EmailAddress]
public string NotificationEmail { get; set; }
[Required]
[MaxLength(30)]
@ -84,7 +81,6 @@ namespace BTCPayServer.Models.AppViewModels
}
}, nameof(SelectListItem.Value), nameof(SelectListItem.Text), RedirectAutomatically);
public bool NotificationEmailWarning { get; set; }
public string EmbeddedCSS { get; set; }
public string Description { get; set; }
}

View File

@ -60,13 +60,6 @@ namespace BTCPayServer.Models.InvoicingModels
get; set;
}
[EmailAddress]
[DisplayName("Notification Email")]
public string NotificationEmail
{
get; set;
}
[Uri]
[DisplayName("Notification Url")]
public string NotificationUrl

View File

@ -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/whickedsick.wav"
};
public string NotificationEmail { get; set; }
}
public enum CrowdfundResetEvery
{

View File

@ -143,15 +143,6 @@
<input asp-for="NotificationUrl" class="form-control" />
<span asp-validation-for="NotificationUrl" class="text-danger"></span>
</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-check">
<input asp-for="Enabled" type="checkbox" class="form-check-input" />
@ -213,7 +204,6 @@
<input asp-for="DisqusShortname" class="form-control" />
<span asp-validation-for="DisqusShortname" class="text-danger"></span>
</div>
<input type="hidden" asp-for="NotificationEmailWarning" />
<div class="form-group">
<button type="submit" class="btn btn-primary" id="SaveSettings">Save Settings</button>
<div class="btn-group">

View File

@ -119,15 +119,6 @@
<input asp-for="NotificationUrl" class="form-control" />
<span asp-validation-for="NotificationUrl" class="text-danger"></span>
</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">
<label asp-for="RedirectAutomatically" class="control-label"></label>*
<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>
<span asp-validation-for="EmbeddedCSS" class="text-danger"></span>
</div>
<input type="hidden" asp-for="NotificationEmailWarning" />
<div class="form-group">
<button type="submit" class="btn btn-primary" id="SaveSettings">Save Settings</button>
<div class="btn-group">

View File

@ -52,11 +52,6 @@
<input asp-for="BuyerEmail" class="form-control" />
<span asp-validation-for="BuyerEmail" class="text-danger"></span>
</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">
<label asp-for="NotificationUrl" class="control-label"></label>
<input asp-for="NotificationUrl" class="form-control" />

View File

@ -77,10 +77,6 @@
<th>Total fiat due</th>
<td>@Model.Fiat</td>
</tr>
<tr>
<th>Notification Email</th>
<td>@Model.NotificationEmail</td>
</tr>
<tr>
<th>Notification Url</th>
<td>@Model.NotificationUrl</td>