diff --git a/application/config/constants.php b/application/config/constants.php index 368c6cf0..fdc1869d 100755 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -89,6 +89,8 @@ 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'); diff --git a/application/controllers/Gestion.php b/application/controllers/Gestion.php index ebd13087..c80d68e2 100755 --- a/application/controllers/Gestion.php +++ b/application/controllers/Gestion.php @@ -2772,14 +2772,16 @@ class Gestion extends CI_Controller } else { $this->db->trans_rollback(); - log_message('error', 'Erreur API Link ID '.$id.' : '.$result); + $result = json_decode($result, true); + $merror_message = isset($result['error']) ? $result['error'] : 'Unknown error'; + log_message('error', 'Erreur API Link ID '.$id.' : '.$merror_message); // ERREUR API echo json_encode([ - 'success' => 'ok', - 'message' => 'Erreur API (' . $httpCode . ')', - 'api_error' => $result + 'success' => 'false', + 'message' => 'Error : (' . $merror_message . ')' ]); + log_message('error', '------------- Erreur API lors de la validation du rattachement ID_transaction ' . $id . ' : ' . $merror_message); exit; } } diff --git a/application/helpers/functions_helper.php b/application/helpers/functions_helper.php index 9447070f..de27a348 100755 --- a/application/helpers/functions_helper.php +++ b/application/helpers/functions_helper.php @@ -241,5 +241,18 @@ if (!function_exists('getStatusBadge')) { return ''.$label.''; } } + + if(!function_exists('truncateText')) { + function truncateText($text, $limit = 30, $end = '...') + { + // On vérifie si la longueur du texte dépasse la limite + if (mb_strlen($text) > $limit) { + // On coupe à 30 et on ajoute le suffixe + return mb_substr($text, 0, $limit) . $end; + } + // Si le texte est court, on le retourne tel quel + return $text; + } + } } diff --git a/application/views/gestion_agency_banking.php b/application/views/gestion_agency_banking.php index 4dab6045..21112666 100755 --- a/application/views/gestion_agency_banking.php +++ b/application/views/gestion_agency_banking.php @@ -79,7 +79,7 @@