getRequest()->getParam('creditmemo_id'); if (!$creditmemoId) { return; } $this->_objectManager->create('Magento\Sales\Api\CreditmemoManagementInterface') ->notify($creditmemoId); $this->messageManager->addSuccess(__('You sent the message.')); $resultRedirect = $this->resultRedirectFactory->create(); $resultRedirect->setPath('sales/order_creditmemo/view', ['creditmemo_id' => $creditmemoId]); return $resultRedirect; } }