diff --git a/app/code/community/Mollie/Mpm/Block/Payment/Form.php b/app/code/community/Mollie/Mpm/Block/Payment/Form.php index 97f8eac..73edc8f 100644 --- a/app/code/community/Mollie/Mpm/Block/Payment/Form.php +++ b/app/code/community/Mollie/Mpm/Block/Payment/Form.php @@ -113,4 +113,16 @@ public function getIssuerTitle($code) return $this->__('Select Issuer'); } + /** + * @param \Mollie\Api\Resources\IssuerCollection $issuers + */ + public function sortIssuers($issuers) + { + $issuers->uasort(function($a, $b) { + return strcmp(strtolower($a->name), strtolower($b->name)); + }); + + return $issuers; + } + } 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; diff --git a/app/code/community/Mollie/Mpm/etc/config.xml b/app/code/community/Mollie/Mpm/etc/config.xml index 2806487..c544d52 100644 --- a/app/code/community/Mollie/Mpm/etc/config.xml +++ b/app/code/community/Mollie/Mpm/etc/config.xml @@ -33,7 +33,7 @@ - 5.6.7 + 5.6.8 diff --git a/app/design/frontend/base/default/template/mollie/mpm/payment/form.phtml b/app/design/frontend/base/default/template/mollie/mpm/payment/form.phtml index 4007482..a8a7faa 100644 --- a/app/design/frontend/base/default/template/mollie/mpm/payment/form.phtml +++ b/app/design/frontend/base/default/template/mollie/mpm/payment/form.phtml @@ -52,7 +52,7 @@ $method = $this->getMethodByCode($code);