You've already forked symfony-billing
update redirect to control on redirect to service
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user