Skip to content

Commit f0eac4e

Browse files
Merge pull request #245 from mollie/5.9.0
5.9.0
2 parents e3e8589 + 956ea2f commit f0eac4e

File tree

7 files changed

+17
-69
lines changed

7 files changed

+17
-69
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function getIssuerListType($code)
102102
*/
103103
public function getIssuerTitle($code)
104104
{
105-
if ($code == 'mollie_ideal' || $code == 'mollie_kbc') {
105+
if ($code == 'mollie_kbc') {
106106
return $this->__('Select Bank');
107107
}
108108

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

+1-21
Original file line numberDiff line numberDiff line change
@@ -163,27 +163,7 @@ public function getcardLabel()
163163
public function getIssuer()
164164
{
165165
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;
166+
return $this->getInfo()->getAdditionalInformation('selected_issuer');
187167
} catch (\Exception $exception) {
188168
return null;
189169
}

app/code/community/Mollie/Mpm/Helper/Data.php

+13-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ class Mollie_Mpm_Helper_Data extends Mage_Core_Helper_Abstract
9292
*/
9393
public function isModuleEnabled($storeId = null, $websiteId = null)
9494
{
95+
if (!is_numeric($storeId)) {
96+
$storeId = Mage::app()->getStore()->getId();
97+
}
98+
9599
return $this->isAvailable($storeId);
96100
}
97101

@@ -128,7 +132,7 @@ public function isAvailable($storeId = null)
128132
*/
129133
public function getStoreConfig($path, $storeId = null)
130134
{
131-
if ($storeId > 0) {
135+
if (is_numeric($storeId)) {
132136
$value = Mage::getStoreConfig($path, $storeId);
133137
} else {
134138
$value = Mage::getStoreConfig($path);
@@ -784,6 +788,14 @@ public function getAvailableMethods($storeId, $quote = null, $resource = 'orders
784788
);
785789
}
786790

791+
// Remove issuers for iDEAL 2.0
792+
foreach ($this->mollieMethods as $method) {
793+
if ($method->id == 'ideal') {
794+
$method->issuers = [];
795+
break;
796+
}
797+
}
798+
787799
return $this->mollieMethods;
788800
} catch (\Exception $e) {
789801
$this->addTolog('error', $e->getMessage());

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

-17
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,4 @@ class Mollie_Mpm_Model_Method_Ideal extends Mollie_Mpm_Model_Method_Abstract
4848
* @var string
4949
*/
5050
protected $_paymentMethod = self::PAYMENT_METHOD;
51-
52-
/**
53-
* @param mixed $data
54-
*
55-
* @return $this|Mage_Payment_Model_Info
56-
* @throws Mage_Core_Exception
57-
*/
58-
public function assignData($data)
59-
{
60-
parent::assignData($data);
61-
62-
$selectedIssuer = Mage::app()->getRequest()->getParam('mollie_ideal_issuer');
63-
$this->getInfoInstance()->setAdditionalInformation('selected_issuer', $selectedIssuer);
64-
65-
return $this;
66-
}
67-
6851
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function getOrderLines(Mage_Sales_Model_Order $order)
110110
'totalAmount' => $this->mollieHelper->getAmountArray($currency, $totalAmount),
111111
'vatRate' => sprintf("%.2f", $item->getTaxPercent()),
112112
'vatAmount' => $this->mollieHelper->getAmountArray($currency, $vatAmount),
113-
'sku' => $item->getProduct()->getSku(),
113+
'sku' => $item->getSku(),
114114
'productUrl' => $item->getProduct()->getProductUrl()
115115
);
116116

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<config>
3434
<modules>
3535
<Mollie_Mpm>
36-
<version>5.8.2</version>
36+
<version>5.9.0</version>
3737
</Mollie_Mpm>
3838
</modules>
3939
<global>
@@ -390,7 +390,6 @@
390390
<title>iDEAL</title>
391391
<model>mpm/method_ideal</model>
392392
<group>mollie</group>
393-
<issuer_list_type>dropdown</issuer_list_type>
394393
<allowspecific>0</allowspecific>
395394
<method/>
396395
<payment_description>{ordernumber}</payment_description>

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

-26
Original file line numberDiff line numberDiff line change
@@ -928,32 +928,6 @@
928928
(Note: This only works when the method is set to Payments API)
929929
]]></comment>
930930
</payment_description>
931-
<issuer_list_type translate="label tooltip">
932-
<label>Issuer List Style</label>
933-
<frontend_type>select</frontend_type>
934-
<source_model>mpm/adminhtml_system_config_source_issuerListType</source_model>
935-
<sort_order>5</sort_order>
936-
<show_in_default>1</show_in_default>
937-
<show_in_website>1</show_in_website>
938-
<show_in_store>1</show_in_store>
939-
<depends>
940-
<active>1</active>
941-
</depends>
942-
</issuer_list_type>
943-
<!--
944-
<add_qr translate="label">
945-
<label>Add QR-Code option in Issuer List</label>
946-
<frontend_type>select</frontend_type>
947-
<source_model>adminhtml/system_config_source_yesno</source_model>
948-
<sort_order>5</sort_order>
949-
<show_in_default>1</show_in_default>
950-
<show_in_website>1</show_in_website>
951-
<show_in_store>1</show_in_store>
952-
<depends>
953-
<active>1</active>
954-
</depends>
955-
</add_qr>
956-
-->
957931
<allowspecific translate="label">
958932
<label>Payment from Applicable Countries</label>
959933
<frontend_type>allowspecific</frontend_type>

0 commit comments

Comments
 (0)