private function setCustomSettings($client_id, $client_secret, $country) { if ($country == "MLB" || $country == "MLM" || $country == "MLA") { Configuration::updateValue('MERCADOPAGO_CREDITCARD_BANNER', (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://') . htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8') . __PS_BASE_URI__ . 'modules/mercadopago/views/img/' . $country . '/credit_card.png'); Configuration::updateValue('MERCADOPAGO_CREDITCARD_ACTIVE', 'true'); Configuration::updateValue('MERCADOPAGO_STANDARD_ACTIVE', 'false'); // set all offline payment settings $mp = new MP($client_id, $client_secret); $offline_methods_payments = $mp->getOfflinePaymentMethods(); foreach ($offline_methods_payments as $offline_payment) { $op_banner_variable = 'MERCADOPAGO_' . strtoupper($offline_payment['id'] . '_BANNER'); Configuration::updateValue($op_banner_variable, $offline_payment['secure_thumbnail']); $op_active_variable = 'MERCADOPAGO_' . strtoupper($offline_payment['id'] . '_ACTIVE'); Configuration::updateValue($op_active_variable, 'true'); } } else { Configuration::updateValue('MERCADOPAGO_STANDARD_ACTIVE', 'true'); } Configuration::updateValue('MERCADOPAGO_STANDARD_BANNER', (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://') . htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8') . __PS_BASE_URI__ . 'modules/mercadopago/views/img/' . $country . '/banner_all_methods.png'); }