Skip to content

Commit

Permalink
Merge pull request #47 from conferencetools/ticketing-improvements
Browse files Browse the repository at this point in the history
Fix purchase timeout when merchandise is in the basket
  • Loading branch information
carnage authored Sep 22, 2019
2 parents 9976b2a + 2732a7e commit 787e109
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 787e109

Please sign in to comment.