[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * 18 * $Id: bplc.php,v 1.13 2005/10/18 14:03:06 eldy Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/public/dons/bplc.php,v $ 20 * 21 */ 22 23 /* 24 * Gestion du retour du système de Cyberpaiement 25 * Cette page est appellée par le serveur de la BPLC lors de l'utilisation 26 * su système RSTS 27 * 28 */ 29 30 require ("../../conf/conf.class.php"); 31 require ("../../retourbplc.class.php"); 32 require ("../../don.class.php"); 33 34 $conf = new Conf(); 35 $conf->db->type = $dolibarr_main_db_type; 36 $conf->db->host = $dolibarr_main_db_host; 37 $conf->db->name = $dolibarr_main_db_name; 38 $conf->db->user = $dolibarr_main_db_user; 39 $conf->db->pass = $dolibarr_main_db_pass; 40 41 // Si type non défini (pour compatibilité avec ancienne install), on 42 // travail avec mysql 43 if (! $conf->db->type) { $conf->db->type = 'mysql'; } 44 45 require_once(DOL_DOCUMENT_ROOT ."/lib/".$dolibarr_main_db_type.".lib.php"); 46 47 $db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name); 48 49 $retbplc = new Retourbplc($db); 50 51 $retbplc->num_compte = $conf->bplc->num_compte; 52 53 $retbplc->montant = $CHAMP201; 54 $retbplc->num_contrat = $CHAMP002; 55 $retbplc->ref_commande = $CHAMP200; 56 $retbplc->ipclient = $CHAMP105; 57 $retbplc->num_transaction = $CHAMP901; 58 $retbplc->date_transaction = $CHAMP902; 59 $retbplc->heure_transaction = $CHAMP903; 60 $retbplc->num_autorisation = $CHAMP904; 61 $retbplc->cle_acceptation = $CHAMP905; 62 $retbplc->code_retour = $CHAMP906; 63 64 $retbplc->ref_commande = $CHAMP200; 65 66 /* 67 * Insertion de la transaction dans la base 68 */ 69 70 $return = $retbplc->insertdb(); 71 72 73 $don_id = substr($retbplc->ref_commande, 0, strlen($retbplc->ref_commande) -2); 74 print $don_id; 75 76 if($return) 77 { 78 if ($retbplc->check_key($retbplc->cle_acceptation)) 79 { 80 81 82 /* 83 * Validation de la commande 84 * 85 */ 86 87 $don = new Don($db); 88 89 $don_id = strstr($retbplc->ref_commande, 0, strlen($retbplc->ref_commande) -2); 90 91 // 5 correspond au paiement en ligne voir table llx_c_paiement 92 93 $don->set_paye($don_id, 5); 94 95 } 96 97 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |