Skip to content

Commit

Permalink
Make sure that when the Klarna exception is thrown no rollback is done
Browse files Browse the repository at this point in the history
  • Loading branch information
michielgerritsen committed Aug 31, 2021
1 parent 758016e commit e2dbddb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/code/community/Mollie/Mpm/Model/Mollie.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e2dbddb

Please sign in to comment.