update redirect to control on redirect to service

This commit is contained in:
2019-07-16 18:15:10 +02:00
parent ca5cae597a
commit a4d512c55f

View File

@@ -33,7 +33,13 @@ class BillingController extends AbstractController
if ($event->type == 'checkout.session.completed') {
$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) {