Details.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Paypal\Controller\Adminhtml\Paypal\Reports;
  8. class Details extends \Magento\Paypal\Controller\Adminhtml\Paypal\Reports
  9. {
  10. /**
  11. * Authorization level of a basic admin session
  12. *
  13. * @see _isAllowed()
  14. */
  15. const ADMIN_RESOURCE = 'Magento_Paypal::paypal_settlement_reports_view';
  16. /**
  17. * View transaction details action
  18. *
  19. * @return void
  20. */
  21. public function execute()
  22. {
  23. $rowId = $this->getRequest()->getParam('id');
  24. $row = $this->_rowFactory->create()->load($rowId);
  25. if (!$row->getId()) {
  26. $this->_redirect('adminhtml/*/');
  27. return;
  28. }
  29. $this->_coreRegistry->register('current_transaction', $row);
  30. $this->_initAction();
  31. $this->_view->getPage()->getConfig()->getTitle()->prepend(__('View Transaction'));
  32. $this->_addContent(
  33. $this->_view->getLayout()->createBlock(
  34. \Magento\Paypal\Block\Adminhtml\Settlement\Details::class,
  35. 'settlementDetails'
  36. )
  37. );
  38. $this->_view->renderLayout();
  39. }
  40. }