Skip to content

Commit b9f0188

Browse files
authored
Merge pull request #190 from mollie/9.2.3
9.2.3
2 parents 1ae0307 + 1419a8e commit b9f0188

File tree

12 files changed

+100
-67
lines changed

12 files changed

+100
-67
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
# Changelog #
44

5+
#### Changes in release 9.2.3
6+
+ Bugfix status returning to paid
7+
+ Bugfix notice on admin dashboard
8+
+ Updated mollie logo in checkout to smaller version
9+
+ Updated checkout form styling
10+
+ Added deprecated module names to admin for older version updating
11+
512
#### Changes in release 9.2.2
613
+ Bugfix view load
714

admin/language/dutch/payment/mollie.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
$_['name_mollie_przelewy24'] = 'P24';
8080
$_['name_mollie_applepay'] = 'Apple Pay';
8181

82+
// Deprecated names
83+
$_['name_mollie_bitcoin'] = "Bitcoin";
84+
$_['name_mollie_mistercash'] = "Bancontact/MisterCash";
85+
8286
// Text
8387
$_['text_edit'] = "Bewerk Mollie";
8488
$_['text_payment'] = "Betaling";

admin/language/english/payment/mollie.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
$_['name_mollie_przelewy24'] = 'P24';
8080
$_['name_mollie_applepay'] = 'Apple Pay';
8181

82+
// Deprecated names
83+
$_['name_mollie_bitcoin'] = "Bitcoin";
84+
$_['name_mollie_mistercash'] = "Bancontact/MisterCash";
85+
8286
// Text
8387
$_['text_edit'] = "Edit";
8488
$_['text_payment'] = "Payment";

admin/language/french/payment/mollie.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@
6060
$_['footer_text'] = "Services paiement";
6161

6262
// Module names
63+
$_['name_mollie_bancontact'] = "Bancontact";
6364
$_['name_mollie_banktransfer'] = "Virement bancaire";
6465
$_['name_mollie_belfius'] = "Belfius Direct Net";
6566
$_['name_mollie_creditcard'] = "Creditcard";
6667
$_['name_mollie_directdebit'] = "Débit direct";
6768
$_['name_mollie_ideal'] = "iDEAL";
6869
$_['name_mollie_kbc'] = "Bouton de paiement KBC/CBC";
69-
$_['name_mollie_bancontact'] = "Bancontact";
7070
$_['name_mollie_paypal'] = "PayPal";
7171
$_['name_mollie_paysafecard'] = "paysafecard";
7272
$_['name_mollie_sofort'] = "SOFORT Banking";
@@ -79,6 +79,10 @@
7979
$_['name_mollie_przelewy24'] = 'P24';
8080
$_['name_mollie_applepay'] = 'Apple Pay';
8181

82+
// Deprecated names
83+
$_['name_mollie_bitcoin'] = "Bitcoin";
84+
$_['name_mollie_mistercash'] = "Bancontact/MisterCash";
85+
8286
// Text
8387
$_['text_edit'] = "Éditer Mollie";
8488
$_['text_payment'] = "Paiement";

admin/language/german/payment/mollie.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@
6060
$_['footer_text'] = "Zahlungsdienste";
6161

6262
// Module names
63+
$_['name_mollie_bancontact'] = "Bancontact";
6364
$_['name_mollie_banktransfer'] = "Übertragung";
6465
$_['name_mollie_belfius'] = "Belfius Direct Net";
6566
$_['name_mollie_creditcard'] = "Creditcard";
6667
$_['name_mollie_directdebit'] = "Einmaliges Inkasso";
6768
$_['name_mollie_ideal'] = "iDEAL";
6869
$_['name_mollie_kbc'] = "KBC/CBC-Betaalknop";
69-
$_['name_mollie_mistercash'] = "Bancontact/MisterCash";
7070
$_['name_mollie_paypal'] = "PayPal";
7171
$_['name_mollie_paysafecard'] = "paysafecard";
7272
$_['name_mollie_sofort'] = "SOFORT Banking";
@@ -79,6 +79,10 @@
7979
$_['name_mollie_przelewy24'] = 'P24';
8080
$_['name_mollie_applepay'] = 'Apple Pay';
8181

82+
// Deprecated names
83+
$_['name_mollie_bitcoin'] = "Bitcoin";
84+
$_['name_mollie_mistercash'] = "Bancontact/MisterCash";
85+
8286
// Text
8387
$_['text_edit'] = "Mollie bearbeiten";
8488
$_['text_payment'] = "Bezahlung";

admin/language/spanish/payment/mollie.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@
6060
$_['footer_text'] = "Servicios de pago";
6161

6262
// Module names
63+
$_['name_mollie_bancontact'] = "Bancontact";
6364
$_['name_mollie_banktransfer'] = "Transferencia bancaria";
6465
$_['name_mollie_belfius'] = "Belfius Direct Net";
6566
$_['name_mollie_creditcard'] = "Creditcard";
6667
$_['name_mollie_directdebit'] = "Adeudo bancario";
6768
$_['name_mollie_ideal'] = "iDEAL";
6869
$_['name_mollie_kbc'] = "KBC/CBC-Betaalknop";
69-
$_['name_mollie_mistercash'] = "Bancontact/MisterCash";
7070
$_['name_mollie_paypal'] = "PayPal";
7171
$_['name_mollie_paysafecard'] = "paysafecard";
7272
$_['name_mollie_sofort'] = "SOFORT Banking";
@@ -79,6 +79,10 @@
7979
$_['name_mollie_przelewy24'] = 'P24';
8080
$_['name_mollie_applepay'] = 'Apple Pay';
8181

82+
// Deprecated names
83+
$_['name_mollie_bitcoin'] = "Bitcoin";
84+
$_['name_mollie_mistercash'] = "Bancontact/MisterCash";
85+
8286
// Text
8387
$_['text_edit'] = "Corregir Mollie";
8488
$_['text_payment'] = "Pago";

catalog/controller/payment/mollie/base.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public function index()
217217
$data['entry_verification_code'] = $this->language->get('entry_verification_code');
218218
$data['text_card_details'] = $this->language->get('text_card_details');
219219
$data['error_card'] = $this->language->get('error_card');
220-
$data['text_mollie_payments'] = sprintf($this->language->get('text_mollie_payments'), '<a href="https://www.mollie.com/" target="_blank"><img src=" https://www.mollie.com/images/logo.png" alt="Mollie" border="0"></a>');
220+
$data['text_mollie_payments'] = sprintf($this->language->get('text_mollie_payments'), '<a href="https://www.mollie.com/" target="_blank"><img src="https://www.mollie.com/checkout/v3/images/icons/ui/logo.svg" alt="Mollie" border="0"></a>');
221221

222222
// Mollie components
223223
$data['mollieComponents'] = false;
@@ -1093,17 +1093,6 @@ public function createShipment(&$route, &$data, $orderID = "", $orderStatusID =
10931093
*/
10941094
public function callback()
10951095
{
1096-
if(isset($_SERVER['HTTP_REFERER']) && !stristr($_SERVER['HTTP_REFERER'], "www.mollie.com")) {
1097-
1098-
if (isset($this->session->data['order_id'])) {
1099-
$this->cart->clear();
1100-
unset($this->session->data['order_id']);
1101-
}
1102-
1103-
$this->redirect($this->url->link("common/home", "", "SSL"));
1104-
return '';
1105-
}
1106-
11071096
$moduleCode = MollieHelper::getModuleCode();
11081097
$order_id = $this->getOrderID();
11091098

@@ -1160,13 +1149,15 @@ public function callback()
11601149

11611150
}
11621151

1163-
if (($orderDetails->isPaid() || $orderDetails->isAuthorized()) && $order['order_status_id'] != $paid_status_id) {
1152+
$orderStatuses = $model->getOrderStatuses($order['order_id']);
1153+
1154+
if (($orderDetails->isPaid() || $orderDetails->isAuthorized()) && !in_array($paid_status_id, $orderStatuses)) {
11641155
$this->addOrderHistory($order, $paid_status_id, $this->language->get("response_success"), true);
11651156
$order['order_status_id'] = $paid_status_id;
11661157
} else if(!empty($orderDetails->_embedded->payments)) {
11671158

11681159
$payment = $orderDetails->_embedded->payments[0];
1169-
if (($payment->status == 'paid') && ($order['order_status_id'] != $paid_status_id)) {
1160+
if (($payment->status == 'paid') && !in_array($paid_status_id, $orderStatuses)) {
11701161
$this->addOrderHistory($order, $paid_status_id, $this->language->get("response_success"), true);
11711162
$order['order_status_id'] = $paid_status_id;
11721163
}

catalog/controller/payment/mollie/helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
class MollieHelper
77
{
8-
const PLUGIN_VERSION = "9.2.2";
8+
const PLUGIN_VERSION = "9.2.3";
99
const OUTH_URL = 'https://api.mollie.com/oauth2';
1010

1111
// All available modules. These should correspond to the Mollie_API_Object_Method constants.

catalog/model/payment/mollie/base.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,17 @@ public function checkMollieOrderID($mollie_order_id)
281281
return FALSE;
282282
}
283283

284+
public function getOrderStatuses($order_id) {
285+
$results = $this->db->query("SELECT DISTINCT order_status_id FROM `" . DB_PREFIX . "order_history` WHERE `order_id` = '" . $order_id . "'");
286+
287+
$orderStatuses = array();
288+
if(!empty($results->rows)) {
289+
foreach($results->rows as $row) {
290+
$orderStatuses[] = $row['order_status_id'];
291+
}
292+
}
293+
294+
return $orderStatuses;
295+
}
296+
284297
}

catalog/view/theme/default/template/payment/mollie_checkout_form.tpl

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
<div class="checkout-content">
2-
<form action="<?php echo $action; ?>" method="post" id="mollie_payment_form">
2+
<form action="<?php echo $action; ?>" method="post" id="mollie_payment_form" <?php if(!$mollieComponents) { echo 'class="form-horizontal"'; } ?>>
33
<div class="buttons">
44
<?php if (!empty($issuers)) { ?>
5-
<div class="left pull-left">
6-
<label style="width:auto !important">
7-
<img src="<?php echo $image; ?>" width="20" style="float:left; margin-right:0.5em; margin-top:-3px" />
8-
<strong><?php echo $text_issuer; ?>:</strong>
9-
10-
<select name="mollie_issuer" style="margin-left:1em" id="mollie_issuers">
11-
<option value="">&mdash;</option>
12-
<?php foreach ($issuers as $issuer) { ?>
13-
<option value="<?php echo $issuer->id; ?>"><?php echo $issuer->name; ?></option>
14-
<?php } ?>
15-
</select>
16-
</label>
17-
</div>
5+
<div class="form-group pull-left">
6+
<label class="col-sm-6 control-label"><img src="<?php echo $image; ?>" width="20" /> <strong><?php echo $text_issuer; ?>:</strong></label>
7+
<div class="col-sm-6">
8+
<select name="mollie_issuer" id="mollie_issuers" class="form-control">
9+
<option value="">&mdash;</option>
10+
<?php foreach ($issuers as $issuer) { ?>
11+
<option value="<?php echo $issuer->id; ?>"><?php echo $issuer->name; ?></option>
12+
<?php } ?>
13+
</select>
14+
</div>
15+
</div>
1816
<?php } ?>
1917
<?php if($mollieComponents) { ?>
2018
<div class="left pull-left">
@@ -155,15 +153,7 @@
155153
}
156154
.mollie-component.is-invalid {
157155
<?php echo $invalid_input_css['other_css']; ?>
158-
}
159-
160-
.mollie-text img {
161-
height: 21px;
162-
width: auto;
163-
position: relative;
164-
top: -3px;
165-
left: -6px;
166-
}
156+
}
167157
168158
.journal-checkout #payment-confirm-button .buttons {
169159
display: block !important;
@@ -189,10 +179,21 @@
189179
<?php } ?>
190180
<?php } ?>
191181
<?php if(empty($issuers) && !$mollieComponents) { ?>
192-
#payment-confirm-button {
193-
display: none;
194-
}
182+
#payment-confirm-button {
183+
display: none;
184+
}
195185
<?php } ?>
186+
187+
.mollie-text img {
188+
position: relative;
189+
top: -3px;
190+
}
191+
192+
.mollie-text {
193+
clear: both;
194+
margin-left: 7px;
195+
}
196+
196197
</style>
197198
</form>
198199
</div>

0 commit comments

Comments
 (0)