Skip to content

Commit

Permalink
PSPAYPAL-815 remove bug in moddule setting, remove duplicate key
Browse files Browse the repository at this point in the history
  • Loading branch information
René Gust committed Dec 12, 2024
1 parent 5bd8568 commit 40b05d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 1 addition & 5 deletions metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@
'modules/osc/paypal/vaultedpaymentsources_flow.tpl' => 'osc/paypal/views/tpl/flow/vaulting/vaultedpaymentsources.tpl',
'modules/osc/paypal/vaultedpaymentsources_wave.tpl' => 'osc/paypal/views/tpl/wave/vaulting/vaultedpaymentsources.tpl',
],
'events' => [
'onActivate' => '\OxidSolutionCatalysts\PayPal\Core\Events\Events::onActivate',
'onDeactivate' => '\OxidSolutionCatalysts\PayPal\Core\Events\Events::onDeactivate'
],
'blocks' => [
[
'template' => 'headitem.tpl',
Expand Down Expand Up @@ -601,7 +597,7 @@
],
[
'name' => 'oscPayPalDefaultShippingPriceExpress',
'type' => 'str',
'type' => 'float',
'value' => 3.5,
'group' => null
],
Expand Down
5 changes: 3 additions & 2 deletions src/Service/ModuleSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,10 @@ public function save(string $name, $value): void

if ($moduleSetting->getType() === 'str') {
$value = trim($value);
}
if ($moduleSetting->getType() === 'bool') {
} else if ($moduleSetting->getType() === 'bool') {
$value = (bool)$value;
} else if ($moduleSetting->getType() === 'float') {
$value = (float)trim($value);
}

$this->moduleSettingBridge->save($name, $value, Module::MODULE_ID);
Expand Down

0 comments on commit 40b05d6

Please sign in to comment.