diff --git a/app/Models/Payment.php b/app/Models/Payment.php index b836bacba449..fb51b594d662 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -238,12 +238,12 @@ class Payment extends EntityModel return false; } + Event::fire(new PaymentWasVoided($this)); + $this->refunded = $this->amount; $this->payment_status_id = PAYMENT_STATUS_VOIDED; $this->save(); - Event::fire(new PaymentWasVoided($this)); - return true; }