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

View File

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