BTCPay-Server-integration-and-HAProxy-setup

This commit is contained in:
sysadmin
2025-09-01 09:37:38 +01:00
parent ee4a5c3578
commit b4cee007c4
3 changed files with 178 additions and 4 deletions

View File

@@ -28,7 +28,13 @@ public class BTCPayServerService : IBTCPayServerService
_storeId = _configuration["BTCPayServer:StoreId"] ?? throw new ArgumentException("BTCPayServer:StoreId not configured");
_webhookSecret = _configuration["BTCPayServer:WebhookSecret"] ?? throw new ArgumentException("BTCPayServer:WebhookSecret not configured");
_client = new BTCPayServerClient(new Uri(baseUrl), apiKey);
// Create HttpClient with certificate bypass for internal networks
var httpClient = new HttpClient(new HttpClientHandler()
{
ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true
});
_client = new BTCPayServerClient(new Uri(baseUrl), apiKey, httpClient);
}
public async Task<string> CreateInvoiceAsync(decimal amount, CryptoCurrency currency, string orderId, string? description = null)