Skip to content

Commit

Permalink
upgrade file, version increase, changelog update
Browse files Browse the repository at this point in the history
  • Loading branch information
mandan2 committed Jul 24, 2023
1 parent 6d03a4a commit ee97968
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# Changelog #

## Changes in release 6.0.2 ##
+ Decoupled Apple Pay direct feature flag into product and cart separate settings.

## Changes in release 6.0.1 ##
+ Fixed payment fee tax problems and improved fee set-up process.
+ Sync Mollie components and Single click flag to the environment selected.
Expand Down
2 changes: 1 addition & 1 deletion mollie.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function __construct()
{
$this->name = 'mollie';
$this->tab = 'payments_gateways';
$this->version = '6.0.1';
$this->version = '6.0.2';
$this->author = 'Mollie B.V.';
$this->need_instance = 1;
$this->bootstrap = true;
Expand Down
3 changes: 2 additions & 1 deletion src/Service/SettingsSaveService.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ public function saveSettings(&$errors = [])
try {
$this->applePayDirectCertificateHandler->handle();
} catch (ApplePayDirectCertificateCreation $e) {
$isApplePayDirectProductEnabled = $isApplePayDirectCartEnabled = false;
$isApplePayDirectProductEnabled = false;
$isApplePayDirectCartEnabled = false;

$errors[] = $e->getMessage();
$errors[] = TagsUtility::ppTags(
Expand Down
31 changes: 31 additions & 0 deletions upgrade/Upgrade-6.0.2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

/**
* Mollie https://www.mollie.nl
*
* @author Mollie B.V. <info@mollie.nl>
* @copyright Mollie B.V.
* @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md
*
* @see https://github.com/mollie/PrestaShop
*/

use Mollie\Adapter\ConfigurationAdapter;
use Mollie\Config\Config;

if (!defined('_PS_VERSION_')) {
exit;
}

function upgrade_module_6_0_2(Mollie $module): bool
{
/** @var ConfigurationAdapter $configuration */
$configuration = $module->getService(ConfigurationAdapter::class);

$configuration->updateValue(Config::MOLLIE_APPLE_PAY_DIRECT_PRODUCT, Configuration::get('MOLLIE_APPLE_PAY_DIRECT'));
$configuration->updateValue(Config::MOLLIE_APPLE_PAY_DIRECT_PRODUCT, Configuration::get('MOLLIE_APPLE_PAY_DIRECT'));

$configuration->delete('MOLLIE_APPLE_PAY_DIRECT');

return true;
}

0 comments on commit ee97968

Please sign in to comment.