mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace BTCPayServer.Client.Models
|
namespace BTCPayServer.Client.Models
|
||||||
{
|
{
|
||||||
@@ -19,6 +16,7 @@ namespace BTCPayServer.Client.Models
|
|||||||
|
|
||||||
[JsonProperty(Order = 1)] public string StoreId { get; set; }
|
[JsonProperty(Order = 1)] public string StoreId { get; set; }
|
||||||
[JsonProperty(Order = 2)] public string InvoiceId { get; set; }
|
[JsonProperty(Order = 2)] public string InvoiceId { get; set; }
|
||||||
|
[JsonProperty(Order = 3)] public JObject Metadata { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WebhookInvoiceSettledEvent : WebhookInvoiceEvent
|
public class WebhookInvoiceSettledEvent : WebhookInvoiceEvent
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ namespace BTCPayServer.HostedServices
|
|||||||
webhookEvent.DeliveryId = delivery.Id;
|
webhookEvent.DeliveryId = delivery.Id;
|
||||||
webhookEvent.WebhookId = webhook.Id;
|
webhookEvent.WebhookId = webhook.Id;
|
||||||
webhookEvent.OriginalDeliveryId = delivery.Id;
|
webhookEvent.OriginalDeliveryId = delivery.Id;
|
||||||
|
webhookEvent.Metadata = invoiceEvent.Invoice.Metadata.ToJObject();
|
||||||
webhookEvent.IsRedelivery = false;
|
webhookEvent.IsRedelivery = false;
|
||||||
webhookEvent.Timestamp = delivery.Timestamp;
|
webhookEvent.Timestamp = delivery.Timestamp;
|
||||||
var context = new WebhookDeliveryRequest(webhook.Id, webhookEvent, delivery, webhookBlob);
|
var context = new WebhookDeliveryRequest(webhook.Id, webhookEvent, delivery, webhookBlob);
|
||||||
|
|||||||
@@ -673,7 +673,12 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The invoice id of the invoice's event",
|
"description": "The invoice id of the invoice's event",
|
||||||
"nullable": false
|
"nullable": false
|
||||||
}
|
},
|
||||||
|
"metadata": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "User-supplied metadata added to the invoice at the time of its creation",
|
||||||
|
"nullable": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user