add debug to try/catch block Controller

This commit is contained in:
Cyprian Beauvois 2019-07-16 16:04:23 +02:00
parent 4795250b8c
commit 6d506cbdd5
1 changed files with 12 additions and 1 deletions

View File

@ -3,10 +3,21 @@
namespace Bluesquare\BillingBundle\Controller; namespace Bluesquare\BillingBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Psr\Log\LoggerInterface;
class BillingController extends AbstractController class BillingController extends AbstractController
{ {
public function webhook(LoggerInterface $logger) private $logger;
private $container;
public function __construct(ContainerInterface $container, LoggerInterface $logger)
{
$this->logger = $logger;
$this->container = $container;
}
public function webhook()
{ {
\Stripe\Stripe::setApiKey($this->getParameter('stripe_api_key_secret')); \Stripe\Stripe::setApiKey($this->getParameter('stripe_api_key_secret'));