update redirect to control on redirect to service
This commit is contained in:
parent
ca5cae597a
commit
a4d512c55f
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue