Skip to content

Commit

Permalink
Rapid fix for cudi crashing due to isic
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiddo committed Sep 19, 2024
1 parent cceb5d0 commit ea841fb
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions module/CudiBundle/Component/Socket/Sale/QueueItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,29 +221,7 @@ public function conclude($articles, $discounts)
$articles->{$booking->getArticle()->getId()} -= $booking->getNumber();
$booking->setStatus('sold', $this->entityManager);
}

if ($booking->getArticle()->getId() == $isicArticle) {
$isicCard = $this->entityManager
->getRepository('CudiBundle\Entity\IsicCard')
->findOneBy(array('booking' => $booking->getId()));

if (!$isicCard->hasPaid()) {
$config = $this->entityManager
->getRepository('CommonBundle\Entity\General\Config');

$serviceUrl = $config->getConfigValue('cudi.isic_service_url');
$client = new SoapClient($serviceUrl);

$arguments = array();
$arguments['username'] = $config->getConfigValue('cudi.isic_username');
$arguments['password'] = $config->getConfigValue('cudi.isic_password');
$arguments['userID'] = $isicCard->getCardNumber();

$client->hasPaid($arguments);
$isicCard->setPaid(true);
}
}


if (isset($soldArticles[$booking->getArticle()->getId()])) {
$soldArticles[$booking->getArticle()->getId()]['number'] += $booking->getNumber();
} else {
Expand Down

0 comments on commit ea841fb

Please sign in to comment.