From: x2000habouzit Date: Sat, 9 Oct 2004 09:29:03 +0000 (+0000) Subject: micropaiment was out X-Git-Tag: xorg/old~1386 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=13bc499960c28b98c4506b938c49ce6d0c510df2;p=platal.git micropaiment was out --- diff --git a/htdocs/paiement/cyberpaiement.inc.php b/htdocs/paiement/cyberpaiement.inc.php new file mode 100644 index 0000000..b92494e --- /dev/null +++ b/htdocs/paiement/cyberpaiement.inc.php @@ -0,0 +1,82 @@ +hasflag('unique')) ? str_pad("",15,"0") : rand_url_id(); +$fullref = substr("$prefix-xorg-$ref",-15); + +// on recupere les infos sur l'utilisateur +$res = mysql_query("SELECT a.alias, u.nom, u.prenom + FROM auth_user_md5 AS u + INNER JOIN aliases AS a ON (u.user_id=a.id AND a.type='a_vie') + WHERE user_id={$_SESSION['uid']}"); +list($username,$nom,$prenom) = mysql_fetch_row($res); +mysql_free_result($res); +?> + +
+ + + + + + + + + + + + + + + + +
Paiement via CyberP@iement
Transaction
Montant (euros)
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +

+En cliquant sur "Valider", tu seras +redirigé vers le site de la +BP Lorraine Champagne, où il te sera demandé de saisir ton numéro de +carte bancaire. Lorsque le paiement aura été effectué, tu recevras +une confirmation par email. +

+ diff --git a/htdocs/paiement/index.php b/htdocs/paiement/index.php index e13aa94..c62da8d 100644 --- a/htdocs/paiement/index.php +++ b/htdocs/paiement/index.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: index.php,v 1.3 2004-09-02 21:22:19 x2000habouzit Exp $ + $Id: index.php,v 1.4 2004-10-09 09:29:03 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -80,12 +80,12 @@ if (!ereg("^[0-9]+,[0-9]{2}$",$montant)) { $montant = $montant_def; } -if ($montant < $montant_min) { +if (intval($montant) < $montant_min) { $erreur[] = "Montant inférieur au minimum autorisé ($montant_min)."; $montant = $montant_min; } -if ($montant > $montant_max) { +if (intval($montant) > $montant_max) { $erreur[] = "Montant supérieur au maximum autorisé ($montant_max)."; $montant = $montant_max; }