Merge branch 'master' of /home/git/platal into profile_edit
[platal.git] / modules / payment / money / cyberpaiement.inc.php
index d661f21..d031c9e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
+ *  Copyright (C) 2003-2007 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -31,7 +31,7 @@ class CyberPayment
 
     // }}}
     // {{{ constructor
-    
+
     function CyberPayment($val)
     {
         $this->val = strtr(sprintf("%.02f", (float)$val), '.', ',');
@@ -55,6 +55,7 @@ class CyberPayment
        $name = $req->fetchOneCell();
 
         // on constuit la reference de la transaction
+        require_once 'xorg.misc.inc.php';
         $prefix = ($pay->flags->hasflag('unique')) ? str_pad("",15,"0") : rand_url_id();
         $fullref = substr("$prefix-xorg-{$pay->id}",-15);
 
@@ -74,7 +75,7 @@ class CyberPayment
                'CHAMP101' => S::v('prenom'),
                'CHAMP102' => '.',
                'CHAMP103' => '.',
-               'CHAMP104' => S::v('bestalias').'@polytechnique.org',
+               'CHAMP104' => S::v('bestalias').'@' . $globals->mail->domain,
                'CHAMP106' => '.',
                'CHAMP107' => '.',
                'CHAMP108' => '.',
@@ -92,4 +93,5 @@ class CyberPayment
 
 $api = 'CyberPayment';
 
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>