alpha_full/admin/options/moyensP/mp.reqUpConf.php
2026-04-06 22:58:51 +02:00

35 lines
1.8 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
$continuer=1;
if (!empty($theIdCompte)) $theIdCompte=addslashes($theIdCompte);
if (!empty($thePrivateKeyTest)) $thePrivateKeyTest=addslashes($thePrivateKeyTest);
if (!empty($thePublicKeyTest)) $thePublicKeyTest=addslashes($thePublicKeyTest);
if (!empty($thePrivateKeyProd)) $thePrivateKeyProd=addslashes($thePrivateKeyProd);
if (!empty($thePublicKeyProd)) $thePublicKeyProd=addslashes($thePublicKeyProd);
if (!empty($volet))
if ($theEnv=='Activé' || $theEnv!='En Test') {
if ($thePrivateKeyProd=='-' || $thePrivateKeyProd=='' || $thePublicKeyProd=='-' || $thePublicKeyProd=='' ) {
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Clé API de prod vide ou non conforme ! thePublicKeyProd' => $thePublicKeyProd, ' thePrivateKeyProd' => $thePrivateKeyProd], 'mp.reqUpConf.php');}
$continuer=0;
}
}
if ($continuer==1) {
$reqUpdate="UPDATE `modepaie` SET typeCompte='" .$theTypeCompte. "', isTest='" .$theEnv. "', idCompte='" .$theIdCompte. "', PrivateKeyTest='" .$thePrivateKeyTest. "', PublicKeyTest='" .$thePublicKeyTest. "', PrivateKeyProd='" .$thePrivateKeyProd. "', PublicKeyProd='" .$thePublicKeyProd. "', ";
if (isset($theApiTest)) $reqUpdate .="apiURLTest='" .$theApiTest. "', ";
if (isset($apiURLProd)) $reqUpdate .="apiURLProd='" .$theApiProd. "' ";
$rest = strlen($reqUpdate)-2;
$reqUpdate=substr($reqUpdate,0,$rest);
$reqUpdate .= " WHERE idModePaie=" .$theIdPaie. " ;";
$resConn='';
$resConn=$idPdo->query($reqUpdate);
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(2, ['reqUpdate' => $reqUpdate], '');}
if ($resConn) {
$admMsg .= "&#160;Mise à jour effectuée avec succès !"; $admMsgClass='ok';
}
else {
$admMsg .= "&#160;Echec de la mise à jour des moyens de paiement"; $admMsgClass='ko';
}
}
?>