feat(billing): implement Polar customer portal integration

- Add comprehensive billing page with current subscription display and transaction history
   - Integrate Polar.sh customer portal for subscription management
   - Fix Polar API endpoint from /customer-portal to /customer-sessions
   - Use Polar's direct customer_portal_url response for seamless redirect
   - Add responsive button layout with cursor-pointer styling
   - Implement human-readable timestamps using diffForHumans()
   - Add subscription sync functionality with 30-minute recheck window
   - Include subscription cancellation with modal confirmation
   - Support activation key provider with pending activation display
   - Add proper error handling and user feedback messages
This commit is contained in:
idevakk
2025-12-06 02:01:17 -08:00
parent ebb041c0cc
commit 5ee5c5b8dc
5 changed files with 447 additions and 5 deletions

View File

@@ -39,6 +39,7 @@ use App\Livewire\Home;
use App\Livewire\ListBlog;
use App\Livewire\Page;
use App\Livewire\Settings\Appearance;
use App\Livewire\Settings\Billing;
use App\Livewire\Settings\Password;
use App\Livewire\Settings\Profile;
use App\Models\Email;
@@ -174,6 +175,7 @@ Route::middleware(['auth'])->group(function (): void {
Route::redirect('settings', 'settings/profile');
Route::get('settings/profile', Profile::class)->name('settings.profile');
Route::get('settings/billing', Billing::class)->name('settings.billing');
Route::get('settings/password', Password::class)->name('settings.password');
Route::get('settings/appearance', Appearance::class)->name('settings.appearance');
});