From e2dbddbcd93bbdf676ed92a38100e6610633a1e1 Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Tue, 31 Aug 2021 08:50:59 +0200 Subject: [PATCH] Make sure that when the Klarna exception is thrown no rollback is done --- app/code/community/Mollie/Mpm/Model/Mollie.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/community/Mollie/Mpm/Model/Mollie.php b/app/code/community/Mollie/Mpm/Model/Mollie.php index 23f06c6..da361dc 100644 --- a/app/code/community/Mollie/Mpm/Model/Mollie.php +++ b/app/code/community/Mollie/Mpm/Model/Mollie.php @@ -167,6 +167,9 @@ public function processTransaction($orderId, $type = 'webhook', $paymentToken = } else { return $this->paymentsApi->processTransaction($order, $type, $paymentToken); } + } catch (Mollie_Mpm_Exceptions_KlarnaException $exception) { + // No rollback, save is done in the finally. + throw $exception; } catch (\Exception $exception) { $connection->rollback(); throw $exception;