| [ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2002 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: cyberpaiement.class.php,v 1.4 2004/10/20 21:06:45 opensides Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/cyberpaiement.class.php,v $ 20 */ 21 22 /* Classe de gestion du système de paiement de la banque Populaire 23 * de Lorraine et Champagne 24 * http://www.cyberpaiement.tm.fr/ 25 * 26 */ 27 28 class Cyberpaiement 29 { 30 31 function Cyberpaiement($conf) 32 /* 33 * Initialisation des valeurs par défaut 34 */ 35 { 36 37 /* Numéro abonné Internet : 6 chiffres */ 38 39 $this->champ000 = $conf->bplc->numabonne; 40 41 /* Code activité commercant : 4 chiffres */ 42 43 $this->champ001 = $conf->bplc->code_activite; 44 45 /* Numéro de contrat : 10 chiffres */ 46 47 $this->champ002 = $conf->bplc->num_contrat; 48 49 /* Type de paiement */ 50 51 $this->champ003 = $conf->bplc->typepaiement; 52 53 /* Nom du serveur commercant, champ purement informatif */ 54 55 $this->champ004 = trim($conf->bplc->nom_serveur); 56 57 /* Url du CGI de retour */ 58 59 $this->champ005 = $conf->bplc->cgi_retour; 60 61 /* Nom du commercant */ 62 63 $this->champ006 = $conf->bplc->nom_commercant; 64 65 /* url retour */ 66 67 $this->champ007 = $conf->bplc->url_retour; 68 69 /* Email confirmation commercant*/ 70 71 $this->champ008 = trim($conf->bplc->email_commercant); 72 73 /* Devise : EUR*/ 74 75 $this->champ202 = $conf->bplc->devise; 76 77 /* Adhérent : 01 */ 78 79 $this->champ900 = $conf->bplc->adherent; 80 81 82 /* *********************************************** */ 83 /* Initialisation à vide des valeurs qui ne seront */ 84 /* pas transmises */ 85 /* *********************************************** */ 86 87 $this->champ100 = "."; 88 $this->champ101 = "."; 89 $this->champ102 = "."; 90 $this->champ103 = "."; 91 $this->champ104 = "."; 92 $this->champ106 = "."; 93 $this->champ107 = "."; 94 $this->champ108 = "."; 95 $this->champ109 = "."; 96 $this->champ110 = "."; 97 98 99 } 100 101 /* ********************** */ 102 /* */ 103 /* Client */ 104 /* */ 105 /* ********************** */ 106 107 function set_client($nom,$prenom,$email,$societe='') 108 { 109 /* Nom */ 110 111 $this->champ100 = $nom; 112 113 /* Prenom */ 114 115 $this->champ101 = $prenom; 116 117 /* Société */ 118 if (strlen(trim($societe))) 119 { 120 $this->champ102 = $societe; 121 } 122 /* Téléphone */ 123 if (strlen(trim($telephone))) 124 { 125 $this->champ103 = $telephone; 126 } 127 128 /* Adresse email */ 129 130 $this->champ104 = trim($email); 131 132 /* Fax */ 133 if (strlen(trim($fax))) 134 { 135 $this->champ106 = $fax; 136 } 137 138 /* Adresse numéro et rue */ 139 if (strlen(trim($adresse))) 140 { 141 $this->champ107 = $adresse; 142 } 143 144 /* Ville */ 145 if (strlen(trim($ville))) 146 { 147 $this->champ108 = $ville; 148 } 149 150 /* Code Postal */ 151 if (strlen(trim($cp))) 152 { 153 $this->champ109 = trim($cp); 154 } 155 156 /* Code Pays : purement Informatif */ 157 if (strlen(trim($pays))) 158 { 159 $this->champ110 = trim($pays); 160 } 161 } 162 /* ********************** */ 163 /* */ 164 /* Commande */ 165 /* */ 166 /* ********************** */ 167 168 function set_commande($ref, $montant) 169 { 170 /* Référence */ 171 172 $this->champ200 = $ref; 173 174 /* Montant */ 175 176 $this->champ201 = $montant; 177 } 178 /* 179 * 180 * 181 * 182 */ 183 function print_hidden() 184 { 185 print '<input type="hidden" name="CHAMP000" value="'.$this->champ000.'">'; 186 print "\n"; 187 print '<input type="hidden" name="CHAMP001" value="'.$this->champ001.'">'; 188 print "\n"; 189 print '<input type="hidden" name="CHAMP002" value="'.$this->champ002.'">'; 190 print "\n"; 191 print '<input type="hidden" name="CHAMP003" value="'.$this->champ003.'">'; 192 print "\n"; 193 print '<input type="hidden" name="CHAMP004" value="'.$this->champ004.'">'; 194 print "\n"; 195 print '<input type="hidden" name="CHAMP005" value="'.$this->champ005.'">'; 196 print "\n"; 197 print '<input type="hidden" name="CHAMP006" value="'.$this->champ006.'">'; 198 print "\n"; 199 print '<input type="hidden" name="CHAMP007" value="'.$this->champ007.'ref='.$this->champ200.'">'; 200 print "\n"; 201 print '<input type="hidden" name="CHAMP008" value="'.$this->champ008.'">'; 202 print "\n"; 203 print '<input type="hidden" name="CHAMP100" value="'.$this->champ100.'">'; 204 print "\n"; 205 print '<input type="hidden" name="CHAMP101" value="'.$this->champ101.'">'; 206 print "\n"; 207 print '<input type="hidden" name="CHAMP102" value="'.$this->champ102.'">'; 208 print "\n"; 209 print '<input type="hidden" name="CHAMP103" value="'.$this->champ103.'">'; 210 print "\n"; 211 print '<input type="hidden" name="CHAMP104" value="'.$this->champ104.'">'; 212 print "\n"; 213 print '<input type="hidden" name="CHAMP106" value="'.$this->champ106.'">'; 214 print "\n"; 215 print '<input type="hidden" name="CHAMP107" value="'.$this->champ107.'">'; 216 print "\n"; 217 print '<input type="hidden" name="CHAMP108" value="'.$this->champ108.'">'; 218 print "\n"; 219 print '<input type="hidden" name="CHAMP109" value="'.$this->champ109.'">'; 220 print "\n"; 221 print '<input type="hidden" name="CHAMP110" value="'.$this->champ110.'">'; 222 print "\n"; 223 print '<input type="hidden" name="CHAMP200" value="'.$this->champ200.'">'; 224 print "\n"; 225 print '<input type="hidden" name="CHAMP201" value="'.$this->champ201.'">'; 226 print "\n"; 227 print '<input type="hidden" name="CHAMP202" value="'.$this->champ202.'">'; 228 print "\n"; 229 print '<input type="hidden" name="CHAMP900" value="'.$this->champ900.'">'; 230 print "\n"; 231 } 232 /* 233 * 234 * 235 * 236 */ 237 238 } 239 ?>
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 |
|