42 lines
989 B
PHP
42 lines
989 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
enum KycLevel: int
|
|
{
|
|
case NONE = 0; // No KYC — cannot transact
|
|
case PHONE = 1; // Phone verified — limited
|
|
case ID = 2; // National ID verified — standard
|
|
case FULL = 3; // Full KYC (ID + address proof) — unlimited
|
|
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::NONE => __('kyc.none'),
|
|
self::PHONE => __('kyc.phone'),
|
|
self::ID => __('kyc.id'),
|
|
self::FULL => __('kyc.full'),
|
|
};
|
|
}
|
|
|
|
public function limits(): array
|
|
{
|
|
return config("wasl.wallet.limits.{$this->value}", []);
|
|
}
|
|
|
|
public function maxBalanceMinor(): int
|
|
{
|
|
return $this->limits()['balance'] ?? 0;
|
|
}
|
|
|
|
public function dailyTxLimitMinor(): int
|
|
{
|
|
return $this->limits()['daily_tx'] ?? 0;
|
|
}
|
|
|
|
public function monthlyTxLimitMinor(): int
|
|
{
|
|
return $this->limits()['monthly_tx'] ?? 0;
|
|
}
|
|
}
|