added zarin

This commit is contained in:
2026-07-23 20:24:58 +03:30
parent d8b685524b
commit 8a4a406e66
17 changed files with 2007 additions and 10 deletions
+8 -2
View File
@@ -728,8 +728,8 @@ class ConfigService
public const ACCOUNTING_NONE = 'none';
public const ACCOUNTING_TAHESAB = 'tahesab';
public const ACCOUNTING_PARGAR = 'pargar';
public const ACCOUNTING_ZARIN = 'zarin';
/** none | tahesab | pargar — از setting accounting_provider */
public function isConditionalOrderEnabled(): bool
{
return $this->getBool('enable_conditional_order', false);
@@ -762,10 +762,11 @@ class ConfigService
return max(0, $this->getInt('fee_conditional_order', 0));
}
/** none | tahesab | pargar | zarin — از setting accounting_provider */
public function accountingProvider(): string
{
$provider = strtolower(trim($this->getString('accounting_provider', '')));
if (in_array($provider, [self::ACCOUNTING_NONE, self::ACCOUNTING_TAHESAB, self::ACCOUNTING_PARGAR], true)) {
if (in_array($provider, [self::ACCOUNTING_NONE, self::ACCOUNTING_TAHESAB, self::ACCOUNTING_PARGAR, self::ACCOUNTING_ZARIN], true)) {
return $provider;
}
@@ -789,6 +790,11 @@ class ConfigService
return $this->accountingProvider() === self::ACCOUNTING_PARGAR;
}
public function isZarinAccounting(): bool
{
return $this->accountingProvider() === self::ACCOUNTING_ZARIN;
}
/**
* Hostname for WebOTP SMS (@domain #code) and other public links.
* Only from the current HTTP request — no settings, no .env.