Skip to content

Commit d38f7ef

Browse files
author
Babichev Maxim
authored
Update CanBePaid.php
1 parent a05a975 commit d38f7ef

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Traits/CanBePaid.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ public function refund(Product $product): bool
5454
->firstOrFail();
5555

5656
return DB::transaction(function () use ($product, $transfer) {
57-
return $transfer->update(['refund', 1]) && $product
58-
->transfer($this, $product->getAmountProduct(), $product->getMetaProduct())
59-
->exists;
57+
$product->transfer($this, $product->getAmountProduct(), $product->getMetaProduct());
58+
return $transfer->update(['refund' => 1]);
6059
});
6160
}
6261

0 commit comments

Comments
 (0)