allow possibility for payment module to return a response

This commit is contained in:
Manuel Raynaud
2014-02-06 12:24:52 +01:00
parent c52ec3dbaf
commit a6f0a38a7b
7 changed files with 87 additions and 33 deletions

View File

@@ -176,7 +176,11 @@ class Module extends BaseAction implements EventSubscriberInterface
$paymentModuleInstance = $this->container->get(sprintf('module.%s', $paymentModule->getCode()));
$paymentModuleInstance->pay($order);
$response = $paymentModuleInstance->pay($order);
if (null !== $response && $response instanceof \Thelia\Core\HttpFoundation\Response) {
$event->setResponse($response);
}
}
/**