35 lines
1.8 KiB
PHP
Executable File
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 .= " Mise à jour effectuée avec succès !"; $admMsgClass='ok';
|
|
}
|
|
else {
|
|
$admMsg .= " Echec de la mise à jour des moyens de paiement"; $admMsgClass='ko';
|
|
}
|
|
}
|
|
?>
|