This commit is contained in:
2025-09-25 15:18:08 +05:00
parent abe8334ed5
commit 88ea93bb79
5 changed files with 153 additions and 6 deletions

View File

@@ -348,6 +348,23 @@ if (! function_exists('calculateProductPriceAmount')) {
}
}
/**
* Halkbank credentials
*
* @return int|string|array{username: int|string, password: string}
*/
function halkbankCredentials(string $key = ''): int|string|array
{
return match($key) {
'username' => 516122500260,
'password' => 'MrZsO9wfgWOBjf4',
default => [
'username' => 516122500260,
'password' => 'MrZsO9wfgWOBjf4',
]
};
}
/**
* Create halkbank order
*
@@ -363,8 +380,8 @@ function createHalkbankOrder($price = 123): array
'amount' => $price,
'currency' => 934,
'language' => 'ru',
'userName' => 516122500260,
'password' => 'MrZsO9wfgWOBjf4',
'userName' => halkbankCredentials('username'),
'password' => halkbankCredentials('password'),
'returnUrl' => route('online-payment-store'),
'pageView' => 'DESKTOP',
'description' => 'MM.COM.TM',