From 508e2a9b7dff9aa39afd891d409b6dc6383c1f44 Mon Sep 17 00:00:00 2001 From: Lung Date: Fri, 17 Jan 2025 19:33:35 +0100 Subject: [PATCH] fixed sending mails and marking bank payments --- src/Command/UpdatePaymentsCommand.php | 3 +++ src/Payment/PaymentService.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Command/UpdatePaymentsCommand.php b/src/Command/UpdatePaymentsCommand.php index 517a0831..e905cf1f 100644 --- a/src/Command/UpdatePaymentsCommand.php +++ b/src/Command/UpdatePaymentsCommand.php @@ -6,6 +6,7 @@ use kissj\Event\EventRepository; use kissj\Logging\Sentry\SentryCollector; +use kissj\Mailer\MailerSettings; use kissj\Payment\PaymentService; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; @@ -21,6 +22,7 @@ class UpdatePaymentsCommand extends Command public function __construct( private readonly PaymentService $paymentService, private readonly EventRepository $eventRepository, + private readonly MailerSettings $mailerSettings, private readonly SentryCollector $sentryCollector, ) { parent::__construct(); @@ -33,6 +35,7 @@ public function execute(InputInterface $input, OutputInterface $output): int $output->writeln('Updating payments for ' . count($events) . ' events...'); foreach ($events as $event) { + $this->mailerSettings->setEvent($event); $this->paymentService->updatePayments($event); } diff --git a/src/Payment/PaymentService.php b/src/Payment/PaymentService.php index 26dd1049..c6dced5e 100755 --- a/src/Payment/PaymentService.php +++ b/src/Payment/PaymentService.php @@ -182,7 +182,7 @@ public function updatePayments(Event $event, int $limit = 10): void $bankPayment->status = BankPayment::STATUS_PAIRED; $counterNewPaid++; } else { - // matching VS, not matchnig price + // matching VS, not matching price $bankPayment->status = BankPayment::STATUS_UNKNOWN; $counterUnknownPayment++; }