From 994a74304533986f8f1cabf26093a0fc8c507554 Mon Sep 17 00:00:00 2001 From: Hamed Panjeh <16323354+HPWebdeveloper@users.noreply.github.com> Date: Tue, 12 Dec 2023 13:39:15 -0300 Subject: [PATCH] Update HandlesPayment.php Modify variable name from $wallets to $walletsInOrder --- src/Traits/HandlesPayment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Traits/HandlesPayment.php b/src/Traits/HandlesPayment.php index 63f8a33..721f497 100644 --- a/src/Traits/HandlesPayment.php +++ b/src/Traits/HandlesPayment.php @@ -24,9 +24,9 @@ public function pay(int|float $orderValue): void DB::transaction(function () use ($orderValue) { $remainingOrderValue = $orderValue; - $wallets = $this->wallets()->whereIn('type', $this->walletsInOrder())->get(); + $walletsInOrder = $this->wallets()->whereIn('type', $this->walletsInOrder())->get(); - foreach ($wallets as $wallet) { + foreach ($walletsInOrder as $wallet) { if (! $wallet || ! $wallet->hasBalance()) { continue; }