From c660ac2d0b56ea803b97182d93b103b1d5f6095d Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 3 Apr 2017 17:21:50 +0300 Subject: [PATCH] Fix for client balance when voiding Braintree payment --- app/Models/Payment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }