Skip to content

Commit 758016e

Browse files
Merge pull request #209 from mollie/5.6.7
5.6.7
2 parents 15bf1f5 + f628961 commit 758016e

File tree

5 files changed

+89
-2
lines changed

5 files changed

+89
-2
lines changed

app/code/community/Mollie/Mpm/Block/Payment/Info/Base.php

+59
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,63 @@ public function getcardLabel()
159159

160160
return '';
161161
}
162+
163+
public function getIssuer()
164+
{
165+
try {
166+
$issuerCodeToName = [
167+
'ideal_ABNANL2A' => 'ABN AMRO',
168+
'ideal_INGBNL2A' => 'ING',
169+
'ideal_RABONL2U' => 'Rabobank',
170+
'ideal_ASNBNL21' => 'ASN Bank',
171+
'ideal_BUNQNL2A' => 'Bunq',
172+
'ideal_HANDNL2A' => 'Handelsbanken',
173+
'ideal_KNABNL2H' => 'Knab',
174+
'ideal_RBRBNL21' => 'Regiobank',
175+
'ideal_REVOLT21' => 'Revolut',
176+
'ideal_SNSBNL2A' => 'SNS Bank',
177+
'ideal_TRIONL2U' => 'Triodos',
178+
'ideal_FVLBNL22' => 'Van Lanschot',
179+
];
180+
181+
$issuer = $this->getInfo()->getAdditionalInformation('selected_issuer');
182+
if (array_key_exists($issuer, $issuerCodeToName)) {
183+
return $issuerCodeToName[$issuer];
184+
}
185+
186+
return $issuer;
187+
} catch (\Exception $exception) {
188+
return null;
189+
}
190+
}
191+
192+
public function getConsumerName()
193+
{
194+
try {
195+
$details = json_decode($this->getInfo()->getAdditionalInformation('details'), true);
196+
return $details['consumerName'];
197+
} catch (\Exception $exception) {
198+
return null;
199+
}
200+
}
201+
202+
public function getIban()
203+
{
204+
try {
205+
$details = json_decode($this->getInfo()->getAdditionalInformation('details'), true);
206+
return $details['consumerAccount'];
207+
} catch (\Exception $exception) {
208+
return null;
209+
}
210+
}
211+
212+
public function getBic()
213+
{
214+
try {
215+
$details = json_decode($this->getInfo()->getAdditionalInformation('details'), true);
216+
return $details['consumerBic'];
217+
} catch (\Exception $exception) {
218+
return null;
219+
}
220+
}
162221
}

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

+2
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ public function processTransaction(Mage_Sales_Model_Order $order, $type = 'webho
255255
$msg = array('success' => true, 'status' => 'paid', 'order_id' => $orderId, 'type' => $type);
256256
$this->mollieHelper->addTolog('success', $msg);
257257
$this->checkCheckoutSession($order, $paymentToken, $paymentData, $type);
258+
$order->save();
259+
258260
return $msg;
259261
}
260262

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.6</version>
36+
<version>5.6.7</version>
3737
</Mollie_Mpm>
3838
</modules>
3939
<global>

app/design/adminhtml/default/default/template/mollie/mpm/payment/info/base.phtml

+27-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,32 @@ $status = $this->getPaymentStatus();
7878
</td>
7979
</tr>
8080
<?php endif; ?>
81+
<?php if (Mage::getStoreConfig('payment/mollie/transaction_details') == 1): ?>
82+
<?php if ($issuer = $this->getIssuer()): ?>
83+
<tr>
84+
<td class="label"><?= __('Issuer'); ?></td>
85+
<td class="value"> <?=$issuer; ?></td>
86+
</tr>
87+
<?php endif; ?>
88+
<?php if ($consumerName = $this->getConsumerName()): ?>
89+
<tr>
90+
<td class="label"><?= __('Consumer name'); ?></td>
91+
<td class="value"> <?=$consumerName; ?></td>
92+
</tr>
93+
<?php endif; ?>
94+
<?php if ($iban = $this->getIban()): ?>
95+
<tr>
96+
<td class="label"><?= __('IBAN'); ?></td>
97+
<td class="value"> <?=$iban; ?></td>
98+
</tr>
99+
<?php endif; ?>
100+
<?php if ($bic = $this->getBic()): ?>
101+
<tr>
102+
<td class="label"><?= __('BIC'); ?></td>
103+
<td class="value"> <?=$bic; ?></td>
104+
</tr>
105+
<?php endif; ?>
106+
<?php endif; ?>
81107
</table>
82108
</div>
83-
<?php echo $this->getChildHtml() ?>
109+
<?php echo $this->getChildHtml() ?>
1.35 KB
Loading

0 commit comments

Comments
 (0)