/**
  * InvalidOperation constructor.
  *
  * @param OperationInterface $operation
  * @param string             $message
  * @param int                $code
  * @param Exception          $previous
  */
 public function __construct($operation, $message = '', $code = 0, Exception $previous = null)
 {
     $this->operation = $operation;
     $miraklId = $operation->getMiraklId() ?: 'operateur';
     parent::__construct($message ?: "This operation is invalid [{$miraklId}, {$operation->getAmount()}\n                , {$operation->getCycleDate()->format('Y-m-d')}]", $code, $previous);
 }
 protected function getData(OperationInterface $operation)
 {
     return array('miraklId' => $operation->getMiraklId(), 'amount' => round($operation->getAmount(), 2), 'hipayId' => $operation->getHipayId(), 'cycleDate' => $operation->getCycleDate()->format('Y-m-d'), 'cycleDateTime' => $operation->getCycleDate()->format('Y-m-d H:i:s'), 'cycleTime' => $operation->getCycleDate()->format('H:i:s'), 'date' => date('Y-m-d'), 'datetime' => date('Y-m-d H:i:s'), 'time' => date('H:i:s'));
 }