- Add Enums: TransactionType, TransactionStatus, PaymentGateway - Migrations: wallets, wallet_transactions, wallet_activity_logs - Models: Wallet, WalletTransaction, WalletActivityLog - Services: WalletService with complete business logic - Controllers: WalletController, PaymentController - Filament Resources: WalletResource, WalletTransactionResource - Artisan Command: ifnex:token for API token generation - Sanctum integration with statefulApi and exception handling - Full API endpoints: balance, transactions, admin-adjust, freeze/unfreeze
19 lines
539 B
PHP
19 lines
539 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
enum PaymentGateway: string
|
|
{
|
|
case ZARINPAL = 'zarinpal'; // درگاه زرینپال
|
|
case MANUAL = 'manual'; // شارژ/کسر دستی توسط ادمین
|
|
case SYSTEM = 'system'; // تراکنشهای سیستمی (خودکار)
|
|
|
|
public function label(): string
|
|
{
|
|
return match($this) {
|
|
self::ZARINPAL => 'زرینپال',
|
|
self::MANUAL => 'دستی (ادمین)',
|
|
self::SYSTEM => 'سیستمی',
|
|
};
|
|
}
|
|
} |