zarbox added 7

This commit is contained in:
2026-06-04 17:39:06 +03:30
parent bdafca0f1d
commit a9f468c51b
7 changed files with 87 additions and 9 deletions
+16
View File
@@ -56,6 +56,22 @@ class ConfigService
return (int) ($value === false || $value === null || $value === '' ? $default : $value);
}
/** X-Client-Id برای API خارجی (HMAC) — اول settings، بعد .env NODE_CLIENT_ID */
public function nodeClientId(): string
{
$fromDb = $this->getString('node_client_id', '');
return $fromDb !== '' ? $fromDb : (string) env('NODE_CLIENT_ID', '');
}
/** کلید امضای HMAC — اول settings، بعد .env NODE_SHARED_SECRET */
public function nodeSharedSecret(): string
{
$fromDb = $this->getString('node_shared_secret', '');
return $fromDb !== '' ? $fromDb : (string) env('NODE_SHARED_SECRET', '');
}
/** اختلاف خرید نمایش (/api/price/last) — fee_single / buy_fee */
public function displayBuySpreadRial(): float
{