diff --git a/BTCPayServer/Controllers/AppsPublicController.cs b/BTCPayServer/Controllers/AppsPublicController.cs index b35e6456b..2f9d44589 100644 --- a/BTCPayServer/Controllers/AppsPublicController.cs +++ b/BTCPayServer/Controllers/AppsPublicController.cs @@ -257,19 +257,22 @@ namespace BTCPayServer.Controllers var store = await _AppService.GetStore(app); store.AdditionalClaims.Add(new Claim(Policies.CanCreateInvoice.Key, store.Id)); var invoice = await _InvoiceController.CreateInvoiceCore(new CreateInvoiceRequest() - { - ItemCode = choice?.Id, - ItemDesc = title, - Currency = settings.Currency, - Price = price, - BuyerEmail = email, - OrderId = orderId, - NotificationURL = string.IsNullOrEmpty(notificationUrl)? settings.NotificationUrl: notificationUrl, - NotificationEmail = settings.NotificationEmail, - RedirectURL = redirectUrl ?? Request.GetDisplayUrl(), - FullNotifications = true, - PosData = string.IsNullOrEmpty(posData) ? null : posData - }, store, HttpContext.Request.GetAbsoluteRoot(), cancellationToken: cancellationToken); + { + ItemCode = choice?.Id, + ItemDesc = title, + Currency = settings.Currency, + Price = price, + BuyerEmail = email, + OrderId = orderId, + NotificationURL = + string.IsNullOrEmpty(notificationUrl) ? settings.NotificationUrl : notificationUrl, + NotificationEmail = settings.NotificationEmail, + RedirectURL = redirectUrl ?? Request.GetDisplayUrl(), + FullNotifications = true, + PosData = string.IsNullOrEmpty(posData) ? null : posData + }, store, HttpContext.Request.GetAbsoluteRoot(), + new List() {AppService.GetAppInternalTag(appId)}, + cancellationToken); return RedirectToAction(nameof(InvoiceController.Checkout), "Invoice", new { invoiceId = invoice.Data.Id }); } diff --git a/BTCPayServer/Services/Apps/AppService.cs b/BTCPayServer/Services/Apps/AppService.cs index b040440fa..095084936 100644 --- a/BTCPayServer/Services/Apps/AppService.cs +++ b/BTCPayServer/Services/Apps/AppService.cs @@ -53,7 +53,11 @@ namespace BTCPayServer.Services.Apps public async Task GetAppInfo(string appId) { var app = await GetApp(appId, AppType.Crowdfund, true); - return await GetInfo(app); + if (app != null) + { + return await GetInfo(app); + } + return null; } private async Task GetInfo(AppData appData, string statusMessage = null) {