From 53f8c893ca92228bbc0909908eacf39e9c61d3cf Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Tue, 18 Nov 2025 00:16:04 +0500 Subject: [PATCH] wip --- .../Repositories/OnlinePaymentRepository.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/Modules/OnlinePayment/Repositories/OnlinePaymentRepository.php b/app/Modules/OnlinePayment/Repositories/OnlinePaymentRepository.php index a51628f..1f12337 100644 --- a/app/Modules/OnlinePayment/Repositories/OnlinePaymentRepository.php +++ b/app/Modules/OnlinePayment/Repositories/OnlinePaymentRepository.php @@ -217,7 +217,7 @@ class OnlinePaymentRepository 'errorUrl' => $this->provider->returnUrl(), 'username' => $this->provider->username(), 'paymentStatus' => self::PENDING, - 'apiClient' => $this->apiClient, + 'api_client' => $this->apiClient, ]; if ($this->relatedModel) { @@ -260,8 +260,14 @@ class OnlinePaymentRepository /** @var \App\Modules\Branch\Models\Branch */ $bankBranch = $relatedResource->branch; - $username = $bankBranch->offsetExists($this->apiClient.'_username') ? $bankBranch->{$this->apiClient.'_username'} : ''; - $password = $bankBranch->offsetExists($this->apiClient.'_password') ? $bankBranch->{$this->apiClient.'_password'} : ''; + $username = $bankBranch->offsetExists($paymentHistory->api_client.'_username') ? $bankBranch->{$paymentHistory->api_client.'_username'} : ''; + $password = $bankBranch->offsetExists($paymentHistory->api_client.'_password') ? $bankBranch->{$paymentHistory->api_client.'_password'} : ''; + + info([ + 'bankBranch' => $bankBranch, + 'username' => $username, + 'password' => $password, + ]); if ($username === '' || $password === '') { return $this->paymentFailed('(USERNAME OR PASSWORD NOT FOUND)');