noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
ajax_check_ibannumber.php
Go to the documentation of this file.
1<?php
2
3/*
4 * Copyright (C) 2025 dany
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21/*!
22 * \file
23 * \brief check the VAT Number with VIES,
24 * \see ivatnumber.class.php
25 */
26
27if (!defined('ALLOWED')) die('Appel direct ne sont pas permis');
28
29$http = new \HttpInput();
30$obj = new stdClass;
31
32try {
33 $iban = $http->get("iban");
34 $p_domid = $http->get("p_domid");
35 if (check_iban($iban) == true ){
36 $obj->status = 'OK';
37 $obj->html=_('valide');
38 $obj->data=$iban;
39 echo json_response($obj);
40 return;
41 }
42 $obj->status = 'NOK';
43 $obj->html=_('Erreur');
44 echo json_response($obj);
45} catch (\Exception $e) {
46 $obj->status = 'NOK';
47 $obj->html=$e->getMessage();
49 return;
50}
check_iban(&$iban)
check that an IBAN is valid
record_log($p_message)
Record an error message into the log file of the server or in the log folder of NOALYSS Record also t...
catch(Exception $e) $obj
_("actif, passif,charge,...")
json_response($p_answer)
Send header and json object.