Initial commit - WASL Digital Wallet
This commit is contained in:
41
Backend/app/Enums/KycLevel.php
Normal file
41
Backend/app/Enums/KycLevel.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user