Merge pull request #746 from Kukks/tag-pos-invoices

tag pos invoices too
This commit is contained in:
Nicolas Dorier
2019-04-09 18:04:14 +09:00
committed by GitHub
2 changed files with 21 additions and 14 deletions

View File

@@ -264,12 +264,15 @@ namespace BTCPayServer.Controllers
Price = price, Price = price,
BuyerEmail = email, BuyerEmail = email,
OrderId = orderId, OrderId = orderId,
NotificationURL = string.IsNullOrEmpty(notificationUrl)? settings.NotificationUrl: notificationUrl, NotificationURL =
string.IsNullOrEmpty(notificationUrl) ? settings.NotificationUrl : notificationUrl,
NotificationEmail = settings.NotificationEmail, NotificationEmail = settings.NotificationEmail,
RedirectURL = redirectUrl ?? Request.GetDisplayUrl(), RedirectURL = redirectUrl ?? Request.GetDisplayUrl(),
FullNotifications = true, FullNotifications = true,
PosData = string.IsNullOrEmpty(posData) ? null : posData PosData = string.IsNullOrEmpty(posData) ? null : posData
}, store, HttpContext.Request.GetAbsoluteRoot(), cancellationToken: cancellationToken); }, store, HttpContext.Request.GetAbsoluteRoot(),
new List<string>() {AppService.GetAppInternalTag(appId)},
cancellationToken);
return RedirectToAction(nameof(InvoiceController.Checkout), "Invoice", new { invoiceId = invoice.Data.Id }); return RedirectToAction(nameof(InvoiceController.Checkout), "Invoice", new { invoiceId = invoice.Data.Id });
} }

View File

@@ -53,8 +53,12 @@ namespace BTCPayServer.Services.Apps
public async Task<object> GetAppInfo(string appId) public async Task<object> GetAppInfo(string appId)
{ {
var app = await GetApp(appId, AppType.Crowdfund, true); var app = await GetApp(appId, AppType.Crowdfund, true);
if (app != null)
{
return await GetInfo(app); return await GetInfo(app);
} }
return null;
}
private async Task<ViewCrowdfundViewModel> GetInfo(AppData appData, string statusMessage = null) private async Task<ViewCrowdfundViewModel> GetInfo(AppData appData, string statusMessage = null)
{ {
var settings = appData.GetSettings<CrowdfundSettings>(); var settings = appData.GetSettings<CrowdfundSettings>();