From f33e5d071e8ae88114bc4f39e7cdcfa6f9cafffb Mon Sep 17 00:00:00 2001 From: Salvatore Pruiti Date: Thu, 10 Jul 2025 15:58:50 +0200 Subject: [PATCH 1/2] BCSAT-84 - Add success and failure return codes to CompleteUnhandledTransaction command --- Command/CompleteUnhandledTransaction.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Command/CompleteUnhandledTransaction.php b/Command/CompleteUnhandledTransaction.php index 3c0265a..08032d9 100644 --- a/Command/CompleteUnhandledTransaction.php +++ b/Command/CompleteUnhandledTransaction.php @@ -60,8 +60,10 @@ public function execute(InputInterface $input, OutputInterface $output) try { $this->appState->setAreaCode(Area::AREA_FRONTEND); $this->finalizeUnhandledOrdersService->finalizeUnhandledOrders(); + return Command::SUCCESS; } catch (\Exception $e) { $this->logger->error("An error has occured when Finalizing unhandled Satispay Orders: " . $e->getMessage()); + return Command::FAILURE; } } From c95cc6e261867e4ccd9bef38dd43416b346cb29d Mon Sep 17 00:00:00 2001 From: Salvatore Pruiti Date: Thu, 10 Jul 2025 16:00:14 +0200 Subject: [PATCH 2/2] BCSAT-84 - Fix typo in error log messages in CompleteUnhandledTransaction command --- Command/CompleteUnhandledTransaction.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Command/CompleteUnhandledTransaction.php b/Command/CompleteUnhandledTransaction.php index 08032d9..3d59522 100644 --- a/Command/CompleteUnhandledTransaction.php +++ b/Command/CompleteUnhandledTransaction.php @@ -62,7 +62,7 @@ public function execute(InputInterface $input, OutputInterface $output) $this->finalizeUnhandledOrdersService->finalizeUnhandledOrders(); return Command::SUCCESS; } catch (\Exception $e) { - $this->logger->error("An error has occured when Finalizing unhandled Satispay Orders: " . $e->getMessage()); + $this->logger->error("An error has occurred when Finalizing unhandled Satispay Orders: " . $e->getMessage()); return Command::FAILURE; } } @@ -72,7 +72,7 @@ public function executeCron() try { $this->finalizeUnhandledOrdersService->finalizeUnhandledOrders(); } catch (\Exception $e) { - $this->logger->error("An error has occured when Finalizing unhandled Satispay Orders: " . $e->getMessage()); + $this->logger->error("An error has occurred when Finalizing unhandled Satispay Orders: " . $e->getMessage()); } } }