Skip to content

Commit

Permalink
fixed sending mails and marking bank payments
Browse files Browse the repository at this point in the history
  • Loading branch information
Lung committed Jan 17, 2025
1 parent 0095fcf commit 508e2a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Command/UpdatePaymentsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand All @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Payment/PaymentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down

0 comments on commit 508e2a9

Please sign in to comment.