Custom redirect_url for PoS (#1924)

This commit is contained in:
Mario Dian
2020-10-13 15:51:28 +08:00
committed by GitHub
parent 9dcd8b6edf
commit ad22d3fd91
4 changed files with 14 additions and 1 deletions

View File

@@ -82,6 +82,7 @@ namespace BTCPayServer.Controllers
public string Description { get; set; }
public string NotificationUrl { get; set; }
public string RedirectUrl { get; set; }
public bool? RedirectAutomatically { get; set; }
}
@@ -115,6 +116,7 @@ namespace BTCPayServer.Controllers
EmbeddedCSS = settings.EmbeddedCSS,
Description = settings.Description,
NotificationUrl = settings.NotificationUrl,
RedirectUrl = settings.RedirectUrl,
SearchTerm = $"storeid:{app.StoreDataId}",
RedirectAutomatically = settings.RedirectAutomatically.HasValue ? settings.RedirectAutomatically.Value ? "true" : "false" : ""
};
@@ -191,6 +193,7 @@ namespace BTCPayServer.Controllers
CustomTipPercentages = ListSplit(vm.CustomTipPercentages),
CustomCSSLink = vm.CustomCSSLink,
NotificationUrl = vm.NotificationUrl,
RedirectUrl = vm.RedirectUrl,
Description = vm.Description,
EmbeddedCSS = vm.EmbeddedCSS,
RedirectAutomatically = string.IsNullOrEmpty(vm.RedirectAutomatically) ? (bool?)null : bool.Parse(vm.RedirectAutomatically)