diff --git a/app/Models/Payment.php b/app/Models/Payment.php index e1556b7d6046..0fc6da08eda2 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -295,6 +295,10 @@ class Payment extends EntityModel */ public function getCompletedAmount() { + if ($this->isFailed() || $this->isVoided()) { + return 0; + } + return $this->amount - $this->refunded; }