feat(sms): simplify SMS settings to use only KAVENEGAR_API_KEY from env, remove other SMS-related fields from config
This commit is contained in:
@@ -29,6 +29,8 @@ use OpenApi\Attributes as OA;
|
||||
#[IsGranted('IS_AUTHENTICATED_FULLY')]
|
||||
class SmsWalletController extends BaseController
|
||||
{
|
||||
private const SMS_PRICE_RIALS = 500;
|
||||
|
||||
public function __construct(
|
||||
private readonly SmsWalletService $walletService,
|
||||
private readonly SmsWalletRepository $walletRepo,
|
||||
@@ -53,7 +55,7 @@ class SmsWalletController extends BaseController
|
||||
}
|
||||
|
||||
$balanceRials = $this->walletService->getBalance($entityType, $entityId);
|
||||
$smsPriceRials = (int) ($this->configRepo->get('sms_price_rials') ?? 500);
|
||||
$smsPriceRials = self::SMS_PRICE_RIALS;
|
||||
$estimatedSms = $smsPriceRials > 0 ? (int) floor($balanceRials / $smsPriceRials) : 0;
|
||||
|
||||
return $this->success([
|
||||
|
||||
Reference in New Issue
Block a user