Skip to content

Commit

Permalink
Update HandlesPayment.php
Browse files Browse the repository at this point in the history
Modify variable name from $wallets to $walletsInOrder
  • Loading branch information
HPWebdeveloper authored Dec 12, 2023
1 parent f225b4e commit 994a743
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Traits/HandlesPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 994a743

Please sign in to comment.