update redirect to control on redirect to service

This commit is contained in:
Cyprian Beauvois 2019-07-16 18:15:10 +02:00
parent ca5cae597a
commit a4d512c55f
1 changed files with 7 additions and 1 deletions

View File

@ -33,7 +33,13 @@ class BillingController extends AbstractController
if ($event->type == 'checkout.session.completed') { if ($event->type == 'checkout.session.completed') {
$session = $event->data->object; $session = $event->data->object;
return $this->redirectToRoute($this->container->getParameter('payment_confirmation_route'), (array) $session); $serviceToCall = $this->container->getParameter('payment_confirmation_service');
$srv = new $serviceToCall();
$srv->handlePayment($session);
return $this->json("OK", 200);
} }
} catch(\UnexpectedValueException $e) { } catch(\UnexpectedValueException $e) {