From b139ff49f3b9fad86695c5a60909d822bf412c2a Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 28 Dec 2021 13:19:19 +0300 Subject: [PATCH] fixed separator --- .../PaymentRequests/PaymentRequestAppService.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/payment/src/EShopOnAbp.PaymentService.Application/PaymentRequests/PaymentRequestAppService.cs b/services/payment/src/EShopOnAbp.PaymentService.Application/PaymentRequests/PaymentRequestAppService.cs index d07b7d77..34f632ca 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.Application/PaymentRequests/PaymentRequestAppService.cs +++ b/services/payment/src/EShopOnAbp.PaymentService.Application/PaymentRequests/PaymentRequestAppService.cs @@ -4,6 +4,7 @@ using PayPalCheckoutSdk.Core; using PayPalCheckoutSdk.Orders; using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Threading.Tasks; @@ -69,11 +70,11 @@ namespace EShopOnAbp.PaymentService.PaymentRequests ItemTotal = new Money { CurrencyCode = paymentRequest.Currency, - Value = totalCheckoutPrice.ToString(".00") + Value = totalCheckoutPrice.ToString($"{CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator}00") } }, CurrencyCode = paymentRequest.Currency, - Value = totalCheckoutPrice.ToString(".00"), + Value = totalCheckoutPrice.ToString($"{CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator}00"), }, Items = paymentRequest.Products.Select(p => new Item { @@ -82,7 +83,7 @@ namespace EShopOnAbp.PaymentService.PaymentRequests UnitAmount = new Money { CurrencyCode = paymentRequest.Currency, - Value = p.UnitPrice.ToString(".00") + Value = p.UnitPrice.ToString($"{CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator}00") } }).ToList(), ReferenceId = paymentRequest.Id.ToString()