/**
  * {@inheritdoc}
  */
 public function executePayment()
 {
     if (!$this->getPayment()) {
         throw new \LogicException('Trying to execute a non-existing payment. A payment must be set trough self::setPayment() first.');
     }
     $this->eventDispatcher->preExecutePayment($this->getPayment());
     $this->payment->setPaymentStatus($this->paymentStatusManager->createInstance('payment_pending'));
     $this->doExecutePayment();
     $this->getPayment()->save();
     return $this->getPaymentExecutionResult();
 }