This commit is contained in:
2025-11-18 00:16:04 +05:00
parent 52d070f4e5
commit 53f8c893ca

View File

@@ -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)');