From 0569cd8bf134ddadc932f42b505122db5a76af2f Mon Sep 17 00:00:00 2001 From: Aboozar Ghaffari Date: Thu, 29 Jun 2023 20:40:43 +0330 Subject: [PATCH] fixed getTransaction calls --- src/Provider/AsanPardakhtProvider.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Provider/AsanPardakhtProvider.php b/src/Provider/AsanPardakhtProvider.php index e0d02d8..1532d94 100644 --- a/src/Provider/AsanPardakhtProvider.php +++ b/src/Provider/AsanPardakhtProvider.php @@ -35,7 +35,7 @@ public function checkWalletBalance(): JsonResponse|array 'mo' => $this->getCellNumber(), 'hi' => $this->getParameters('host_id'), 'walet' => 5, - 'htran' => random_int(5000, 50000).time(), + 'htran' => $this->getTransaction()->getWalletTransactionId(), 'hop' => AsanpardakhtStatusEnum::WalletBalanceHop->value, 'htime' => time(), 'hkey' => $this->getParameters('api_key'), @@ -121,12 +121,12 @@ public function payByWallet(): JsonResponse|array try { $hostRequest = $this->prepareJsonString([ 'caurl' => $this->getParameters('callback_url'), - 'pid' => $this->hashParam($this->transaction->id), + 'pid' => $this->hashParam($this->getTransaction()->id), 'ao' => $this->getTransaction()->getPayableAmount(), 'mo' => $this->getCellNumber(), 'hi' => $this->getParameters('host_id'), 'walet' => 5, - 'htran' => $this->transaction->getWalletTransactionId(), + 'htran' => $this->getTransaction()->getWalletTransactionId(), 'hop' => AsanpardakhtStatusEnum::PayByWalletHop->value, 'htime' => time(), 'stime' => time(), @@ -189,7 +189,7 @@ public function reverseWalletPaymentResult(): mixed 'mo' => $this->getCellNumber(), 'hi' => $this->getParameters('host_id'), 'walet' => 5, - 'htran' => $this->transaction->getWalletTransactionId(), + 'htran' => $this->getTransaction()->getWalletTransactionId(), 'hop' => AsanpardakhtStatusEnum::ReverseRequestHop->value, 'htime' => $time, 'stime' => $time, @@ -232,7 +232,7 @@ public function walletCharge(): JsonResponse|array 'mo' => $this->getCellNumber(), 'hi' => $this->getParameters('host_id'), 'walet' => 5, - 'htran' => $this->transaction->getWalletTransactionId(), + 'htran' => $this->getTransaction()->getWalletTransactionId(), 'hop' => AsanpardakhtStatusEnum::ChargeWallet->value, 'htime' => time(), 'stime' => time(),