src/Controller/Frontend/CotisationController.php line 163

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Frontend;
  3. use App\Controller\BaseController;
  4. use App\Entity\Cotisation;
  5. use App\Entity\CotisationNotification;
  6. use App\Entity\CotisationStatut;
  7. use App\Entity\Entreprise;
  8. use App\Entity\FormTemplate;
  9. use App\Entity\ParamCotisation;
  10. use App\Entity\PaymentType;
  11. use App\Entity\Order;
  12. use App\Form\Frontend\CustomerCotisationType;
  13. use App\Form\Frontend\PaymentSelectorType;
  14. use App\Model\Paygate;
  15. use App\Repository\CotisationNotificationRepository;
  16. use App\Repository\CotisationRepository;
  17. use App\Repository\ParameterRepository;
  18. use App\Service\FormService;
  19. use App\Service\MailerService;
  20. use App\Service\SaleService;
  21. use DateTime;
  22. use Doctrine\ORM\EntityManagerInterface;
  23. use Knp\Component\Pager\PaginatorInterface;
  24. use Symfony\Component\HttpFoundation\RedirectResponse;
  25. use Symfony\Component\HttpFoundation\Request;
  26. use Symfony\Component\HttpFoundation\Response;
  27. use Symfony\Component\Routing\Annotation\Route;
  28. use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
  29. use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
  30. use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
  31. class CotisationController extends BaseController
  32. {
  33.     public function __construct(
  34.         private TokenStorageInterface  $tokenStorage,
  35.         private EntityManagerInterface $em,
  36.         private MailerService $mailerService,
  37.     )
  38.     {
  39.     }
  40.     #[Route('/cotisations'name'customer_cotisation_list'methods: ['GET'])]
  41.     public function list(Request $requestPaginatorInterface $paginatorCotisationRepository $cotisationRepository): Response
  42.     {
  43.         $query $cotisationRepository->findAllQuery($this->getUser());
  44.         $cotisations $paginator->paginate(
  45.             $query,
  46.             $request->query->getInt('page'1),
  47.             self::ITEM_PER_PAGE
  48.         );
  49.         return $this->render('frontend/cotisation/index.html.twig', [
  50.             'controller_name' => 'CotisationController',
  51.             'menu' => 'my-space',
  52.             'submenu' => 'my-cotisation',
  53.             'cotisations' => $cotisations
  54.         ]);
  55.     }
  56.     #[Route('/cotisations/{id}/show'name'customer_cotisation_show'methods: ['GET'])]
  57.     public function show(Cotisation $cotisationParameterRepository $parameterRepository): Response
  58.     {
  59.         $paymentInfos $parameterRepository->findBy([
  60.             'subtype' => 'banque'
  61.         ], [
  62.             'paramOrder' => 'ASC'
  63.         ]);
  64.         $rib $parameterRepository->findOneBy([
  65.             'subtype' => 'banque',
  66.             'tag' => 'sale.bank.rib',
  67.         ]);
  68.         return $this->render('frontend/cotisation/show.html.twig', [
  69.             'controller_name' => 'CotisationController',
  70.             'menu' => 'my-space',
  71.             'submenu' => 'my-cotisation',
  72.             'cotisation' => $cotisation,
  73.             'paymentInfos' => $paymentInfos,
  74.             'rib' => $rib,
  75.         ]);
  76.     }
  77.     #[Route('/cotisations/cancel-notification/{id}'name'customer_cotisation_notification_cancel'methods: ['GET'])]
  78.     public function cancelCotisationNotification(
  79.         CotisationNotification           $cotisationNotification,
  80.         CotisationNotificationRepository $repository,
  81.         Request                          $request
  82.     ): RedirectResponse
  83.     {
  84.         $cotisationNotification->setStatus(CotisationNotification::STATUS_CANCELED);
  85.         $repository->save($cotisationNotificationtrue);
  86.         $referer $request->headers->get('referer');
  87.         return $this->redirect($referer);
  88.     }
  89.     #[Route('/cotisations/cotisation-type/{cotisationId}'name'customer_cotisation_step_one'methods: ['GET'])]
  90.     public function selectCotisationType(?int $cotisationId null): Response
  91.     {
  92.         if (!is_null($cotisationId)) {
  93.             $cotisation $this->em->getRepository(Cotisation::class)->find($cotisationId);
  94.             $this->em->remove($cotisation);
  95.             $this->em->flush();
  96.         }
  97.         /** @var Entreprise $firm */
  98.         $firm $this->getUser()->getContact()->getFirm();
  99.         $countCotisationYoungMember $this->em->getRepository(Cotisation::class)->countCotisationByTagType($firm'young_member');
  100.         /** @var Cotisation $lastCotisation */
  101.         $lastCotisation $this->em->getRepository(Cotisation::class)->findLastCotisation($firm);
  102.         $currentYear = (int)(new DateTime())->format('Y');
  103.         if ($firm->getFirmType()->getTag() === 'transporter') {
  104.             $cotisationType $this->em->getRepository(ParamCotisation::class)->findOneBy([
  105.                 'tag' => 'transporter'
  106.             ]);
  107.             return $this->redirectToRoute('customer_cotisation_step_two', ['id' => $cotisationType->getId()]);
  108.         }
  109.         $cotisationTypes $this->em->getRepository(ParamCotisation::class)->findBy([
  110.             'isEnabled' => true,
  111.             'hideInMember' => false
  112.         ], [
  113.             'cotisationOrder' => 'ASC'
  114.         ]);
  115.         foreach ($cotisationTypes as $key => $cotisationType) {
  116.             if (
  117.                 $cotisationType->getTag() === 'transporter' ||
  118.                 ($cotisationType->getTag() === 'young_member' && $countCotisationYoungMember >= 3) ||
  119.                 (!is_null($lastCotisation) && $cotisationType->getTag() === 'new_member' && ($currentYear $lastCotisation->getYear() <= 3))
  120.             ) {
  121.                 unset($cotisationTypes[$key]);
  122.             }
  123.         }
  124.         return $this->render('frontend/cotisation/cotisation_selection.html.twig', [
  125.             'controller_name' => 'CotisationController',
  126.             'menu' => 'my-space',
  127.             'submenu' => 'my-cotisation',
  128.             'displayAlertCotisation' => false,
  129.             'cotisationTypes' => $cotisationTypes
  130.         ]);
  131.     }
  132.     #[Route('/cotisations/{id}/cotisation-data/{cotisationId}'name'customer_cotisation_step_two'methods: ['GET''POST'])]
  133.     public function cotisationData(
  134.         ParamCotisation $paramCotisation,
  135.         Request         $request,
  136.         ?int            $cotisationId null
  137.     ): Response
  138.     {
  139.         /** @var Entreprise $firm */
  140.         $firm $this->getUser()->getContact()->getFirm();
  141.         $now = new DateTime();
  142.         if (is_null($cotisationId)) {
  143.             $cotisation = new Cotisation();
  144.             $cotisation
  145.                 ->setEntreprise($firm)
  146.                 ->setYear($this->getYear($firm))
  147.             ;
  148.             $countCotisationYoungMember $this->em->getRepository(Cotisation::class)->countCotisationByTagType($firm'young_member');
  149.             $firstCotisationYoungMemberDate $this->em->getRepository(Cotisation::class)->findCotisationDateByTagType($firm'young_member');
  150.         } else {
  151.             $cotisation $this->em->getRepository(Cotisation::class)->find($cotisationId);
  152.             $countCotisationYoungMember $this->em->getRepository(Cotisation::class)->countCotisationByTagType($firm'young_member') - 1;
  153.             $firstCotisationYoungMemberDate null;
  154.         }
  155.         $form $this->createForm(CustomerCotisationType::class, $cotisation, [
  156.             'cotisation_tag' => $paramCotisation->getTag(),
  157.             'cotisation_count_young_member' => (int)$countCotisationYoungMember
  158.         ]);
  159.         $form->handleRequest($request);
  160.         if ($form->isSubmitted() && $form->isValid()) {
  161.             $cotisation
  162.                 ->setYear($this->getYear($firm))
  163.                 ->setEntreprise($firm)
  164.                 ->setCotisationStatut($this->em->getRepository(CotisationStatut::class)->find(4))
  165.                 ->setCotisationType($paramCotisation)
  166.                 ->setMontantCotisation($form->get('priceTtc')->getData())
  167.                 ->setRevenue($form->get('revenue')->getData())
  168.                 ->setRevenueDate($form->get('revenueDate')->getData())
  169.                 ->setOptionImportExport($form->get('optionImportExport')->getData())
  170.                 ->setOptionMapa($form->get('optionMapa')->getData())
  171.                 ->setPriceHt($form->get('priceHt')->getData())
  172.                 ->setPriceVat($form->get('priceVat')->getData())
  173.                 ->setPriceTtc($form->get('priceTtc')->getData())
  174.                 ->setInternalLicence($form->get('internalLicence')->getData())
  175.                 ->setCommunityLicence($form->get('communityLicence')->getData())
  176.                 ->setPriceDepartmentPart($form->get('priceDepartmentPart')->getData())
  177.                 ->setPriceNationalPart($form->get('priceNationalPart')->getData())
  178.                 ->setPriceNationalPartCalculated($form->get('priceNationalPartCalculated')->getData())
  179.                 ->setPriceOptionImportExport($form->get('priceOptionImportExport')->getData())
  180.                 ->setPriceOptionMapa($form->get('priceOptionMapa')->getData())
  181.                 ->setYoungMemberYearNumber($form->get('youngMemberYearNumber')->getData());
  182.             $notification $this->em->getRepository(CotisationNotification::class)->findOneBy([
  183.                 'firm' => $firm,
  184.                 'status' => CotisationNotification::STATUS_ACTIVE
  185.             ]);
  186.             if (!is_null($notification)) {
  187.                 $notification->setStatus(CotisationNotification::STATUS_PERFORMED);
  188.                 $this->em->persist($notification);
  189.             }
  190.             $this->em->persist($cotisation);
  191.             $this->em->flush();
  192.             $this->addFlash(
  193.                 'success',
  194.                 'Enregistrement effectué avec succès'
  195.             );
  196.             if ($cotisationId !== null) {
  197.                 return $this->redirectToRoute('customer_cotisation_show', ['id' => $cotisation->getId()]);
  198.             } else {
  199.                 return $this->redirectToRoute('customer_cotisation_step_three', ['id' => $cotisation->getId()]);
  200.             }
  201.         }
  202.         return $this->renderForm('frontend/cotisation/cotisation_info.html.twig', [
  203.             'controller_name' => 'CotisationController',
  204.             'menu' => 'my-space',
  205.             'submenu' => 'my-cotisation',
  206.             'paramCotisation' => $paramCotisation,
  207.             'countYoungMemberCotisation' => (int)$countCotisationYoungMember 1,
  208.             'firstCotisationDate' => $firstCotisationYoungMemberDate,
  209.             'displayAlertCotisation' => false,
  210.             'cotisation' => $cotisation,
  211.             'form' => $form,
  212.             'firm' => $firm
  213.         ]);
  214.     }
  215.     public function getYear(Entreprise $entreprise): int {
  216.         $now = new DateTime();
  217.         $year = (int)$now->format('Y');
  218.         $lastCotisationYear 0;
  219.         foreach ($entreprise->getCotisations() as $previousCotisation){
  220.             if(
  221.                 $previousCotisation->getAssocietedOrder()?->getStatus() === Order::STATUS_PAID
  222.                 && $previousCotisation->getYear() > $lastCotisationYear
  223.             ){
  224.                 $lastCotisationYear $previousCotisation->getYear();
  225.             }
  226.         }
  227.         $lastSaturdayOfJanuary = new DateTime('third Saturday of January ' $year);
  228.         if($now $lastSaturdayOfJanuary && $lastCotisationYear < ($year 1)) {
  229.             return $year 1;
  230.         }
  231.         return $year;
  232.     }
  233.     #[Route('/cotisations/{id}/cotisation-payment'name'customer_cotisation_step_three'methods: ['GET''POST'])]
  234.     public function cotisationPayment(
  235.         Cotisation    $cotisation,
  236.         Request       $request,
  237.         SaleService   $saleService,
  238.         FormService   $formService,
  239.         string        $bnpMerchantId,
  240.         string        $bnpBlowfishPassword,
  241.         string        $bnpHmacPassword,
  242.     ): Response
  243.     {
  244.         /** @var Entreprise $firm */
  245.         $firm $this->getUser()->getContact()->getFirm();
  246.         $paymentTypes $this->em->getRepository(PaymentType::class)->findBy([
  247.             'isEnabled' => true
  248.         ]);
  249.         $form $this->createForm(PaymentSelectorType::class);
  250.         $form->handleRequest($request);
  251.         if ($form->isSubmitted() && $form->isValid()) {
  252.             if ($form->get('paymentType')->getData()->getId() === 1) {
  253.                 $order $saleService->buildOrderFromCotisation(
  254.                     $this->getUser()->getContact()->getFirm(),
  255.                     $cotisation,
  256.                     $form->get('paymentType')->getData()
  257.                 );
  258.                 $order->setStatus(Order::STATUS_WAITING_PAYMENT);
  259.                 $order->setUser($this->getUser());
  260.                 $this->em->persist($cotisation);
  261.                 $this->em->persist($order);
  262.                 $this->em->flush();
  263.                 $Currency "EUR";
  264.                 $amount round($order->getTotalAmount(), 2);
  265.                 $amount intval($amount 100);
  266.                 $urlSuccess $this->generateUrl('customer_cotisation_bank_success_response', ['id' => $order->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
  267.                 $urlFailure $this->generateUrl('customer_cotisation_bank_failure_response', ['id' => $order->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
  268.                 $urlNotify $this->generateUrl('customer_cotisation_bank_notify_response', ['id' => $order->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
  269.                 $urlBack $this->generateUrl('customer_cotisation_bank_back_response', ['id' => $order->getId()], UrlGeneratorInterface::ABSOLUTE_URL);
  270.                 //Creating MAC value
  271.                 $myPayGate = new Paygate();
  272.                 $MAC $myPayGate->ctHMAC(""$order->getNumber(), $bnpMerchantId$amount$Currency$bnpHmacPassword);
  273.                 // format data which is to be transmitted - required
  274.                 $pMerchantID "MerchantID={$bnpMerchantId}";
  275.                 $pMsgVer "MsgVer=2.0";
  276.                 $pTransID "TransID={$order->getNumber()}";
  277.                 // pRefNr a string of 12 characters based on order id
  278.                 $refNr str_pad($order->getId(), 12"0"STR_PAD_LEFT);
  279.                 $pRefNr "RefNr={$refNr}";
  280.                 $pAmount "Amount={$amount}";
  281.                 $pCurrency "Currency=$Currency";
  282.                 $pMAC "MAC=$MAC";
  283.                 $pURLSuccess "URLSuccess={$urlSuccess}";
  284.                 $pURLFailure "URLFailure={$urlFailure}";
  285. //                $pResponse = "Response=encrypt";
  286.                 $pURLNotify "URLNotify={$urlNotify}";
  287.                 $pUserData "UserData=Commande {$order->getNumber()}";
  288.                 $pCapture "Capture=AUTO";
  289.                 $pOrderDesc "OrderDesc={$order->getNumber()}";
  290.                 $pReqID "ReqID={$order->getNumber()}";
  291.                 $pURLBack "URLBack={$urlBack}";
  292. //                $pResponse = "Response=$Response";
  293.                 $query = [
  294.                     $pMerchantID,
  295.                     $pMsgVer,
  296.                     $pTransID,
  297.                     $pRefNr,
  298.                     $pAmount,
  299.                     $pCurrency,
  300.                     $pMAC,
  301.                     $pURLSuccess,
  302.                     $pURLFailure,
  303. //                    $pResponse,
  304.                     $pURLNotify,
  305.                     $pUserData,
  306.                     $pCapture,
  307.                     $pOrderDesc,
  308.                     $pReqID,
  309.                     $pURLBack,
  310.                 ];
  311.                 $order->setBankRequest([
  312.                     'MerchantID' => $bnpMerchantId,
  313.                     'MsgVer' => "2.0",
  314.                     'TransID' => $order->getNumber(),
  315.                     'RefNr' => $refNr,
  316.                     'Amount' => $amount,
  317.                     'Currency' => $Currency,
  318.                     'MAC' => $MAC,
  319.                     'URLSuccess' => $urlSuccess,
  320.                     'URLFailure' => $urlFailure,
  321. //                    'Response' => 'encrypt',
  322.                     'URLNotify' => $urlNotify,
  323.                     'UserData' => "Commande {$order->getNumber()}",
  324.                     'Capture' => "Auto",
  325.                     'OrderDesc' => "{$order->getNumber()}",
  326.                     'ReqID' => "{$order->getNumber()}",
  327.                     'URLBack' => $urlBack,
  328.                 ]);
  329.                 // building the string MerchantID, Len and Data (encrypted)
  330.                 $plaintext join("&"$query);
  331.                 $Len strlen($plaintext);  // Length of the plain text string
  332.                 // encrypt plaintext
  333.                 $Data $myPayGate->ctEncrypt($plaintext$Len$bnpBlowfishPassword);
  334.                 $this->em->persist($cotisation);
  335.                 $this->em->persist($order);
  336.                 $this->em->flush();
  337.                 return $this->redirect(
  338.                     'https://paymentpage.axepta.bnpparibas/payssl.aspx'
  339.                     '?MerchantID=' $bnpMerchantId
  340.                     '&Len=' $Len
  341.                     '&Data=' $Data
  342.                 );
  343.             } else {
  344.                 $order $saleService->buildOrderFromCotisation(
  345.                     $this->getUser()->getContact()->getFirm(),
  346.                     $cotisation,
  347.                     $form->get('paymentType')->getData()
  348.                 );
  349.                 $cotisation->setAssocietedOrder($order);
  350.                 $this->em->persist($cotisation);
  351.                 $this->em->persist($order);
  352.                 $this->em->flush();
  353.                 $this->addFlash(
  354.                     'success',
  355.                     'Votre cotisation est bien enregistrée en attente de votre virement.'
  356.                 );
  357.                 $this->mailerService->sendCotisationNotificationForAdmin($cotisation);
  358.             }
  359.             /** @var FormTemplate $formTemplate */
  360.             $formTemplate $this->em->getRepository(FormTemplate::class)->findCotisationFormTemplate();
  361.             if (is_null($formTemplate)) {
  362.                 return $this->redirectToRoute('customer_cotisation_show', ['id' => $cotisation->getId()]);
  363.             } else {
  364.                 $formUser $formService->buildFormForUser($this->getUser(), $formTemplate);
  365.                 return $this->redirectToRoute('customer_edit_form', [
  366.                     'id' => $formUser->getId(),
  367.                     'cotisationId' => $cotisation->getId()
  368.                 ]);
  369.             }
  370.         }
  371.         return $this->renderForm('frontend/cotisation/cotisation_payment.html.twig', [
  372.             'controller_name' => 'CotisationController',
  373.             'menu' => 'my-space',
  374.             'submenu' => 'my-cotisation',
  375.             'cotisation' => $cotisation,
  376.             'firm' => $firm,
  377.             'paymentTypes' => $paymentTypes,
  378.             'form' => $form
  379.         ]);
  380.     }
  381.     #[Route('/cotisations/bank-response/{id}'name'customer_cotisation_bank_response')]
  382.     public function bankResponse(
  383.         Order   $order,
  384.         Request $request,
  385.         string  $bnpBlowfishPassword,
  386.     ): Response
  387.     {
  388.         return $this->handleBankResponse($order$request$bnpBlowfishPassword);
  389.     }
  390.     #[Route('/cotisation/bank-response/{id}/success'name'customer_cotisation_bank_success_response')]
  391.     public function bankSuccessResponse(
  392.         Order   $order,
  393.         Request $request,
  394.         string  $bnpBlowfishPassword,
  395.     ): Response
  396.     {
  397.         return $this->handleBankResponse(
  398.             $order,
  399.             $request,
  400.             $bnpBlowfishPassword,
  401.             'success'
  402.         );
  403.     }
  404.     #[Route('/cotisation/bank-response/{id}/failure'name'customer_cotisation_bank_failure_response')]
  405.     public function bankFailureResponse(
  406.         Order   $order,
  407.         Request $request,
  408.         string  $bnpBlowfishPassword,
  409.     ): Response
  410.     {
  411.         return $this->handleBankResponse(
  412.             $order,
  413.             $request,
  414.             $bnpBlowfishPassword,
  415.             'failure'
  416.         );
  417.     }
  418.     #[Route('/cotisation/bank-response/{id}/notify'name'customer_cotisation_bank_notify_response')]
  419.     public function bankNotifyResponse(
  420.         Order   $order,
  421.         Request $request,
  422.         string  $bnpBlowfishPassword,
  423.     ): Response
  424.     {
  425.         return $this->handleBankResponse(
  426.             $order,
  427.             $request,
  428.             $bnpBlowfishPassword,
  429.             'notify'
  430.         );
  431.     }
  432.     #[Route('/cotisation/bank-response/{id}/back'name'customer_cotisation_bank_back_response')]
  433.     public function bankBackResponse(
  434.         Order   $order,
  435.         Request $request,
  436.         string  $bnpBlowfishPassword,
  437.     ): Response
  438.     {
  439.         return $this->handleBankResponse(
  440.             $order,
  441.             $request,
  442.             $bnpBlowfishPassword,
  443.             'back'
  444.         );
  445.     }
  446.     private function handleBankResponse(
  447.         Order   $order,
  448.         Request $request,
  449.         string  $bnpBlowfishPassword,
  450.         ?string $type 'null',
  451.     ): Response
  452.     {
  453.         $response array_merge($request->query->all(), $request->request->all());
  454.         $bankResponse $order->setBankResponse($response);
  455.         $bankResponse->setType($type);
  456.         $bankResponse->setStatus($response['Status'] ?? null);
  457.         $this->em->persist($bankResponse);
  458.         $this->em->flush();
  459.         if ($order->getStatus() === Order::STATUS_PAID) {
  460.             return $this->redirectToRoute('customer_cotisation_step_three', ['id' => $order->getCotisation()->getId()]);
  461.         }
  462.         if (isset($response['Data']) && isset($response['Len'])) {
  463.             $myPayGate = new Paygate();
  464.             $plaintext $myPayGate->ctDecrypt($response['Data'], $response['Len'], $bnpBlowfishPassword);
  465.             parse_str($plaintext$temp);
  466.             $response array_merge($response$temp);
  467.         }
  468.         if (null === $this->getUser()) {
  469.             $user $order->getUser();
  470.             if(!$user){
  471.                 $this->redirectToRoute('customer_login');
  472.             }
  473.             $token = new UsernamePasswordToken($order->getUser(), null'main'$order->getUser()->getRoles());
  474.             $this->tokenStorage->setToken($token);
  475.         }
  476.         if (null === $response && ($response['TransID'] ?? null) !== $order->getBankRequest()['TransID']) {
  477.             return $this->redirectToRoute('customer_cotisation_show', ['id' => $order->getCotisation()->getId()]);
  478.         }
  479.         if (in_array($response['Status'] ?? '', ['OK''AUTHORIZED'])) {
  480.             $this->em->persist($bankResponse);
  481.             if($order->getStatus() !== Order::STATUS_PAID){
  482.                 $order->setStatus(Order::STATUS_PAID);
  483.                 $this->em->persist($order);
  484.             }
  485.             $cotisation $order->getCotisation();
  486.             if($cotisation->getCotisationStatut()->getNom() !== 'payé'){
  487.                 $cotisationStatut $this->em->getRepository(CotisationStatut::class)->findOneByNom('payé');
  488.                 $cotisation->setCotisationStatut($cotisationStatut);
  489.                 $cotisation->setDatePaiement(new DateTime());
  490.                 $this->em->persist($cotisation);
  491.                 $this->mailerService->sendCotisationNotificationForAdmin($cotisation);
  492.             }
  493.             $this->em->flush();
  494.             $this->addFlash(
  495.                 'success',
  496.                 'Votre cotisation est bien enregistrée et le paiement à bien été pris en compte.'
  497.             );
  498.             return $this->redirectToRoute('customer_cotisation_show', ['id' => $cotisation->getId()]);
  499.         }
  500.         $this->addFlash(
  501.             'error',
  502.             'Le paiement a échoué.'
  503.         );
  504.         $order->setStatus(Order::STATUS_CANCELED);
  505.         $this->em->persist($order);
  506.         $this->em->flush();
  507.         return $this->redirectToRoute('customer_cotisation_step_three', ['id' => $order->getCotisation()->getId()]);
  508.     }
  509. }