added zarin
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user