feat(Stripe): Intègre Stripe pour la gestion des paiements et les webhooks

Ajoute Stripe pour la synchronisation des clients et la configuration des webhooks.
Crée une commande pour synchroniser les clients locaux avec Stripe.
Ajoute un champ customerId à l'entité Customer.
```
This commit is contained in:
Serreau Jovann
2026-01-16 13:15:42 +01:00
parent 4f43dc9066
commit 890da18c15
16 changed files with 610 additions and 4 deletions

View File

@@ -46,15 +46,39 @@
{# 1. IDENTITÉ #}
<td class="px-8 py-6 whitespace-nowrap">
<div class="flex items-center">
{# Avatar avec initiales #}
<div class="h-10 w-10 rounded-xl bg-gradient-to-br from-slate-700 to-slate-800 flex flex-shrink-0 items-center justify-center text-white font-black text-xs border border-white/10 shadow-lg">
{{ customer.surname|first|upper }}{{ customer.name|first|upper }}
</div>
<div class="ml-4">
{# Nom et Civilité #}
<div class="text-sm font-bold text-white">
<span class="text-slate-500 text-[10px] uppercase mr-1">{{ customer.civ }}</span>
{{ customer.surname|upper }} {{ customer.name }}
</div>
<div class="text-[10px] text-blue-400 font-medium tracking-tight">Client ID: #{{ customer.id }}</div>
{# ID Interne et État Stripe #}
<div class="flex items-center mt-1 space-x-2">
{# Badge ID Interne #}
<span class="text-[9px] font-bold text-slate-500 tracking-tighter">
ID: #{{ customer.id }}
</span>
{% if customer.customerId %}
{# ÉTAT : SYNCHRONISÉ (VERT) #}
<div class="flex items-center text-[8px] font-black text-emerald-400 uppercase tracking-[0.1em] bg-emerald-500/10 px-2 py-0.5 rounded-md border border-emerald-500/30 shadow-sm shadow-emerald-500/10">
<span class="flex h-1.5 w-1.5 rounded-full bg-emerald-500 mr-2"></span>
Stripe synchronisé
</div>
{% else %}
{# ÉTAT : NON SYNCHRONISÉ (ROUGE) #}
<div class="flex items-center text-[8px] font-black text-rose-500 uppercase tracking-[0.1em] bg-rose-500/10 px-2 py-0.5 rounded-md border border-rose-500/30 shadow-sm shadow-rose-500/10">
<span class="flex h-1.5 w-1.5 rounded-full bg-rose-500 mr-2 animate-pulse"></span>
Stripe non synchronisé
</div>
{% endif %}
</div>
</div>
</div>
</td>