From f61619ce27b935822692a656e466fa0e9ac9b9bf Mon Sep 17 00:00:00 2001 From: Can Demiralp Date: Mon, 3 Feb 2025 13:58:53 +0100 Subject: [PATCH] [EPC-9177] Refactor class names and implement comment modal --- ...Notice.php => WebhookRemovalJobNotice.php} | 10 +++--- ...ider.php => ProcessedWebhooksProvider.php} | 10 +++--- ...face.php => WebhooksProviderInterface.php} | 4 +-- ...ations.php => RemoveProcessedWebhooks.php} | 10 +++--- Helper/Config.php | 16 ++++----- Model/Comment/WebhookRemovalNotice.php | 35 +++++++++++++++++++ ...st.php => WebhookRemovalJobNoticeTest.php} | 16 ++++----- .../ProcessedOldNotificationsProviderTest.php | 12 +++---- ...st.php => RemoveProcessedWebhooksTest.php} | 20 +++++------ Test/Unit/Helper/ConfigTest.php | 8 ++--- .../system/adyen_testing_performance.xml | 19 +++++++--- etc/config.xml | 4 +-- etc/crontab.xml | 2 +- etc/di.xml | 2 +- .../layout/adyen_notifications_overview.xml | 6 ++-- .../notification/cleanup_job_notice.phtml | 22 ------------ .../webhook_removal_job_notice.phtml | 28 +++++++++++++++ 17 files changed, 136 insertions(+), 88 deletions(-) rename Block/Adminhtml/Notification/{CleanupJobNotice.php => WebhookRemovalJobNotice.php} (70%) rename Cron/Providers/{ProcessedOldNotificationsProvider.php => ProcessedWebhooksProvider.php} (80%) rename Cron/Providers/{NotificationsProviderInterface.php => WebhooksProviderInterface.php} (78%) rename Cron/{CleanupNotifications.php => RemoveProcessedWebhooks.php} (89%) create mode 100644 Model/Comment/WebhookRemovalNotice.php rename Test/Unit/Block/Adminhtml/Notification/{CleanupJobNoticeTest.php => WebhookRemovalJobNoticeTest.php} (71%) rename Test/Unit/Cron/{CleanupNotificationsTest.php => RemoveProcessedWebhooksTest.php} (83%) delete mode 100644 view/adminhtml/templates/notification/cleanup_job_notice.phtml create mode 100644 view/adminhtml/templates/notification/webhook_removal_job_notice.phtml diff --git a/Block/Adminhtml/Notification/CleanupJobNotice.php b/Block/Adminhtml/Notification/WebhookRemovalJobNotice.php similarity index 70% rename from Block/Adminhtml/Notification/CleanupJobNotice.php rename to Block/Adminhtml/Notification/WebhookRemovalJobNotice.php index 1c63e9c63..a1c77267d 100644 --- a/Block/Adminhtml/Notification/CleanupJobNotice.php +++ b/Block/Adminhtml/Notification/WebhookRemovalJobNotice.php @@ -15,7 +15,7 @@ use Magento\Framework\View\Element\Template\Context; use Magento\Theme\Block\Html\Notices; -class CleanupJobNotice extends Notices +class WebhookRemovalJobNotice extends Notices { public function __construct( Context $context, @@ -26,13 +26,11 @@ public function __construct( } /** - * Determines the visibility of the auto notification notice on Adyen Notifications Overview page. - * * @return bool */ - public function isAutoNotificationCleanupEnabled(): bool + public function isProcessedWebhookRemovalEnabled(): bool { - return $this->configHelper->getIsWebhookCleanupEnabled(); + return $this->configHelper->getIsProcessedWebhookRemovalEnabled(); } /** @@ -42,6 +40,6 @@ public function isAutoNotificationCleanupEnabled(): bool */ public function getNumberOfDays(): int { - return $this->configHelper->getRequiredDaysForOldWebhooks(); + return $this->configHelper->getProcessedWebhookRemovalTime(); } } diff --git a/Cron/Providers/ProcessedOldNotificationsProvider.php b/Cron/Providers/ProcessedWebhooksProvider.php similarity index 80% rename from Cron/Providers/ProcessedOldNotificationsProvider.php rename to Cron/Providers/ProcessedWebhooksProvider.php index 52c00be88..9d92c5f49 100644 --- a/Cron/Providers/ProcessedOldNotificationsProvider.php +++ b/Cron/Providers/ProcessedWebhooksProvider.php @@ -3,7 +3,7 @@ * * Adyen Payment module (https://www.adyen.com/) * - * Copyright (c) 2024 Adyen N.V. (https://www.adyen.com/) + * Copyright (c) 2025 Adyen N.V. (https://www.adyen.com/) * See LICENSE.txt for license details. * * Author: Adyen @@ -17,7 +17,7 @@ use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\Exception\LocalizedException; -class ProcessedOldNotificationsProvider implements NotificationsProviderInterface +class ProcessedWebhooksProvider implements WebhooksProviderInterface { public function __construct( private readonly AdyenNotificationRepositoryInterface $adyenNotificationRepository, @@ -28,7 +28,7 @@ public function __construct( public function provide(): array { - $numberOfDays = $this->configHelper->getRequiredDaysForOldWebhooks(); + $numberOfDays = $this->configHelper->getProcessedWebhookRemovalTime(); $dateFrom = date('Y-m-d H:i:s', time() - $numberOfDays * 24 * 60 * 60); @@ -43,7 +43,7 @@ public function provide(): array return $items->getItems(); } catch (LocalizedException $e) { $errorMessage = sprintf( - __('An error occurred while providing notifications older than %s days!'), + __('An error occurred while providing webhooks older than %s days!'), $numberOfDays ); @@ -55,6 +55,6 @@ public function provide(): array public function getProviderName(): string { - return "Adyen processed old webhook notifications"; + return "Adyen processed webhooks provider"; } } diff --git a/Cron/Providers/NotificationsProviderInterface.php b/Cron/Providers/WebhooksProviderInterface.php similarity index 78% rename from Cron/Providers/NotificationsProviderInterface.php rename to Cron/Providers/WebhooksProviderInterface.php index 34f9b0625..07df62c86 100644 --- a/Cron/Providers/NotificationsProviderInterface.php +++ b/Cron/Providers/WebhooksProviderInterface.php @@ -3,7 +3,7 @@ * * Adyen Payment module (https://www.adyen.com/) * - * Copyright (c) 2024 Adyen N.V. (https://www.adyen.com/) + * Copyright (c) 2025 Adyen N.V. (https://www.adyen.com/) * See LICENSE.txt for license details. * * Author: Adyen @@ -11,7 +11,7 @@ namespace Adyen\Payment\Cron\Providers; -interface NotificationsProviderInterface +interface WebhooksProviderInterface { /** * @return array diff --git a/Cron/CleanupNotifications.php b/Cron/RemoveProcessedWebhooks.php similarity index 89% rename from Cron/CleanupNotifications.php rename to Cron/RemoveProcessedWebhooks.php index 28d742e32..79179e7e4 100644 --- a/Cron/CleanupNotifications.php +++ b/Cron/RemoveProcessedWebhooks.php @@ -12,16 +12,16 @@ namespace Adyen\Payment\Cron; use Adyen\Payment\Api\Repository\AdyenNotificationRepositoryInterface; -use Adyen\Payment\Cron\Providers\NotificationsProviderInterface; +use Adyen\Payment\Cron\Providers\WebhooksProviderInterface; use Adyen\Payment\Helper\Config; use Adyen\Payment\Logger\AdyenLogger; use Adyen\Payment\Model\Notification; use Exception; -class CleanupNotifications +class RemoveProcessedWebhooks { /** - * @param NotificationsProviderInterface[] $providers + * @param WebhooksProviderInterface[] $providers */ public function __construct( private readonly array $providers, @@ -35,7 +35,7 @@ public function __construct( */ public function execute(): void { - $isWebhookCleanupEnabled = $this->configHelper->getIsWebhookCleanupEnabled(); + $isWebhookCleanupEnabled = $this->configHelper->getIsProcessedWebhookRemovalEnabled(); if ($isWebhookCleanupEnabled === true) { $numberOfItemsRemoved = 0; @@ -51,7 +51,7 @@ public function execute(): void '%1: Notification with entity_id %2 has been deleted because it was processed %3 days ago.', $provider->getProviderName(), $notificationToCleanup->getEntityId(), - $this->configHelper->getRequiredDaysForOldWebhooks() + $this->configHelper->getProcessedWebhookRemovalTime() ); $this->adyenLogger->addAdyenNotification($message); diff --git a/Helper/Config.php b/Helper/Config.php index f339a16bb..d71a07a82 100644 --- a/Helper/Config.php +++ b/Helper/Config.php @@ -57,8 +57,8 @@ class Config const XML_RECURRING_CONFIGURATION = 'recurring_configuration'; const XML_ALLOW_MULTISTORE_TOKENS = 'allow_multistore_tokens'; const XML_THREEDS_FLOW = 'threeds_flow'; - const XML_CLEANUP_OLD_WEBHOOKS = 'cleanup_old_webhooks'; - const XML_REQUIRED_DAYS_OLD_WEBHOOKS = 'required_days_old_webhooks'; + const XML_REMOVE_PROCESSED_WEBHOOKS = 'remove_processed_webhooks'; + const XML_PROCESSED_WEBHOOK_REMOVAL_TIME = 'processed_webhook_removal_time'; protected ScopeConfigInterface $scopeConfig; private EncryptorInterface $encryptor; @@ -595,17 +595,17 @@ public function getThreeDSFlow(int $storeId = null): string } /** - * Returns whether if the webhook clean-up by cronjob is enabled or not. + * Indicates whether if the processed webhook removal cronjob is enabled or not. * * This field can only be configured on default scope level as * the notification table doesn't have nay relation with the stores. * * @return bool */ - public function getIsWebhookCleanupEnabled(): bool + public function getIsProcessedWebhookRemovalEnabled(): bool { return $this->getConfigData( - self::XML_CLEANUP_OLD_WEBHOOKS, + self::XML_REMOVE_PROCESSED_WEBHOOKS, self::XML_ADYEN_ABSTRACT_PREFIX, null, true @@ -613,17 +613,17 @@ public function getIsWebhookCleanupEnabled(): bool } /** - * Returns the required number of days to clean-up notification by cronjob. + * Returns the required number of days to remove processed webhooks. * * This field can only be configured on default scope level as * the notification table doesn't have nay relation with the stores. * * @return int */ - public function getRequiredDaysForOldWebhooks(): int + public function getProcessedWebhookRemovalTime(): int { return (int) $this->getConfigData( - self::XML_REQUIRED_DAYS_OLD_WEBHOOKS, + self::XML_PROCESSED_WEBHOOK_REMOVAL_TIME, self::XML_ADYEN_ABSTRACT_PREFIX, null ); diff --git a/Model/Comment/WebhookRemovalNotice.php b/Model/Comment/WebhookRemovalNotice.php new file mode 100644 index 000000000..b1b88d3ce --- /dev/null +++ b/Model/Comment/WebhookRemovalNotice.php @@ -0,0 +1,35 @@ + + */ + +namespace Adyen\Payment\Model\Comment; + +use Adyen\Payment\Cron\Providers\ProcessedWebhooksProvider; +use Magento\Config\Model\Config\CommentInterface; + +class WebhookRemovalNotice implements CommentInterface +{ + public function __construct( + private readonly ProcessedWebhooksProvider $processedNotificationProvider + ) { } + + public function getCommentText($elementValue) + { + if ($elementValue === '0') { + $numberOfNotificationsToBeRemoved = count($this->processedNotificationProvider->provide()); + + return __( + 'Enabling this feature will remove %1 processed webhooks from the database!', + $numberOfNotificationsToBeRemoved + ); + } + } +} diff --git a/Test/Unit/Block/Adminhtml/Notification/CleanupJobNoticeTest.php b/Test/Unit/Block/Adminhtml/Notification/WebhookRemovalJobNoticeTest.php similarity index 71% rename from Test/Unit/Block/Adminhtml/Notification/CleanupJobNoticeTest.php rename to Test/Unit/Block/Adminhtml/Notification/WebhookRemovalJobNoticeTest.php index bf9f2a101..920f783b6 100644 --- a/Test/Unit/Block/Adminhtml/Notification/CleanupJobNoticeTest.php +++ b/Test/Unit/Block/Adminhtml/Notification/WebhookRemovalJobNoticeTest.php @@ -11,15 +11,15 @@ namespace Adyen\Payment\Test\Unit\Block\Checkout; -use Adyen\Payment\Block\Adminhtml\Notification\CleanupJobNotice; +use Adyen\Payment\Block\Adminhtml\Notification\WebhookRemovalJobNotice; use Adyen\Payment\Helper\Config; use Adyen\Payment\Test\Unit\AbstractAdyenTestCase; use Magento\Framework\View\Element\Template\Context; use PHPUnit\Framework\MockObject\MockObject; -class CleanupJobNoticeTest extends AbstractAdyenTestCase +class WebhookRemovalJobNoticeTest extends AbstractAdyenTestCase { - protected ?CleanupJobNotice $cleanupJobNotice; + protected ?WebhookRemovalJobNotice $cleanupJobNotice; protected Context|MockObject $contextMock; protected Config|MockObject $configHelperMock; @@ -30,7 +30,7 @@ protected function setUp(): void { $this->contextMock = $this->createMock(Context::class); $this->configHelperMock = $this->createMock(Config::class); - $this->cleanupJobNotice = new CleanupJobNotice($this->contextMock, $this->configHelperMock); + $this->cleanupJobNotice = new WebhookRemovalJobNotice($this->contextMock, $this->configHelperMock); } /** @@ -44,14 +44,14 @@ protected function tearDown(): void /** * @return void */ - public function testIsAutoNotificationCleanupEnabled() + public function testIsProcessedWebhookRemovalEnabled() { $this->configHelperMock->expects($this->once()) - ->method('getIsWebhookCleanupEnabled') + ->method('getIsProcessedWebhookRemovalEnabled') ->willReturn(true); $this->assertTrue( - $this->cleanupJobNotice->isAutoNotificationCleanupEnabled() + $this->cleanupJobNotice->isProcessedWebhookRemovalEnabled() ); } @@ -63,7 +63,7 @@ public function testGetNumberOfDays() $days = 90; $this->configHelperMock->expects($this->once()) - ->method('getRequiredDaysForOldWebhooks') + ->method('getProcessedWebhookRemovalTime') ->willReturn($days); $this->assertEquals($days, $this->cleanupJobNotice->getNumberOfDays()); diff --git a/Test/Unit/Cron/Providers/ProcessedOldNotificationsProviderTest.php b/Test/Unit/Cron/Providers/ProcessedOldNotificationsProviderTest.php index 0f46cc7e4..80c6b3278 100644 --- a/Test/Unit/Cron/Providers/ProcessedOldNotificationsProviderTest.php +++ b/Test/Unit/Cron/Providers/ProcessedOldNotificationsProviderTest.php @@ -13,7 +13,7 @@ use Adyen\Payment\Api\Data\NotificationInterface; use Adyen\Payment\Api\Repository\AdyenNotificationRepositoryInterface; -use Adyen\Payment\Cron\Providers\ProcessedOldNotificationsProvider; +use Adyen\Payment\Cron\Providers\ProcessedWebhooksProvider; use Adyen\Payment\Helper\Config; use Adyen\Payment\Logger\AdyenLogger; use Adyen\Payment\Test\Unit\AbstractAdyenTestCase; @@ -23,9 +23,9 @@ use Magento\Framework\Exception\LocalizedException; use PHPUnit\Framework\MockObject\MockObject; -class ProcessedOldNotificationsProviderTest extends AbstractAdyenTestCase +class ProcessedNotificationsProviderTest extends AbstractAdyenTestCase { - protected ?ProcessedOldNotificationsProvider $notificationsProvider; + protected ?ProcessedWebhooksProvider $notificationsProvider; protected AdyenNotificationRepositoryInterface|MockObject $adyenNotificationRepositoryMock; protected SearchCriteriaBuilder|MockObject $searchCriteriaBuilderMock; protected Config|MockObject $configHelperMock; @@ -39,7 +39,7 @@ protected function setUp(): void $this->configHelperMock = $this->createMock(Config::class); $this->adyenLoggerMock = $this->createMock(AdyenLogger::class); - $this->notificationsProvider = new ProcessedOldNotificationsProvider( + $this->notificationsProvider = new ProcessedWebhooksProvider( $this->adyenNotificationRepositoryMock, $this->searchCriteriaBuilderMock, $this->configHelperMock, @@ -57,7 +57,7 @@ public function testProvideSuccess() $expiryDays = 90; $this->configHelperMock->expects($this->once()) - ->method('getRequiredDaysForOldWebhooks') + ->method('getProcessedWebhookRemovalTime') ->willReturn($expiryDays); $dateMock = date('Y-m-d H:i:s', time() - $expiryDays * 24 * 60 * 60); @@ -99,7 +99,7 @@ public function testProvideFailure() $expiryDays = 90; $this->configHelperMock->expects($this->once()) - ->method('getRequiredDaysForOldWebhooks') + ->method('getProcessedWebhookRemovalTime') ->willReturn($expiryDays); $dateMock = date('Y-m-d H:i:s', time() - $expiryDays * 24 * 60 * 60); diff --git a/Test/Unit/Cron/CleanupNotificationsTest.php b/Test/Unit/Cron/RemoveProcessedWebhooksTest.php similarity index 83% rename from Test/Unit/Cron/CleanupNotificationsTest.php rename to Test/Unit/Cron/RemoveProcessedWebhooksTest.php index d8c7959cb..8413a2cdb 100644 --- a/Test/Unit/Cron/CleanupNotificationsTest.php +++ b/Test/Unit/Cron/RemoveProcessedWebhooksTest.php @@ -12,8 +12,8 @@ namespace Adyen\Payment\Test\Cron; use Adyen\Payment\Api\Repository\AdyenNotificationRepositoryInterface; -use Adyen\Payment\Cron\CleanupNotifications; -use Adyen\Payment\Cron\Providers\NotificationsProviderInterface; +use Adyen\Payment\Cron\RemoveProcessedWebhooks; +use Adyen\Payment\Cron\Providers\WebhooksProviderInterface; use Adyen\Payment\Helper\Config; use Adyen\Payment\Logger\AdyenLogger; use Adyen\Payment\Model\Notification; @@ -21,13 +21,13 @@ use Magento\Framework\DB\Adapter\DeadlockException; use PHPUnit\Framework\MockObject\MockObject; -class CleanupNotificationsTest extends AbstractAdyenTestCase +class RemoveProcessedWebhooksTest extends AbstractAdyenTestCase { - protected ?CleanupNotifications $cleanupNotifications; + protected ?RemoveProcessedWebhooks $cleanupNotifications; protected AdyenLogger|MockObject $adyenLoggerMock; protected Config|MockObject $configHelperMock; protected AdyenNotificationRepositoryInterface|MockObject $adyenNotificationRepositoryMock; - protected NotificationsProviderInterface|MockObject $notificationsProvider; + protected WebhooksProviderInterface|MockObject $notificationsProvider; protected array $providers; protected function setUp(): void @@ -36,11 +36,11 @@ protected function setUp(): void $this->configHelperMock = $this->createMock(Config::class); $this->adyenNotificationRepositoryMock = $this->createMock(AdyenNotificationRepositoryInterface::class); - $this->notificationsProvider = $this->createMock(NotificationsProviderInterface::class); + $this->notificationsProvider = $this->createMock(WebhooksProviderInterface::class); $this->providers[] = $this->notificationsProvider; - $this->cleanupNotifications = new CleanupNotifications( + $this->cleanupNotifications = new RemoveProcessedWebhooks( $this->providers, $this->adyenLoggerMock, $this->configHelperMock, @@ -56,7 +56,7 @@ protected function tearDown(): void public function testExecuteConfigEnabled() { $this->configHelperMock->expects($this->once()) - ->method('getIsWebhookCleanupEnabled') + ->method('getIsProcessedWebhookRemovalEnabled') ->willReturn(true); $notificationMock = $this->createMock(Notification::class); @@ -77,7 +77,7 @@ public function testExecuteConfigEnabled() public function testExecuteConfigDisabled() { $this->configHelperMock->expects($this->once()) - ->method('getIsWebhookCleanupEnabled') + ->method('getIsProcessedWebhookRemovalEnabled') ->willReturn(false); $this->notificationsProvider->expects($this->never())->method('provide'); @@ -90,7 +90,7 @@ public function testExecuteConfigDisabled() public function testExecuteException() { $this->configHelperMock->expects($this->once()) - ->method('getIsWebhookCleanupEnabled') + ->method('getIsProcessedWebhookRemovalEnabled') ->willReturn(true); $notificationMock = $this->createMock(Notification::class); diff --git a/Test/Unit/Helper/ConfigTest.php b/Test/Unit/Helper/ConfigTest.php index 6179af521..43d99825b 100644 --- a/Test/Unit/Helper/ConfigTest.php +++ b/Test/Unit/Helper/ConfigTest.php @@ -176,7 +176,7 @@ public function testGetIsWebhookCleanupEnabled() "%s/%s/%s", Config::XML_PAYMENT_PREFIX, Config::XML_ADYEN_ABSTRACT_PREFIX, - Config::XML_CLEANUP_OLD_WEBHOOKS + Config::XML_REMOVE_PROCESSED_WEBHOOKS ); $this->scopeConfigMock->expects($this->once()) @@ -184,7 +184,7 @@ public function testGetIsWebhookCleanupEnabled() ->with($this->equalTo($path), $this->equalTo(ScopeInterface::SCOPE_STORE), $this->equalTo(null)) ->willReturn(true); - $result = $this->configHelper->getIsWebhookCleanupEnabled(); + $result = $this->configHelper->getIsProcessedWebhookRemovalEnabled(); $this->assertTrue($result); } @@ -194,7 +194,7 @@ public function testGetRequiredDaysForOldWebhooks() "%s/%s/%s", Config::XML_PAYMENT_PREFIX, Config::XML_ADYEN_ABSTRACT_PREFIX, - Config::XML_REQUIRED_DAYS_OLD_WEBHOOKS + Config::XML_PROCESSED_WEBHOOK_REMOVAL_TIME ); $this->scopeConfigMock->expects($this->once()) @@ -202,7 +202,7 @@ public function testGetRequiredDaysForOldWebhooks() ->with($this->equalTo($path), $this->equalTo(ScopeInterface::SCOPE_STORE), $this->equalTo(null)) ->willReturn("90"); - $result = $this->configHelper->getRequiredDaysForOldWebhooks(); + $result = $this->configHelper->getProcessedWebhookRemovalTime(); $this->assertIsInt($result); $this->assertEquals(90, $result); } diff --git a/etc/adminhtml/system/adyen_testing_performance.xml b/etc/adminhtml/system/adyen_testing_performance.xml index dd913884c..07d51d985 100644 --- a/etc/adminhtml/system/adyen_testing_performance.xml +++ b/etc/adminhtml/system/adyen_testing_performance.xml @@ -55,14 +55,23 @@ ]]> - - + + Magento\Config\Model\Config\Source\Yesno - payment/adyen_abstract/cleanup_old_webhooks + payment/adyen_abstract/remove_processed_webhooks + - Webhooks older than certain days will be removed from the database by a cronjob if this feature is enabled. - The default value is 90 days and this can be configured by overriding `payment/adyen_abstract/required_days_old_webhooks` configuration path. + Processed webhooks older than a required number of days will be removed from the database by a cronjob if this feature is enabled. + The default value is 90 days and this can be configured from the `Number of days to remove processed webhooks` configuration field. + + + 1 + + + Magento\Config\Model\Config\Source\Yesno + payment/adyen_abstract/processed_webhook_removal_time + diff --git a/etc/config.xml b/etc/config.xml index 061f4cc71..cfc9d8646 100755 --- a/etc/config.xml +++ b/etc/config.xml @@ -34,8 +34,8 @@ canceled manual 1 - 0 - 90 + 0 + 90 0 diff --git a/etc/crontab.xml b/etc/crontab.xml index cf093da85..ee7a595b1 100755 --- a/etc/crontab.xml +++ b/etc/crontab.xml @@ -24,7 +24,7 @@ 0 0 * * * - + 0 0 * * * diff --git a/etc/di.xml b/etc/di.xml index 8e9ceb09b..3cdc0596f 100755 --- a/etc/di.xml +++ b/etc/di.xml @@ -1737,7 +1737,7 @@ - Adyen\Payment\Cron\Providers\ProcessedOldNotificationsProvider + Adyen\Payment\Cron\Providers\ProcessedNotificationsProvider diff --git a/view/adminhtml/layout/adyen_notifications_overview.xml b/view/adminhtml/layout/adyen_notifications_overview.xml index 41509f75a..0bb6eba4e 100644 --- a/view/adminhtml/layout/adyen_notifications_overview.xml +++ b/view/adminhtml/layout/adyen_notifications_overview.xml @@ -8,9 +8,9 @@ - + diff --git a/view/adminhtml/templates/notification/cleanup_job_notice.phtml b/view/adminhtml/templates/notification/cleanup_job_notice.phtml deleted file mode 100644 index 25a49ed71..000000000 --- a/view/adminhtml/templates/notification/cleanup_job_notice.phtml +++ /dev/null @@ -1,22 +0,0 @@ - - -isAutoNotificationCleanupEnabled()): ?> -
-
-
-
- escapeHtml(__( - 'Notification clean-up is enabled from the plugin configuration. - Processed notifications older than %1 days will be cleaned-up by the cronjob!', - $block->getNumberOfDays() - )); ?> -
-
-
-
- diff --git a/view/adminhtml/templates/notification/webhook_removal_job_notice.phtml b/view/adminhtml/templates/notification/webhook_removal_job_notice.phtml new file mode 100644 index 000000000..18f28cfc3 --- /dev/null +++ b/view/adminhtml/templates/notification/webhook_removal_job_notice.phtml @@ -0,0 +1,28 @@ + + +isProcessedWebhookRemovalEnabled()): ?> +
+
+
+
+

+ escapeHtml(__( + 'Showing Adyen webhooks received in the last %1 days, processed older webhooks are being cleaned-up by a scheduled tasks.', + $block->getNumberOfDays() + )); ?> +

+

+ escapeHtml(__( + 'You can change this from `Stores > Configuration > Sales > Payment Methods > Adyen > Testing and performance > Clean-up old webhooks`.', + )); ?> +

+
+
+
+
+