Skip to content

Commit

Permalink
Merge pull request #209 from mollie/5.6.7
Browse files Browse the repository at this point in the history
5.6.7
  • Loading branch information
Marvin-Magmodules authored Aug 5, 2021
2 parents 15bf1f5 + f628961 commit 758016e
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 2 deletions.
59 changes: 59 additions & 0 deletions app/code/community/Mollie/Mpm/Block/Payment/Info/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,63 @@ public function getcardLabel()

return '';
}

public function getIssuer()
{
try {
$issuerCodeToName = [
'ideal_ABNANL2A' => 'ABN AMRO',
'ideal_INGBNL2A' => 'ING',
'ideal_RABONL2U' => 'Rabobank',
'ideal_ASNBNL21' => 'ASN Bank',
'ideal_BUNQNL2A' => 'Bunq',
'ideal_HANDNL2A' => 'Handelsbanken',
'ideal_KNABNL2H' => 'Knab',
'ideal_RBRBNL21' => 'Regiobank',
'ideal_REVOLT21' => 'Revolut',
'ideal_SNSBNL2A' => 'SNS Bank',
'ideal_TRIONL2U' => 'Triodos',
'ideal_FVLBNL22' => 'Van Lanschot',
];

$issuer = $this->getInfo()->getAdditionalInformation('selected_issuer');
if (array_key_exists($issuer, $issuerCodeToName)) {
return $issuerCodeToName[$issuer];
}

return $issuer;
} catch (\Exception $exception) {
return null;
}
}

public function getConsumerName()
{
try {
$details = json_decode($this->getInfo()->getAdditionalInformation('details'), true);
return $details['consumerName'];
} catch (\Exception $exception) {
return null;
}
}

public function getIban()
{
try {
$details = json_decode($this->getInfo()->getAdditionalInformation('details'), true);
return $details['consumerAccount'];
} catch (\Exception $exception) {
return null;
}
}

public function getBic()
{
try {
$details = json_decode($this->getInfo()->getAdditionalInformation('details'), true);
return $details['consumerBic'];
} catch (\Exception $exception) {
return null;
}
}
}
2 changes: 2 additions & 0 deletions app/code/community/Mollie/Mpm/Model/Client/Payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ public function processTransaction(Mage_Sales_Model_Order $order, $type = 'webho
$msg = array('success' => true, 'status' => 'paid', 'order_id' => $orderId, 'type' => $type);
$this->mollieHelper->addTolog('success', $msg);
$this->checkCheckoutSession($order, $paymentToken, $paymentData, $type);
$order->save();

return $msg;
}

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.6</version>
<version>5.6.7</version>
</Mollie_Mpm>
</modules>
<global>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,32 @@ $status = $this->getPaymentStatus();
</td>
</tr>
<?php endif; ?>
<?php if (Mage::getStoreConfig('payment/mollie/transaction_details') == 1): ?>
<?php if ($issuer = $this->getIssuer()): ?>
<tr>
<td class="label"><?= __('Issuer'); ?></td>
<td class="value"> <?=$issuer; ?></td>
</tr>
<?php endif; ?>
<?php if ($consumerName = $this->getConsumerName()): ?>
<tr>
<td class="label"><?= __('Consumer name'); ?></td>
<td class="value"> <?=$consumerName; ?></td>
</tr>
<?php endif; ?>
<?php if ($iban = $this->getIban()): ?>
<tr>
<td class="label"><?= __('IBAN'); ?></td>
<td class="value"> <?=$iban; ?></td>
</tr>
<?php endif; ?>
<?php if ($bic = $this->getBic()): ?>
<tr>
<td class="label"><?= __('BIC'); ?></td>
<td class="value"> <?=$bic; ?></td>
</tr>
<?php endif; ?>
<?php endif; ?>
</table>
</div>
<?php echo $this->getChildHtml() ?>
<?php echo $this->getChildHtml() ?>
Binary file modified skin/adminhtml/default/default/mollie/mpm/images/sofort.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 758016e

Please sign in to comment.