This commit is contained in:
nurmuhammet committed 2025-11-18 00:16:04 +05:00
1 parent 52d070f4e5
commit 53f8c893ca
1 file changed
+9 -3
@@ -217,7 +217,7 @@ public function createHistory(): void
'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 @@ public function checkPayment(string $orderId): array
/** @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)');