public function execute(Event $event)
 {
     /* @var \Hatimeria\DotpayBundle\Request\PremiumTc $request */
     $request = $event->getSubject();
     if (!$request instanceof PremiumTc) {
         return;
     }
     $configuration = $this->sm->getConfiguration();
     $payment = $this->sm->createSmsPayment();
     $payment->setCode($request->code);
     $payment->setAmount($configuration[$request->number]);
     $this->sm->updateSmsPayment($payment);
     $event->setResult(true);
 }
 public function execute(Event $event)
 {
     /* @var \Hatimeria\DotpayBundle\Response\Response $response */
     $response = $event->getSubject();
     if (!$response instanceof DotpayResponse) {
         return;
     }
     $payment = $this->pm->findDotpayPaymentByControl($response->getControl());
     if ($payment->isFinished()) {
         return $event->setResult(false);
     }
     if (!$response->isStatusMade()) {
         //@todo Add code for other status
         throw new \Exception('Only status MADE is implemented :/');
     }
     //@todo save transcation id
     $this->pm->executeDotpayPayment($payment);
     $event->setResult(true);
 }