mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 19:40:44 +01:00
Fix SOAP e CURL
This commit is contained in:
parent
5d7a9a8b97
commit
c5430fb98b
@ -312,7 +312,9 @@ if (empty($creation) && (!file_exists('config.inc.php') || !$valid_config)) {
|
||||
<div id="steps">
|
||||
|
||||
<div id="step-1">
|
||||
<p>'.tr('Benvenuto in <strong>OpenSTAManager</strong>!').'</p>
|
||||
<p>'.tr('Benvenuto in _NAME_!', [
|
||||
'_NAME_' => '<strong>OpenSTAManager</strong>',
|
||||
]).'</p>
|
||||
<p>'.tr("Prima di procedere alla configurazione e all'installazione del software, sono necessari alcuni accorgimenti per garantire il corretto funzionamento del gestionale").'. '.tr('Stai utilizzando la versione PHP _PHP_', [
|
||||
'_PHP_' => phpversion(),
|
||||
]).'.</p>
|
||||
@ -332,6 +334,8 @@ if (empty($creation) && (!file_exists('config.inc.php') || !$valid_config)) {
|
||||
'pdo_mysql' => tr('Necessario per la connessione al database'),
|
||||
'openssl' => tr('Utile per la generazione di chiavi complesse (facoltativo)'),
|
||||
'intl' => tr('Utile per la gestione automatizzata della conversione numerica (facoltativo)'),
|
||||
'soap' => tr('Utile per i controlli sulla validità della Partita IVA (facoltativo)'),
|
||||
'curl' => tr('Utile per i controlli sulla validità di diversi attributi (facoltativo)'),
|
||||
];
|
||||
foreach ($extensions as $key => $value) {
|
||||
$check = extension_loaded($key);
|
||||
|
@ -25,18 +25,22 @@ class Validate
|
||||
|
||||
$vat_number = starts_with($vat_number, 'IT') ? $vat_number : 'IT'.$vat_number;
|
||||
|
||||
try {
|
||||
$validator = new VatCalculator();
|
||||
// Controllo con API europea ufficiale
|
||||
if (extension_loaded('soap')) {
|
||||
try {
|
||||
$validator = new VatCalculator();
|
||||
|
||||
if (!$validator->isValidVATNumber($vat_number)) {
|
||||
return false;
|
||||
if (!$validator->isValidVATNumber($vat_number)) {
|
||||
return false;
|
||||
}
|
||||
} catch (VATCheckUnavailableException $e) {
|
||||
}
|
||||
} catch (VATCheckUnavailableException $e) {
|
||||
}
|
||||
|
||||
// Controllo attraverso apilayer
|
||||
$access_key = Settings::get('apilayer API key for VAT number');
|
||||
if (!empty($access_key)) {
|
||||
if (!function_exists('curl_init')) {
|
||||
if (!extension_loaded('curl')) {
|
||||
$_SESSION['warnings'][] = tr('Estensione cURL non installata');
|
||||
|
||||
return true;
|
||||
@ -79,9 +83,10 @@ class Validate
|
||||
return false;
|
||||
}
|
||||
|
||||
// Controllo attraverso apilayer
|
||||
$access_key = Settings::get('apilayer API key for Email');
|
||||
if (!empty($access_key)) {
|
||||
if (!function_exists('curl_init')) {
|
||||
if (!extension_loaded('curl')) {
|
||||
$_SESSION['warnings'][] = tr('Estensione cURL non installata');
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user