From ec076d1560ce9af09186d5feb89d2dbfb19aa13b Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 18 Oct 2023 19:07:30 +0900 Subject: [PATCH] Fix: BTCPayServer.HostedServices.BitpayIPNSender fail to send notifications on some locale (Fix #5361) --- BTCPayServer/Services/Invoices/InvoiceEntity.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/BTCPayServer/Services/Invoices/InvoiceEntity.cs b/BTCPayServer/Services/Invoices/InvoiceEntity.cs index 3edbd964d..db2140d24 100644 --- a/BTCPayServer/Services/Invoices/InvoiceEntity.cs +++ b/BTCPayServer/Services/Invoices/InvoiceEntity.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; +using System.Globalization; using System.Linq; using BTCPayServer.Abstractions.Extensions; using BTCPayServer.Client.Models; @@ -591,14 +592,14 @@ namespace BTCPayServer.Services.Invoices cryptoInfo.CryptoCode = cryptoCode; cryptoInfo.PaymentType = info.GetId().PaymentType.ToString(); cryptoInfo.Rate = info.Rate; - cryptoInfo.Price = subtotalPrice.ToString(); + cryptoInfo.Price = subtotalPrice.ToString(CultureInfo.InvariantCulture); - cryptoInfo.Due = accounting.Due.ToString(); - cryptoInfo.Paid = accounting.Paid.ToString(); - cryptoInfo.TotalDue = accounting.TotalDue.ToString(); - cryptoInfo.NetworkFee = accounting.NetworkFee.ToString(); + cryptoInfo.Due = accounting.Due.ToString(CultureInfo.InvariantCulture); + cryptoInfo.Paid = accounting.Paid.ToString(CultureInfo.InvariantCulture); + cryptoInfo.TotalDue = accounting.TotalDue.ToString(CultureInfo.InvariantCulture); + cryptoInfo.NetworkFee = accounting.NetworkFee.ToString(CultureInfo.InvariantCulture); cryptoInfo.TxCount = accounting.TxCount; - cryptoInfo.CryptoPaid = accounting.CryptoPaid.ToString(); + cryptoInfo.CryptoPaid = accounting.CryptoPaid.ToString(CultureInfo.InvariantCulture); cryptoInfo.Address = address;