Corrected the logic when adding processing the payment
This commit is contained in:
parent
bd296f3fa8
commit
848a56beee
@ -1855,7 +1855,7 @@ namespace Marco.Pms.Services.Service
|
||||
if (model.StatusId == Processed)
|
||||
{
|
||||
var totalAmount = model.BaseAmount + model.TaxAmount;
|
||||
if (totalAmount.HasValue || totalAmount != paymentRequest.Amount)
|
||||
if (!totalAmount.HasValue || totalAmount != paymentRequest.Amount)
|
||||
{
|
||||
// Log the mismatch error with relevant details
|
||||
_logger.LogWarning("Payment amount mismatch: calculated totalAmount = {TotalAmount}, expected Amount = {ExpectedAmount}", totalAmount ?? 0, paymentRequest.Amount);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user