diff --git a/Gateway/Command/CaptureCommand.php b/Gateway/Command/CaptureCommand.php index cf275367..35c078ca 100644 --- a/Gateway/Command/CaptureCommand.php +++ b/Gateway/Command/CaptureCommand.php @@ -178,6 +178,10 @@ public function execute(array $commandSubject) $amount = $this->subjectReader->readAmount($commandSubject); $amount = (int)round($this->formatPrice($amount) * 100); + if ($amount === 0) { + return true; + } + $orderId = $this->subjectReader->readPayment($commandSubject)->getOrder()->getOrderIncrementId(); $transaction = $this->paymentDetailsProvider->get($orderId); diff --git a/composer.json b/composer.json index 6a6dabce..173d1d33 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "magento2-module", "description": "Vipps Payment Method", "license": "proprietary", - "version": "2.2.15", + "version": "2.2.16", "require": { "magento/framework": "101.0.*", "magento/module-sales": "101.0.*",