Save Stripe payment details on order confirmation, add arrive early tip

- Retrieve PaymentIntent on success redirect, save payment_method, card_brand, card_last4
- Display payment info on /ma-commande page (card type + last 4 digits)
- Add "Il est recommande d'arriver en avance" to practical info on ticket PDF
- Migration for payment_method, card_brand, card_last4 columns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-21 16:56:50 +01:00
parent c8faf76741
commit 7a29372b60
6 changed files with 139 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260321250000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add payment details to billet_buyer';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE billet_buyer ADD COLUMN IF NOT EXISTS payment_method VARCHAR(50) DEFAULT NULL');
$this->addSql('ALTER TABLE billet_buyer ADD COLUMN IF NOT EXISTS card_brand VARCHAR(50) DEFAULT NULL');
$this->addSql('ALTER TABLE billet_buyer ADD COLUMN IF NOT EXISTS card_last4 VARCHAR(4) DEFAULT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE billet_buyer DROP COLUMN IF EXISTS payment_method');
$this->addSql('ALTER TABLE billet_buyer DROP COLUMN IF EXISTS card_brand');
$this->addSql('ALTER TABLE billet_buyer DROP COLUMN IF EXISTS card_last4');
}
}