diff --git a/.travis.yml b/.travis.yml index 1ac78a82..ce8437b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: -- 5.5 - 5.6 - 7.0 - 7.1 @@ -20,3 +19,15 @@ script: - composer validate --strict - find admin catalog -path catalog/controller/payment/mollie-api-client -prune -o -name '*.php' | xargs -n 1 -P4 php -l - vendor/bin/phpunit -c tests/phpunit.xml + +before_deploy: +- bash release.sh + +deploy: + provider: releases + api_key: + secure: "N9Gtz2Cyxo8LPsMOKMcuGViL7Tn+vu0C2AkUzo6+mvEqYx8Vl8VisKCapjNnCPBGz084YVQ6yIj2q3jDrRPqHwkhc5Hvd5tFVVsrxZhxo7z4EDujkA21i8uTVtXr4a/DL/JfE1dEzdu+LP0DniR0TIn+fAJcgmqAUCLkhqclNDQ=" + file: mollie-opencart-1.5-and-up.vqmod.zip + skip_cleanup: true + on: + tags: true \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a94f59fd..e23f8e5b 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,69 @@ # Changelog # +#### Changes in release 9.0.4 + + Added conditional checking for OC 1.5, so OCMod checks are not attempted on a version that doesn't support it. + +#### Changes in release 9.0.3 + + Fixed settings randomly disappearing from admin. + + Added support for VQMod/OCMod combinations. + + Rounding fix. + + Fixed missing translation button label. + + Fixed cleanup function. + + Send webhook URL on order creation. + + Check payment status on success page. + +#### Changes in release 9.0.2 + + Fixed a bug in the module update functionality. + +#### Changes in release 9.0.1 + + Correctly calculate taxes. + + Unselect payment method for store is possible again. + + Fixed "Undefined index: iso_code_2" in one page checkouts. + + Less warnings about adding an API key in the backend. + + "Amount is lower than minimum" bugfix. + + Fixed loading Belfius controller (thanks @KevinJDurant). + + Fixed switched translations for EPS and Giropay (thanks @pvdptje). + + Added support for 3rd party totals. + + Minor improvements to documentation. + + Removed possibility of sending html entities to Mollie API. + + Made API key a mandatory field. + + Added support for OC events in the versions that support it. + + Added "shipping after complete status" functionality. + +#### Changes in release 9.0.0 + + Added version support for OpenCart 1.5.x to 3.x in one module, no need to download a separate version anymore; + + Added Klarna payment methods; + + Added Mollie Order API and Shipment API; + + Added update functionality right from the module itself, linked to new Github releases; + + Added multi currency support; + + Improved payment method display based on Mollie settings; + + Bugfixes: fixed amount.value errors with totals over 1000 EU, errors when checking out with USD, setting price limits, entering API key. + +#### Changes in release 8.4.2 + + Fixed error in total price that gave a amount.value error on totals over 1000 eu. + +#### Changes in release 8.4.1 + + Fixed the error with rounded order totals in 2.2-and-lower version giving the following error: "Error executing API call (422: Unprocessable Entity): The amount contains an invalid value. Field: amount.value." + + Fixed language file switch of EPS and Giropay payment methods. + + Removed remaining Mistercash language files from the admin dir for the 2.3+ version. + +#### Changes in release 8.4.0 + + Added support for Mollie API v2. + + Added German (DE) and Spanish (ES) language support in the module. + + Added EPS and Giropay payment methods. + + Renamed MisterCash to Bancontact according to Mollie specifications. + +#### Changes in release 8.3.2 + + Bugfix in the array with available Locale + +#### Changes in release 8.3.1 + + Locale: use en_US if user Locale is not supported + +#### Changes in release 8.3.0 + + ING Home'Pay added as payment method + + Cleanup check for already installed modules that are updated + #### Changes in release 8.2.3 + Improved logging for future debugging + Minor bug fixes. diff --git a/catalog/controller/payment/mollie/helper.php b/catalog/controller/payment/mollie/helper.php index 6aad449a..3f2c46f1 100644 --- a/catalog/controller/payment/mollie/helper.php +++ b/catalog/controller/payment/mollie/helper.php @@ -5,7 +5,7 @@ class MollieHelper { - const PLUGIN_VERSION = "9.0.3"; + const PLUGIN_VERSION = "9.0.4"; // All available modules. These should correspond to the Mollie_API_Object_Method constants. const MODULE_NAME_BANKTRANSFER = "banktransfer"; diff --git a/composer.json b/composer.json index 9ed479ee..2e8a5cc6 100755 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "license": "BSD-2-Clause", "require": { - "php": ">=5.4.0", + "php": ">=5.6.0", "ext-curl": "*", "ext-openssl": "*" }, diff --git a/system/comercia/load.php b/system/comercia/load.php index 41c0fd97..3fca0f99 100644 --- a/system/comercia/load.php +++ b/system/comercia/load.php @@ -22,9 +22,9 @@ function library($library) $bestOption = $this->findBestOption($libDir, $library, "php"); if (!class_exists($className)) { if (class_exists("VQMod")) { - @include_once(\VQMod::modCheck(modification($libDir . $bestOption["name"] . ".php"), $libDir . $bestOption["name"] . ".php")); + @include_once(\VQMod::modCheck($this->modification($libDir . $bestOption["name"] . ".php"), $libDir . $bestOption["name"] . ".php")); } else { - @include_once(modification($libDir . $bestOption["name"] . ".php")); + @include_once($this->modification($libDir . $bestOption["name"] . ".php")); } } @@ -108,9 +108,9 @@ function model($model) $className = $route["class"]; if (!class_exists($className)) { if (class_exists("VQMod")) { - @include_once(\VQMod::modCheck(modification($modelDir . $route["file"] . ".php"), $modelDir . $route["file"] . ".php")); + @include_once(\VQMod::modCheck($this->modification($modelDir . $route["file"] . ".php"), $modelDir . $route["file"] . ".php")); } else { - @include_once(modification($modelDir . $route["file"] . ".php")); + @include_once($this->modification($modelDir . $route["file"] . ".php")); } } @@ -119,8 +119,8 @@ function model($model) //Check for events if(Util::version()->isMinimal("2.2")) { $result = new \Proxy(); - - $r = new \ReflectionMethod('Loader', 'callback'); + + $r = new \ReflectionMethod('Loader', 'callback'); $r->setAccessible(true); foreach (get_class_methods($className) as $method) { @@ -129,7 +129,7 @@ function model($model) } else { $result = new $className(Util::registry()); } - + Util::registry()->set(Util::stringHelper()->ccToUnderline($className), $result); return $result; } @@ -234,9 +234,9 @@ function view($view, $data = array()) } $fakeControllerFile = __DIR__ . "/fakeController.php"; if (class_exists("VQMod")) { - require_once(\VQMod::modCheck(modification($fakeControllerFile), $fakeControllerFile)); + require_once(\VQMod::modCheck($this->modification($fakeControllerFile), $fakeControllerFile)); } else { - require_once(modification($fakeControllerFile)); + require_once($this->modification($fakeControllerFile)); } $controller = new FakeController($registry); $result = $controller->getView($view, $data); @@ -326,9 +326,9 @@ function controller($controller) $className = $route["class"]; if (!class_exists($className)) { if (class_exists("VQMod")) { - @include_once(\VQMod::modCheck(modification($controllerDir . $route["file"] . ".php"), $controllerDir . $route["file"] . ".php")); + @include_once(\VQMod::modCheck($this->modification($controllerDir . $route["file"] . ".php"), $controllerDir . $route["file"] . ".php")); } else { - @include_once(modification($controllerDir . $route["file"] . ".php")); + @include_once($this->modification($controllerDir . $route["file"] . ".php")); } } @@ -368,12 +368,16 @@ private function rewriteModel($model) "" => "sale/custom_field", "2.1" => "customer/custom_field" ], + [ + "" => "sale/customer_group", + "2.1" => "customer/customer_group" + ], [ "" => "setting/extension", "2.0" => "extension/extension", "3.0" => "setting/extension" ], - [ + [ "" => "extension/event", "3.0" => "setting/event" ] @@ -393,23 +397,25 @@ private function rewriteLanguage($model) ] ); } - - // Modification Override + + // Modification Override function modification($filename) { - if (defined('DIR_CATALOG')) { - $file = DIR_MODIFICATION . 'admin/' . substr($filename, strlen(DIR_APPLICATION)); - } elseif (defined('DIR_OPENCART')) { - $file = DIR_MODIFICATION . 'install/' . substr($filename, strlen(DIR_APPLICATION)); - } else { - $file = DIR_MODIFICATION . 'catalog/' . substr($filename, strlen(DIR_APPLICATION)); - } + if (Util::version()->isMinimal(2.0)) { + if (defined('DIR_CATALOG')) { + $file = DIR_MODIFICATION . 'admin/' . substr($filename, strlen(DIR_APPLICATION)); + } elseif (defined('DIR_OPENCART')) { + $file = DIR_MODIFICATION . 'install/' . substr($filename, strlen(DIR_APPLICATION)); + } else { + $file = DIR_MODIFICATION . 'catalog/' . substr($filename, strlen(DIR_APPLICATION)); + } - if (substr($filename, 0, strlen(DIR_SYSTEM)) == DIR_SYSTEM) { - $file = DIR_MODIFICATION . 'system/' . substr($filename, strlen(DIR_SYSTEM)); - } + if (substr($filename, 0, strlen(DIR_SYSTEM)) == DIR_SYSTEM) { + $file = DIR_MODIFICATION . 'system/' . substr($filename, strlen(DIR_SYSTEM)); + } - if (is_file($file)) { - return $file; + if (is_file($file)) { + return $file; + } } return $filename;