execute($sql)) { return false; } if (!$module->installOrderState()) { return false; } if (!$module->registerHook('header') || !$module->registerHook('displayBackOfficeHeader') || !$module->registerHook('displayFooterProduct') || !$module->registerHook('actionBeforeCartUpdateQty') || !$module->registerHook('displayReassurance') || !$module->registerHook('actionObjectCurrencyAddAfter')) { return false; } if (!Configuration::updateValue('PAYPAL_BRAINTREE_ENABLED', 0) || !Configuration::updateValue('PAYPAL_CRON_TIME', date('Y-m-d H:m:s')) || !Configuration::updateValue('PAYPAL_BY_BRAINTREE', 0)) { return false; } if (Configuration::get('PAYPAL_METHOD') == "EXPRESS_CHECKOUT") { if (Configuration::get('PAYPAL_LIVE_ACCESS') || Configuration::get('PAYPAL_SANDBOX_ACCESS')) { Configuration::updateValue('PAYPAL_METHOD', 'EC'); if (Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT')) == "FR" || Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT')) == "UK") { Configuration::updateValue('PAYPAL_API_CARD', 0); } } else { Configuration::updateValue('PAYPAL_METHOD', ''); } } return true; }