diff --git a/src/Domain/Purchasing/Projector.php b/src/Domain/Purchasing/Projector.php index 461ef0d..dbac3f5 100644 --- a/src/Domain/Purchasing/Projector.php +++ b/src/Domain/Purchasing/Projector.php @@ -90,8 +90,12 @@ private function purchasePaid(PurchaseCompleted $event) $entity->paid(); } - private function purchaseTimeout(TicketReservationExpired $event) + private function purchaseTimeout($event) { + if (!($event instanceof TicketReservationExpired || $event instanceof MerchandisePurchaseExpired)) { + return; + } + $entity = $this->repository->get($event->getId()); if ($entity instanceof Purchase) { $this->repository->remove($entity);