diff --git a/src/OrderManager/V7/OrderManager.php b/src/OrderManager/V7/OrderManager.php index e56fa54d..b0c92eb3 100644 --- a/src/OrderManager/V7/OrderManager.php +++ b/src/OrderManager/V7/OrderManager.php @@ -708,7 +708,7 @@ protected function applyVoucherTokens(AbstractOrder $order, CartInterface $cart) //add new tokens - which are the remaining entries of $flippedVoucherTokens foreach ($flippedVoucherTokens as $code => $x) { - $this->voucherService->applyToken($code, $cart, $order); + $this->voucherService->applyToken((string)$code, $cart, $order); } } } diff --git a/src/VoucherService/TokenManager/Single.php b/src/VoucherService/TokenManager/Single.php index 4ff915a7..9c64adc2 100644 --- a/src/VoucherService/TokenManager/Single.php +++ b/src/VoucherService/TokenManager/Single.php @@ -208,7 +208,7 @@ public function reserveToken(string $code, CartInterface $cart): bool public function applyToken(string $code, CartInterface $cart, AbstractOrder $order): OnlineShopVoucherToken|bool { if ($token = Token::getByCode($code)) { - if ($token->check($this->configuration->getUsages(), true)) { + if ($token->check((int)$this->configuration->getUsages(), true)) { if ($token->apply()) { $orderToken = \Pimcore\Model\DataObject\OnlineShopVoucherToken::getByToken($code, 1); if (!$orderToken instanceof \Pimcore\Model\DataObject\OnlineShopVoucherToken) {