Skip to content

Commit

Permalink
Fix purchase timeout when merchandise is in the basket
Browse files Browse the repository at this point in the history
  • Loading branch information
carnage committed Sep 22, 2019
1 parent 48a7184 commit 2732a7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Domain/Purchasing/Projector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2732a7e

Please sign in to comment.