Skip to content

Commit 7a24dd6

Browse files
Merge pull request #212 from mollie/5.6.8
5.6.8
2 parents 758016e + c8c633b commit 7a24dd6

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

app/code/community/Mollie/Mpm/Block/Payment/Form.php

+12
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,16 @@ public function getIssuerTitle($code)
113113
return $this->__('Select Issuer');
114114
}
115115

116+
/**
117+
* @param \Mollie\Api\Resources\IssuerCollection $issuers
118+
*/
119+
public function sortIssuers($issuers)
120+
{
121+
$issuers->uasort(function($a, $b) {
122+
return strcmp(strtolower($a->name), strtolower($b->name));
123+
});
124+
125+
return $issuers;
126+
}
127+
116128
}

app/code/community/Mollie/Mpm/Model/Mollie.php

+3
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ public function processTransaction($orderId, $type = 'webhook', $paymentToken =
167167
} else {
168168
return $this->paymentsApi->processTransaction($order, $type, $paymentToken);
169169
}
170+
} catch (Mollie_Mpm_Exceptions_KlarnaException $exception) {
171+
// No rollback, save is done in the finally.
172+
throw $exception;
170173
} catch (\Exception $exception) {
171174
$connection->rollback();
172175
throw $exception;

app/code/community/Mollie/Mpm/etc/config.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<config>
3434
<modules>
3535
<Mollie_Mpm>
36-
<version>5.6.7</version>
36+
<version>5.6.8</version>
3737
</Mollie_Mpm>
3838
</modules>
3939
<global>

app/design/frontend/base/default/template/mollie/mpm/payment/form.phtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ $method = $this->getMethodByCode($code);
5252
<?php endif; ?>
5353
<?php if ($listType == 'radio'): ?>
5454
<ul>
55-
<?php foreach ($method->issuers() as $issuer): ?>
55+
<?php foreach ($this->sortIssuers($method->issuers()) as $issuer): ?>
5656
<li>
5757
<label>
5858
<input type="radio" name="<?php echo $code; ?>_issuer" value="<?php echo htmlspecialchars($issuer->id); ?>" id="issuer_<?php echo htmlspecialchars($issuer->id); ?>" class="radio">

0 commit comments

Comments
 (0)