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