Skip to content

Commit

Permalink
Merge pull request #212 from mollie/5.6.8
Browse files Browse the repository at this point in the history
5.6.8
  • Loading branch information
Marvin-Magmodules authored Aug 31, 2021
2 parents 758016e + c8c633b commit 7a24dd6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
12 changes: 12 additions & 0 deletions app/code/community/Mollie/Mpm/Block/Payment/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}
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
2 changes: 1 addition & 1 deletion app/code/community/Mollie/Mpm/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<config>
<modules>
<Mollie_Mpm>
<version>5.6.7</version>
<version>5.6.8</version>
</Mollie_Mpm>
</modules>
<global>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $method = $this->getMethodByCode($code);
<?php endif; ?>
<?php if ($listType == 'radio'): ?>
<ul>
<?php foreach ($method->issuers() as $issuer): ?>
<?php foreach ($this->sortIssuers($method->issuers()) as $issuer): ?>
<li>
<label>
<input type="radio" name="<?php echo $code; ?>_issuer" value="<?php echo htmlspecialchars($issuer->id); ?>" id="issuer_<?php echo htmlspecialchars($issuer->id); ?>" class="radio">
Expand Down

0 comments on commit 7a24dd6

Please sign in to comment.