- Create BilletBuyer entity: event, user (nullable for guests), firstName,
lastName, email, reference (ETICKET-XXXX-XXXX-XXXX), totalHT, status,
stripeSessionId, paidAt, items (OneToMany)
- Create BilletBuyerItem entity: billet, billetName (snapshot), quantity,
unitPriceHT, line total helpers
- OrderController with full checkout flow:
- POST /evenement/{id}/commander: create order from cart JSON
- GET/POST /commande/{id}/informations: guest form (name, email)
- GET /commande/{id}/paiement: payment page with recap
- POST /commande/{id}/stripe: Stripe Checkout on connected account
with application_fee, productId, and quantities
- GET /commande/{id}/confirmation: success page
- Cart JS: POST cart data on Commander click, redirect to guest/payment
- Templates: guest form, payment page, order summary partial, success page
- Stripe payment uses organizer connected account, application_fee based
on commissionRate, existing productId when available
- Tests: BilletBuyerTest (12), BilletBuyerItemTest (6), cart.test.js (13)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
37 lines
1.6 KiB
Twig
37 lines
1.6 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Paiement - {{ order.event.title }} - E-Ticket{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="page-container">
|
|
<h1 class="text-3xl font-black uppercase tracking-tighter italic heading-page">Paiement</h1>
|
|
<p class="font-bold text-gray-600 italic mb-8">Commande {{ order.reference }}</p>
|
|
|
|
<div class="flex flex-col lg:flex-row gap-8">
|
|
<div class="flex-1">
|
|
<div class="card-brutal">
|
|
<div class="p-6">
|
|
<h2 class="font-black uppercase text-sm tracking-widest mb-4">Informations</h2>
|
|
<div class="space-y-2 mb-6">
|
|
<p class="text-sm font-bold">{{ order.firstName }} {{ order.lastName }}</p>
|
|
<p class="text-sm font-bold text-gray-500">{{ order.email }}</p>
|
|
</div>
|
|
|
|
<form method="post" action="{{ path('app_order_stripe', {id: order.id}) }}">
|
|
<button type="submit" class="w-full btn-brutal font-black uppercase text-sm tracking-widest bg-indigo-600 text-white hover:bg-indigo-800 transition-all">
|
|
Payer {{ order.totalHTDecimal|number_format(2, ',', ' ') }} €
|
|
</button>
|
|
</form>
|
|
|
|
<p class="text-[10px] font-bold text-gray-400 mt-4 text-center">Paiement securise par Stripe</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="w-full lg:w-[350px] flex-shrink-0">
|
|
{% include 'order/_summary.html.twig' %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|