diff --git a/bootstrap/app.php b/bootstrap/app.php index eda1a3a..76201f0 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -17,7 +17,7 @@ return Application::configure(basePath: dirname(__DIR__)) ]); $middleware->validateCsrfTokens(except: [ - 'stripe/*', + 'stripe/webhook', ]); }) ->withExceptions(function (Exceptions $exceptions): void { diff --git a/config/cashier.php b/config/cashier.php index c5b142a..0b4d385 100644 --- a/config/cashier.php +++ b/config/cashier.php @@ -108,7 +108,7 @@ return [ 'options' => [ // Supported: 'letter', 'legal', 'A4' - 'paper' => env('CASHIER_PAPER', 'letter'), + 'paper' => env('CASHIER_PAPER', 'A4'), 'remote_enabled' => env('CASHIER_REMOTE_ENABLED', false), ], diff --git a/database/migrations/2026_05_15_300004_add_payment_method_columns_to_workspaces_table.php b/database/migrations/2026_05_15_300004_add_payment_method_columns_to_workspaces_table.php new file mode 100644 index 0000000..4a74b14 --- /dev/null +++ b/database/migrations/2026_05_15_300004_add_payment_method_columns_to_workspaces_table.php @@ -0,0 +1,29 @@ +string('pm_type', 25)->nullable()->after('stripe_id'); + $table->string('pm_last_four', 4)->nullable()->after('pm_type'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('workspaces', function (Blueprint $table) { + $table->dropColumn(['pm_type', 'pm_last_four']); + }); + } +}; diff --git a/tests/Feature/Billing/StripeWebhookTest.php b/tests/Feature/Billing/StripeWebhookTest.php index 27e3c55..dce4f02 100644 --- a/tests/Feature/Billing/StripeWebhookTest.php +++ b/tests/Feature/Billing/StripeWebhookTest.php @@ -5,8 +5,6 @@ it('handles subscription_created webhook', function () { // With an invalid Stripe-Signature header, Cashier returns 403 (AccessDeniedHttpException). config(['cashier.webhook.secret' => 'whsec_test_dummy_secret']); - $workspace = \App\Domains\Workspace\Models\Workspace::factory()->create(); - $payload = [ 'type' => 'customer.subscription.created', 'data' => [