diff --git a/metadata.php b/metadata.php index 4ed95e4ba..d69766856 100755 --- a/metadata.php +++ b/metadata.php @@ -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', @@ -601,7 +597,7 @@ ], [ 'name' => 'oscPayPalDefaultShippingPriceExpress', - 'type' => 'str', + 'type' => 'float', 'value' => 3.5, 'group' => null ], diff --git a/src/Service/ModuleSettings.php b/src/Service/ModuleSettings.php index 954988644..241edcc9e 100755 --- a/src/Service/ModuleSettings.php +++ b/src/Service/ModuleSettings.php @@ -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);