/**
  * {@inheritdoc}
  */
 public function refundPayment()
 {
     if (!$this->getPayment()) {
         throw new \LogicException('Trying to refund a non-existing payment. A payment must be set trough self::setPayment() first.');
     }
     $this->eventDispatcher->preRefundPayment($this->getPayment());
     $this->doRefundPayment();
     return $this->getPaymentRefundResult();
 }