From 952272b9742b2f8d9ae32001d4fb127996bafc24 Mon Sep 17 00:00:00 2001 From: Dena Date: Mon, 18 Dec 2023 17:51:16 +0330 Subject: [PATCH] Fix set payable data bug --- src/Traits/TransactionData.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Traits/TransactionData.php b/src/Traits/TransactionData.php index 3c32eb2..2b75d75 100644 --- a/src/Traits/TransactionData.php +++ b/src/Traits/TransactionData.php @@ -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; }