/**
  * Whether parent transaction should be closed
  *
  * @param Payment $orderPayment
  * @return bool
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 protected function shouldCloseParentTransaction(Payment $orderPayment)
 {
     return !(bool) $orderPayment->getCreditmemo()->getInvoice()->canRefund();
 }
 /**
  * {@inheritdoc}
  */
 public function getCreditmemo()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getCreditmemo');
     if (!$pluginInfo) {
         return parent::getCreditmemo();
     } else {
         return $this->___callPlugins('getCreditmemo', func_get_args(), $pluginInfo);
     }
 }