From 871aaea5c3b67a9645bf4124a97d719c4cf95c7f Mon Sep 17 00:00:00 2001 From: Volodymyr Klymenko Date: Mon, 30 Aug 2021 09:56:33 +0000 Subject: [PATCH] VIPPS-391: State vs status for cancelled orders --- Model/TransactionProcessor.php | 2 +- composer.json | 2 +- etc/module.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Model/TransactionProcessor.php b/Model/TransactionProcessor.php index 295f458..ba74bc6 100644 --- a/Model/TransactionProcessor.php +++ b/Model/TransactionProcessor.php @@ -511,7 +511,7 @@ private function cancelOrder($order): void { if ($order->getState() === Order::STATE_NEW) { $this->orderManagement->cancel($order->getEntityId()); - } else { + } elseif ($order->getState() === Order::STATE_PAYMENT_REVIEW) { $connection = $this->resourceConnection->getConnection(); try { $connection->beginTransaction(); diff --git a/composer.json b/composer.json index 64b19a1..73eb21e 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "magento2-module", "description": "Vipps Payment Method", "license": "proprietary", - "version": "2.4.19", + "version": "2.4.20", "require": { "magento/framework": "103.0.*", "magento/module-sales": "103.0.*", diff --git a/etc/module.xml b/etc/module.xml index ed2914b..7db9490 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -14,7 +14,7 @@ ~ IN THE SOFTWARE. --> - +