Refund: Fix overpaid option (#5076)

Closes #5066.
This commit is contained in:
d11n 2023-06-16 03:52:52 +02:00 committed by GitHub
parent 1956919886
commit d181846339
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -456,7 +456,7 @@ namespace BTCPayServer.Controllers
model.Title = "How much to refund?";
model.RefundStep = RefundSteps.SelectRate;
if (isPaidOver)
if (!isPaidOver)
{
ModelState.AddModelError(nameof(model.SelectedRefundOption), "Invoice is not overpaid");
}
@ -466,7 +466,7 @@ namespace BTCPayServer.Controllers
}
if (!ModelState.IsValid)
{
return this.CreateValidationError(ModelState);
return View("_RefundModal", model);
}
createPullPayment.Currency = paymentMethodId.CryptoCode;