mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-23 15:14:49 +01:00
Adding links to invoice for review
This commit is contained in:
@@ -116,5 +116,17 @@ namespace BTCPayServer.Services
|
||||
pathBase: request.PathBase
|
||||
) ?? throw Bug();
|
||||
}
|
||||
|
||||
public string InvoiceLink(string invoiceId, HttpRequest request)
|
||||
{
|
||||
return LinkGenerator.GetUriByAction(
|
||||
action: nameof(UIInvoiceController.Invoice),
|
||||
controller: "UIInvoice",
|
||||
values: new { invoiceId },
|
||||
scheme: request.Scheme,
|
||||
host: request.Host,
|
||||
pathBase: request.PathBase
|
||||
) ?? throw Bug();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,13 +163,16 @@
|
||||
subject: 'Invoice {Invoice.Id} payment settled',
|
||||
body: 'Invoice {Invoice.Id} (Order Id: {Invoice.OrderId}) payment settled.'
|
||||
},
|
||||
@{ var invoiceLink = CallbackGenerator.InvoiceLink("INVOICE_ID", this.Context.Request).Replace("INVOICE_ID", ""); }
|
||||
@WebhookEventType.InvoiceExpiredPaidPartial: {
|
||||
subject: 'Invoice {Invoice.Id} Expired Paid Partial',
|
||||
body: 'Invoice {Invoice.Id} (Order Id: {Invoice.OrderId}) has expired partially paid.'
|
||||
body: 'Invoice {Invoice.Id} (Order Id: {Invoice.OrderId}) has expired partially paid. '+
|
||||
'\nPlease review and take appropriate action: ' + @Safe.Json(invoiceLink) + '{Invoice.Id}'
|
||||
},
|
||||
@WebhookEventType.InvoicePaidAfterExpiration: {
|
||||
subject: 'Invoice {Invoice.Id} Expired Paid Late',
|
||||
body: 'Invoice {Invoice.Id} (Order Id: {Invoice.OrderId}) has been paid after expiration.'
|
||||
body: 'Invoice {Invoice.Id} (Order Id: {Invoice.OrderId}) has been paid after expiration. '+
|
||||
'\nPlease review and take appropriate action: ' + @Safe.Json(invoiceLink) + '{Invoice.Id}'
|
||||
},
|
||||
@{ var paymentRequestsLink = CallbackGenerator.PaymentRequestListLink(storeId, this.Context.Request); }
|
||||
@WebhookEventType.PaymentRequestCompleted: {
|
||||
|
||||
Reference in New Issue
Block a user