diff --git a/Gateway/Command/CaptureCommand.php b/Gateway/Command/CaptureCommand.php index cf275367..37679066 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 5ec313b8..64b19a1b 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "magento2-module", "description": "Vipps Payment Method", "license": "proprietary", - "version": "2.4.18", + "version": "2.4.19", "require": { "magento/framework": "103.0.*", "magento/module-sales": "103.0.*", diff --git a/etc/module.xml b/etc/module.xml index f56c9c42..ed2914b2 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -14,7 +14,7 @@ ~ IN THE SOFTWARE. --> - +