diff --git a/ansible/playbook.yml b/ansible/playbook.yml index bfc986b..5c3328b 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -87,6 +87,7 @@ VAULT_TOKEN=hvs.QLpUdiptXtSPo5Qf7i2nn2Xz MAILER_DSN=ses+smtp://AKIAWTT2T22CWBRBBDYN:BBdgb6KxRQ8mNcpWFJsZCJxbSGNdgLhKFiITMErfBlQP@default?region=eu-west-3 PATH_URL=https://intranet.ludikevent.fr + STRIPE_BASEURL=https://intranet.ludikevent.fr dest: "{{ path }}/.env.local" when: ansible_os_family == "Debian" @@ -214,6 +215,13 @@ minute: "*/5" job: "php {{ path }}/bin/console app:search" user: root + - name: "Cron Task Search" + ansible.builtin.cron: + name: "Intranet Ludikevent - Stripe" + minute: "0" + hour: "1" + job: "php {{ path }}/bin/console app:stripe:sync" + user: root - name: "Cron Task Search" ansible.builtin.cron: name: "Intranet Ludikevent - Backup" diff --git a/src/Controller/Dashboard/CustomerController.php b/src/Controller/Dashboard/CustomerController.php index d9c0e7f..cef075c 100644 --- a/src/Controller/Dashboard/CustomerController.php +++ b/src/Controller/Dashboard/CustomerController.php @@ -6,6 +6,7 @@ use App\Entity\Customer; use App\Form\CustomerType; use App\Logger\AppLogger; use App\Repository\CustomerRepository; +use App\Service\Search\Client; use Doctrine\ORM\EntityManagerInterface; use Knp\Component\Pager\PaginatorInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; @@ -44,7 +45,7 @@ class CustomerController extends AbstractController ]); } #[Route(path: '/crm/customer/add', name: 'app_crm_customer_add', methods: ['GET', 'POST'])] - public function add(Request $request, EntityManagerInterface $entityManager): Response + public function add(Request $request, EntityManagerInterface $entityManager,\App\Service\Stripe\Client $client): Response { $this->appLogger->record('VIEW', 'Consultation de la page de création client'); @@ -58,6 +59,7 @@ class CustomerController extends AbstractController $entityManager->persist($customer); $entityManager->flush(); + $client->createCustomer($customer); // 2. Log de l'action de création $this->appLogger->record('CREATE', sprintf( 'Nouveau client créé : %s %s (Type: %s)',