adjust response of create bankAccount when an error occurs

This commit is contained in:
root 2026-03-04 15:39:40 +01:00
parent 4186d535ac
commit 2edfbed4e9
3 changed files with 9 additions and 5 deletions

3
.gitignore vendored
View File

@ -30,3 +30,6 @@ user_guide_src/cilexer/pycilexer.egg-info/*
*.stTheme.cache
*.sublime-workspace
*.sublime-project
./application/config/database.php
./application/config/constants.php
./application/config/config.php

View File

@ -89,8 +89,6 @@ defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest auto
*/
define('WALLET_SERVICE_URL','https://test.ilink-app.com:8081');
define('WALLET_SERVICE_TOKEN','fywRtXSwEhHncwXaqn10wa9bJU9a63r2');
// define('WALLET_SERVICE_URL','http://localhost:7082');
// define('WALLET_SERVICE_TOKEN','fywRtXSwEhHncwXaqn10wa9bJU9a63r2');
define('WALLET_SERVICE_EXTERNE_URL','https://test.ilink-app.com:8085');
define('WALLET_SERVICE_EXTERNE_TOKEN','JeJMx6KNW1qo2h01rCVOLfX3f1nmcF2I');
define('NOTIFICATION_SERVICE_URL','https://test.ilink-app.com:8083');

View File

@ -2690,7 +2690,7 @@ class Gestion extends CI_Controller
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
log_message('info', 'Réponse API lors de l\'ouverture du compte agence bancaire ID_demande ' . $id . ' : ' . $result);
// log_message('info', 'Réponse API lors de l\'ouverture du compte agence bancaire ID_demande ' . $id . ' : ' . $result);
if ($result && ($httpCode >= 200 && $httpCode < 300)) {
@ -2700,9 +2700,12 @@ class Gestion extends CI_Controller
]);
} else {
$result = json_decode($result, true);
$merror_message = isset($result['error']) ? $result['error'] : 'Unknown error';
echo json_encode([
'success' => 'false',
'message' => 'Un problème est survenu lors de l\'ouverture du compte (' . $result . ')'
'message' => 'Un problème est survenu lors de l\'ouverture du compte (' . $merror_message . ')'
]);
log_message('error', '------------- Erreur API lors de l\'ouverture du compte agence bancaire ID_demande ' . $id . ' : ' . $result);
@ -2758,7 +2761,7 @@ class Gestion extends CI_Controller
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
log_message('info', 'API Response for Link ID '.$id.' : HTTP Code = '.$httpCode.', Result = '.$result);
// log_message('info', 'API Response for Link ID '.$id.' : HTTP Code = '.$httpCode.', Result = '.$result);
if ($result && ($httpCode >= 200 && $httpCode < 300)) {
$this->db->trans_commit();