From 57a310aa08edb611389a4af993692d9d77839407 Mon Sep 17 00:00:00 2001 From: Can Demiralp Date: Tue, 4 Feb 2025 10:27:45 +0100 Subject: [PATCH] [EPC-9177] Update log type and use notification logs for success messages --- Cron/RemoveProcessedWebhooks.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Cron/RemoveProcessedWebhooks.php b/Cron/RemoveProcessedWebhooks.php index 79179e7e4..894176aa4 100644 --- a/Cron/RemoveProcessedWebhooks.php +++ b/Cron/RemoveProcessedWebhooks.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 @@ -22,6 +22,9 @@ class RemoveProcessedWebhooks { /** * @param WebhooksProviderInterface[] $providers + * @param AdyenLogger $adyenLogger + * @param Config $configHelper + * @param AdyenNotificationRepositoryInterface $adyenNotificationRepository */ public function __construct( private readonly array $providers, @@ -70,13 +73,13 @@ public function execute(): void } } - $successMessage = sprintf( - __('%s webhook notifications have been cleaned-up by the CleanupNotifications job.'), + $successMessage = __( + '%1 processed webhooks have been removed by the RemoveProcessedWebhooks cronjob.', $numberOfItemsRemoved ); - $this->adyenLogger->addAdyenDebug($successMessage); + $this->adyenLogger->addAdyenNotification($successMessage); } else { - $message = __('Webhook notification clean-up feature is disabled. The job has been skipped!'); + $message = __('Processed webhook removal feature is disabled. The cronjob has been skipped!'); $this->adyenLogger->addAdyenDebug($message); } }