62718b594288e47527f38dc2a09172cd01254374
src/Service/StripePriceService.php (nouveau): - Utilise Stripe SDK v20 (StripeClient) avec STRIPE_SK - syncPrice(): pour chaque PriceAutomatic, cree ou retrouve le produit Stripe via metadata price_auto_type, puis cree le Stripe Price (unique et/ou recurrent selon monthPrice) - ensureProduct(): cherche un produit existant par metadata, le cree sinon, met a jour nom/description si modifies - createStripePrice(): cree un prix Stripe en centimes, avec tax_behavior=exclusive, recurring si monthPrice > 0 avec interval=month (ou year si period >= 12) - updateStripePriceIfNeeded(): si le montant a change, archive l'ancien prix Stripe et en cree un nouveau (Stripe ne permet pas de modifier le montant d'un prix existant) - syncAll(): synchronise tous les tarifs, retourne synced + errors src/Service/TarificationService.php: - Injection optionnelle de StripePriceService - ensureDefaultPrices(): apres creation des tarifs, sync automatique avec Stripe (cree produits + prix) en plus de Meilisearch src/Controller/Admin/TarificationController.php: - edit(): apres mise a jour d'un tarif, sync automatique avec Stripe (cree/archive/recree les prix si montant change) et Meilisearch - Flash d'erreur si Stripe echoue, les modifs locales sont sauvegardees src/Controller/Admin/SyncController.php: - Nouvelle route POST /admin/sync/stripe/prices: synchronise tous les tarifs avec Stripe via StripePriceService::syncAll() templates/admin/sync/index.html.twig: - Section "Stripe" avec bouton "Synchroniser Stripe" (violet) pour les tarifs, avec confirmation avant execution - Section Meilisearch tarifs renommee "Tarifs - Meilisearch" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Description
No description provided
Languages
PHP
66.2%
Twig
28.7%
JavaScript
4%
Jinja
0.5%
Makefile
0.3%
Other
0.2%