1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-07 00:21:32 +01:00

Round PayPal transaction amount to two decimal points (#5318)

This commit is contained in:
Alex Morask 2025-01-23 11:19:46 -05:00 committed by GitHub
parent 31e95d529f
commit 20fb45b05c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -296,7 +296,7 @@ public class StripeEventUtilityService : IStripeEventUtilityService
btObjIdField = "provider_id";
btObjId = providerId.Value;
}
var btInvoiceAmount = invoice.AmountDue / 100M;
var btInvoiceAmount = Math.Round(invoice.AmountDue / 100M, 2);
var existingTransactions = organizationId.HasValue
? await _transactionRepository.GetManyByOrganizationIdAsync(organizationId.Value)
@ -338,7 +338,7 @@ public class StripeEventUtilityService : IStripeEventUtilityService
}
};
_logger.LogInformation("Creating Braintree transaction with Amount: {Amount}, CustomerId: {CustomerId}, " +
_logger.LogInformation("Creating Braintree transaction with Amount: {Amount}, CustomerId: {CustomerId}, " +
"CustomField: {CustomField}, CustomFields: {@CustomFields}",
transactionRequest.Amount,
transactionRequest.CustomerId,