Skip to content

Commit

Permalink
Fix set payable data bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dena-a authored Dec 18, 2023
1 parent 98b670b commit 952272b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Traits/TransactionData.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ trait TransactionData
public function setTransaction(IranPaymentTransaction $transaction): self
{
$this->transaction = $transaction;

if (isset($transaction->payable)) {
$this->setPayable($transaction->payable);
}

if (isset($transaction->payable_id)) {
$this->payable_id = $transaction->payable_id;
}

if (isset($transaction->payable_type)) {
$this->payable_type = $transaction->payable_type;
}

return $this;
}
Expand Down

0 comments on commit 952272b

Please sign in to comment.