fix(billing): pm_type/pm_last_four migration, narrow CSRF exclusion, EU paper size
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
06dbb1dffb
commit
8f1398380f
|
|
@ -17,7 +17,7 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$middleware->validateCsrfTokens(except: [
|
$middleware->validateCsrfTokens(except: [
|
||||||
'stripe/*',
|
'stripe/webhook',
|
||||||
]);
|
]);
|
||||||
})
|
})
|
||||||
->withExceptions(function (Exceptions $exceptions): void {
|
->withExceptions(function (Exceptions $exceptions): void {
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ return [
|
||||||
|
|
||||||
'options' => [
|
'options' => [
|
||||||
// Supported: 'letter', 'legal', 'A4'
|
// Supported: 'letter', 'legal', 'A4'
|
||||||
'paper' => env('CASHIER_PAPER', 'letter'),
|
'paper' => env('CASHIER_PAPER', 'A4'),
|
||||||
|
|
||||||
'remote_enabled' => env('CASHIER_REMOTE_ENABLED', false),
|
'remote_enabled' => env('CASHIER_REMOTE_ENABLED', false),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('workspaces', function (Blueprint $table) {
|
||||||
|
$table->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']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -5,8 +5,6 @@ it('handles subscription_created webhook', function () {
|
||||||
// With an invalid Stripe-Signature header, Cashier returns 403 (AccessDeniedHttpException).
|
// With an invalid Stripe-Signature header, Cashier returns 403 (AccessDeniedHttpException).
|
||||||
config(['cashier.webhook.secret' => 'whsec_test_dummy_secret']);
|
config(['cashier.webhook.secret' => 'whsec_test_dummy_secret']);
|
||||||
|
|
||||||
$workspace = \App\Domains\Workspace\Models\Workspace::factory()->create();
|
|
||||||
|
|
||||||
$payload = [
|
$payload = [
|
||||||
'type' => 'customer.subscription.created',
|
'type' => 'customer.subscription.created',
|
||||||
'data' => [
|
'data' => [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue