fix: stripe invoice paid webhook

fix: prepare customer initiated tier change
fix: separate view for subscriptions
This commit is contained in:
Andras Bacsai
2024-02-23 11:21:14 +01:00
parent ce09ef8848
commit b59e47dcf9
11 changed files with 108 additions and 59 deletions

View File

@@ -72,6 +72,7 @@ use App\Livewire\Server\Proxy\Show as ProxyShow;
use App\Livewire\Server\Proxy\Logs as ProxyLogs;
use App\Livewire\Source\Github\Change as GitHubChange;
use App\Livewire\Subscription\Index as SubscriptionIndex;
use App\Livewire\Subscription\Show as SubscriptionShow;
use App\Livewire\Tags\Index as TagsIndex;
use App\Livewire\Tags\Show as TagsShow;
@@ -110,7 +111,8 @@ Route::middleware(['auth', 'verified'])->group(function () {
Route::get('/', Dashboard::class)->name('dashboard');
Route::get('/boarding', BoardingIndex::class)->name('boarding');
Route::get('/subscription', SubscriptionIndex::class)->name('subscription.index');
Route::get('/subscription/new', SubscriptionIndex::class)->name('subscription.index');
Route::get('/subscription', SubscriptionShow::class)->name('subscription.show');
Route::get('/settings', SettingsIndex::class)->name('settings.index');
Route::get('/settings/license', SettingsLicense::class)->name('settings.license');

View File

@@ -816,9 +816,7 @@ Route::post('/payments/stripe/events', function () {
Sleep::for(5)->seconds();
$subscription = Subscription::where('stripe_customer_id', $customerId)->firstOrFail();
}
$subscription->update([
'stripe_plan_id' => $planId,
'stripe_invoice_paid' => true,
]);
break;