Add stock management, order notifications, webhooks, expiration cron, and billet type validation
- Decrement billet quantity after purchase in BilletOrderService::generateOrderTickets - Block purchase when stock is exhausted (quantity <= 0) in OrderController::buildOrderItems - Add organizer email notification on new order (order_notification_orga template) - Add organizer email notification on cancel/refund (order_cancelled_orga template) - Add ExpirePendingOrdersCommand (app:orders:expire-pending) cron every 5min via Ansible - Cancels pending orders older than 30 minutes, restores stock, invalidates tickets - Includes BilletBuyerRepository::findExpiredPending query method - 3 unit tests covering: no expired orders, stock restoration, unlimited billets - Add payment_intent.payment_failed webhook: cancels order, logs audit, emails buyer - Add charge.refunded webhook: sets order to refunded, invalidates tickets, notifies orga and buyer - Validate billet type (billet/reservation_brocante/vote) against organizer offer - getAllowedBilletTypes: gratuit=billet only, basic/sur-mesure=all types - Server-side validation in hydrateBilletFromRequest, UI filtering in templates - Update TASK_CHECKUP.md: all Billetterie & Commandes items now complete Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
## A faire
|
||||
|
||||
### Billetterie & Commandes
|
||||
- [ ] Décrémenter la quantité disponible du billet après achat (stock management)
|
||||
- [ ] Empêcher l'achat si stock épuisé (vérification côté serveur)
|
||||
- [ ] Ajouter un email de notification à l'orga quand une commande est passée
|
||||
- [ ] Ajouter un email de notification à l'orga quand une commande est annulée/remboursée
|
||||
- [ ] Gérer l'expiration des commandes pending (cron pour annuler après X minutes)
|
||||
- [ ] Ajouter le webhook `payment_intent.payment_failed` pour gérer les échecs
|
||||
- [ ] Ajouter le webhook `charge.refunded` pour mettre à jour le statut automatiquement
|
||||
- [ ] Vérifier le type de billet (billet/reservation_brocante/vote) selon l'offre orga à la création
|
||||
- [x] Décrémenter la quantité disponible du billet après achat (stock management)
|
||||
- [x] Empêcher l'achat si stock épuisé (vérification côté serveur)
|
||||
- [x] Ajouter un email de notification à l'orga quand une commande est passée
|
||||
- [x] Ajouter un email de notification à l'orga quand une commande est annulée/remboursée
|
||||
- [x] Gérer l'expiration des commandes pending (cron pour annuler après X minutes)
|
||||
- [x] Ajouter le webhook `payment_intent.payment_failed` pour gérer les échecs
|
||||
- [x] Ajouter le webhook `charge.refunded` pour mettre à jour le statut automatiquement
|
||||
- [x] Vérifier le type de billet (billet/reservation_brocante/vote) selon l'offre orga à la création
|
||||
|
||||
### Invitations Organisateur
|
||||
- [x] Bloquer l'envoi d'invitations (billets) si Stripe n'est pas validé — non nécessaire car invitations = gratuit (pas de paiement Stripe)
|
||||
|
||||
Reference in New Issue
Block a user