diff --git a/src/Subscriber/PaymentSubscriber.php b/src/Subscriber/PaymentSubscriber.php index 5305a37b..0dbdf347 100644 --- a/src/Subscriber/PaymentSubscriber.php +++ b/src/Subscriber/PaymentSubscriber.php @@ -258,7 +258,10 @@ public function onShoppingCartLoaded(PageLoadedEvent $event) } } - $minorUnitsQuotient = $amountInMinorUnits / $page->getCart()->getPrice()->getTotalPrice(); + $minorUnitsQuotient = 1; + if (0 < $page->getCart()->getPrice()->getTotalPrice()) { + $minorUnitsQuotient = $amountInMinorUnits / $page->getCart()->getPrice()->getTotalPrice(); + } $page->addExtension( self::ADYEN_DATA_EXTENSION_ID,