- Add unified payment provider architecture with contract-based design - Implement 6 payment providers: Stripe, Lemon Squeezy, Polar, Oxapay, Crypto, Activation Keys - Create subscription management with lifecycle handling (create, cancel, pause, resume, update) - Add coupon system with usage tracking and trial extensions - Build Filament admin resources for payment providers, subscriptions, coupons, and trials - Implement payment orchestration service with provider registry and configuration management - Add comprehensive payment logging and webhook handling for all providers - Create customer analytics dashboard with revenue, churn, and lifetime value metrics - Add subscription migration service for provider switching - Include extensive test coverage for all payment functionality
57 lines
1.7 KiB
PHP
57 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\PaymentProviders;
|
|
|
|
use App\Filament\Resources\PaymentProviders\Pages\CreatePaymentProvider;
|
|
use App\Filament\Resources\PaymentProviders\Pages\EditPaymentProvider;
|
|
use App\Filament\Resources\PaymentProviders\Pages\ListPaymentProviders;
|
|
use App\Filament\Resources\PaymentProviders\Schemas\PaymentProviderForm;
|
|
use App\Filament\Resources\PaymentProviders\Tables\PaymentProvidersTable;
|
|
use App\Models\PaymentProvider;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
|
|
class PaymentProviderResource extends Resource
|
|
{
|
|
protected static ?string $model = PaymentProvider::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCube;
|
|
|
|
protected static ?string $navigationLabel = 'Payment Providers';
|
|
|
|
protected static ?string $modelLabel = 'Payment Provider';
|
|
|
|
protected static ?string $pluralModelLabel = 'Payment Providers';
|
|
|
|
protected static string|null|\UnitEnum $navigationGroup = 'Payment Management';
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return PaymentProviderForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return PaymentProvidersTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListPaymentProviders::route('/'),
|
|
'create' => CreatePaymentProvider::route('/create'),
|
|
'edit' => EditPaymentProvider::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|