Skip to content

Commit

Permalink
Merge pull request #316 from mollie/13.1.0
Browse files Browse the repository at this point in the history
13.1.0
  • Loading branch information
QualityWorks authored Mar 13, 2024
2 parents af2e320 + 52e447b commit 914718a
Show file tree
Hide file tree
Showing 256 changed files with 2,298 additions and 937 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# Changelog #

#### Changes in release 13.1.0
+ New upcoming payment methods in next version - Twint, Blik, Bancomat Pay
+ Bugfix and improvements

#### Changes in release 13.0.0
+ Removed VQMod from module for opencart version 4 - now uses events
+ Added 'Payment Link' payment method for orders created through admin
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
include_once(DIR_APPLICATION . "controller/payment/mollie_bancomatpay.php");
class ControllerExtensionPaymentMollieBancomatpay extends ControllerPaymentMollieBancomatpay{}
?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
include_once(DIR_APPLICATION . "controller/payment/mollie_blik.php");
class ControllerExtensionPaymentMollieBlik extends ControllerPaymentMollieBlik{}
?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
include_once(DIR_APPLICATION . "controller/payment/mollie_twint.php");
class ControllerExtensionPaymentMollieTwint extends ControllerPaymentMollieTwint{}
?>
40 changes: 23 additions & 17 deletions Opencart 1.5 - 3.x/admin/controller/payment/mollie/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function __construct($registry) {
*/
protected function getAPIClient ($store = 0) {
$data = $this->data;
$data[$this->mollieHelper->getModuleCode() . "_api_key"] = $this->mollieHelper->getApiKey($store);
$data[$this->mollieHelper->getModuleCode() . "_api_key"] = (string)$this->mollieHelper->getApiKey($store);

return $this->mollieHelper->getAPIClientAdmin($data);
}
Expand Down Expand Up @@ -971,6 +971,7 @@ public function index () {
$data['text_pay_link_text'] = $this->language->get('text_pay_link_text');
$data['text_recurring_payment'] = $this->language->get('text_recurring_payment');
$data['text_payment_link'] = $this->language->get('text_payment_link');
$data['text_coming_soon'] = $this->language->get('text_coming_soon');

$data['title_global_options'] = $this->language->get('title_global_options');
$data['title_payment_status'] = $this->language->get('title_payment_status');
Expand Down Expand Up @@ -999,6 +1000,9 @@ public function index () {
$data['name_mollie_mybank'] = $this->language->get('name_mollie_mybank');
$data['name_mollie_billie'] = $this->language->get('name_mollie_billie');
$data['name_mollie_klarna'] = $this->language->get('name_mollie_klarna');
$data['name_mollie_twint'] = $this->language->get('name_mollie_twint');
$data['name_mollie_blik'] = $this->language->get('name_mollie_blik');
$data['name_mollie_bancomatpay'] = $this->language->get('name_mollie_bancomatpay');
// Deprecated names
$data['name_mollie_bitcoin'] = $this->language->get('name_mollie_bitcoin');
$data['name_mollie_mistercash'] = $this->language->get('name_mollie_mistercash');
Expand Down Expand Up @@ -1575,22 +1579,24 @@ private function getUpdateUrl() {
$client = new mollieHttpClient();
$info = $client->get(MOLLIE_VERSION_URL);

if(strpos($info["tag_name"], 'oc3') !== false) {
$tag_name = explode('_', explode("-", $info["tag_name"])[0]); // New tag_name = oc3_version-oc4_version
} else {
$tag_name = ["oc3", $info["tag_name"]]; // Old tag_name = release version
if (isset($info["tag_name"])) {
if(strpos($info["tag_name"], 'oc3') !== false) {
$tag_name = explode('_', explode("-", $info["tag_name"])[0]); // New tag_name = oc3_version-oc4_version
} else {
$tag_name = ["oc3", $info["tag_name"]]; // Old tag_name = release version
}

if (isset($tag_name[0]) && ($tag_name[0] == 'oc3')) {
if (isset($tag_name[1]) && ($tag_name[1] != MOLLIE_VERSION) && version_compare(MOLLIE_VERSION, $tag_name[1], "<")) {
$updateUrl = array(
"updateUrl" => $this->url->link("payment/mollie_" . static::MODULE_NAME . "/update", $this->token, 'SSL'),
"updateVersion" => $tag_name[1]
);

return $updateUrl;
}
}
}

if (isset($tag_name[0]) && ($tag_name[0] == 'oc3')) {
if (isset($tag_name[1]) && ($tag_name[1] != MOLLIE_VERSION) && version_compare(MOLLIE_VERSION, $tag_name[1], "<")) {
$updateUrl = array(
"updateUrl" => $this->url->link("payment/mollie_" . static::MODULE_NAME . "/update", $this->token, 'SSL'),
"updateVersion" => $tag_name[1]
);

return $updateUrl;
}
}

return false;
}
Expand Down Expand Up @@ -1955,7 +1961,7 @@ protected function savePaymentFeeSettings() {
}

if (!empty($paymentFee)) {
if (version_compare(VERSION, '2.0', '>=')) {
if (version_compare(VERSION, '2.1', '>=')) {
$this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', code = '" . $this->db->escape($code2) . "', `key` = '" . $this->db->escape($code2 . '_charge') . "', `value` = '" . $this->db->escape(json_encode($paymentFee, true)) . "', serialized = '1'");
} else {
$this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `group` = '" . $this->db->escape($code2) . "', `key` = '" . $this->db->escape($code2 . '_charge') . "', `value` = '" . $this->db->escape(serialize($paymentFee)) . "', serialized = '1'");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
require_once(DIR_APPLICATION . "controller/payment/mollie/base.php");

class ControllerPaymentMollieBancomatpay extends ControllerPaymentMollieBase
{
const MODULE_NAME = MollieHelper::MODULE_NAME_BANCOMATPAY;
}
7 changes: 7 additions & 0 deletions Opencart 1.5 - 3.x/admin/controller/payment/mollie_blik.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
require_once(DIR_APPLICATION . "controller/payment/mollie/base.php");

class ControllerPaymentMollieBlik extends ControllerPaymentMollieBase
{
const MODULE_NAME = MollieHelper::MODULE_NAME_BLIK;
}
7 changes: 7 additions & 0 deletions Opencart 1.5 - 3.x/admin/controller/payment/mollie_twint.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
require_once(DIR_APPLICATION . "controller/payment/mollie/base.php");

class ControllerPaymentMollieTwint extends ControllerPaymentMollieBase
{
const MODULE_NAME = MollieHelper::MODULE_NAME_TWINT;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_bancomatpay.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_blik.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_twint.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_bancomatpay'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_blik'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_twint'];
7 changes: 7 additions & 0 deletions Opencart 1.5 - 3.x/admin/language/danish/payment/mollie.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
$_['text_mollie_mybank'] = $method_list_logo;
$_['text_mollie_billie'] = $method_list_logo;
$_['text_mollie_klarna'] = $method_list_logo;
$_['text_mollie_twint'] = $method_list_logo;
$_['text_mollie_blik'] = $method_list_logo;
$_['text_mollie_bancomatpay'] = $method_list_logo;

// Heading
$_['heading_title'] = "Mollie";
Expand Down Expand Up @@ -87,6 +90,9 @@
$_['name_mollie_mybank'] = "MyBank";
$_['name_mollie_billie'] = "Billie";
$_['name_mollie_klarna'] = "Pay with Klarna";
$_['name_mollie_twint'] = "Twint";
$_['name_mollie_blik'] = "Blik";
$_['name_mollie_bancomatpay'] = "Bancomat Pay";

// Text
$_['text_edit'] = "Redigere";
Expand Down Expand Up @@ -135,6 +141,7 @@
$_['text_pay_link_text'] = "Dear customer, <br /><br /> Click on the link below to complete your payment of {amount} for the order {order_id}.<br /><br /> {payment_link}<br /><br /><br /><br />Regards,<br /><br />{store_name}";
$_['text_recurring_payment'] = "Tilbagevendende betaling";
$_['text_payment_link'] = "Betalingslink";
$_['text_coming_soon'] = "Kommer snart";

// Entry
$_['entry_payment_method'] = "Betalingsmetode";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_bancomatpay'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_blik'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_applepay'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_bancomatpay.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_blik.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_twint.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_bancomatpay'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_blik'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_twint'];
7 changes: 7 additions & 0 deletions Opencart 1.5 - 3.x/admin/language/dutch/payment/mollie.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
$_['text_mollie_mybank'] = $method_list_logo;
$_['text_mollie_billie'] = $method_list_logo;
$_['text_mollie_klarna'] = $method_list_logo;
$_['text_mollie_twint'] = $method_list_logo;
$_['text_mollie_blik'] = $method_list_logo;
$_['text_mollie_bancomatpay'] = $method_list_logo;

// Heading
$_['heading_title'] = "Mollie";
Expand Down Expand Up @@ -87,6 +90,9 @@
$_['name_mollie_mybank'] = "MyBank";
$_['name_mollie_billie'] = "Billie";
$_['name_mollie_klarna'] = "Pay with Klarna";
$_['name_mollie_twint'] = "Twint";
$_['name_mollie_blik'] = "Blik";
$_['name_mollie_bancomatpay'] = "Bancomat Pay";

// Text
$_['text_edit'] = "Bewerk Mollie";
Expand Down Expand Up @@ -135,6 +141,7 @@
$_['text_pay_link_text'] = "Dear customer, <br /><br /> Click on the link below to complete your payment of {amount} for the order {order_id}.<br /><br /> {payment_link}<br /><br /><br /><br />Regards,<br /><br />{store_name}";
$_['text_recurring_payment'] = "Terugkomende betaling";
$_['text_payment_link'] = "Betalingslink";
$_['text_coming_soon'] = "Binnenkort beschikbaar";

// Entry
$_['entry_payment_method'] = "Betaalmethode";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_bancomatpay'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_blik'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_applepay'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_bancomatpay.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_blik.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_twint.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_bancomatpay'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_blik'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_twint'];
7 changes: 7 additions & 0 deletions Opencart 1.5 - 3.x/admin/language/english/payment/mollie.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
$_['text_mollie_mybank'] = $method_list_logo;
$_['text_mollie_billie'] = $method_list_logo;
$_['text_mollie_klarna'] = $method_list_logo;
$_['text_mollie_twint'] = $method_list_logo;
$_['text_mollie_blik'] = $method_list_logo;
$_['text_mollie_bancomatpay'] = $method_list_logo;

// Heading
$_['heading_title'] = "Mollie";
Expand Down Expand Up @@ -87,6 +90,9 @@
$_['name_mollie_mybank'] = "MyBank";
$_['name_mollie_billie'] = "Billie";
$_['name_mollie_klarna'] = "Pay with Klarna";
$_['name_mollie_twint'] = "Twint";
$_['name_mollie_blik'] = "Blik";
$_['name_mollie_bancomatpay'] = "Bancomat Pay";

// Text
$_['text_edit'] = "Edit";
Expand Down Expand Up @@ -135,6 +141,7 @@
$_['text_pay_link_text'] = "Dear customer, <br /><br /> Click on the link below to complete your payment of {amount} for the order {order_id}.<br /><br /> {payment_link}<br /><br /><br /><br />Regards,<br /><br />{store_name}";
$_['text_recurring_payment'] = "Recurring Payment";
$_['text_payment_link'] = "Payment Link";
$_['text_coming_soon'] = "Coming Soon";

// Entry
$_['entry_payment_method'] = "Payment method";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_bancomatpay'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_blik'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_applepay'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_bancomatpay.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_blik.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_twint.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_bancomatpay'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_blik'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_twint'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_bancomatpay.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_blik.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_twint.php");
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_bancomatpay'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_blik'];
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_twint'];
Loading

0 comments on commit 914718a

Please sign in to comment.