Skip to content

Commit

Permalink
Merge branch 'pr/208' into 5.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin-Magmodules committed Aug 5, 2021
2 parents 15bf1f5 + afd9900 commit fa545ab
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 1 deletion.
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
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 fa545ab

Please sign in to comment.