X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fpayment%2Fmoney%2Fcyberpaiement.inc.php;h=462bae7802051885e556f46fc7845ff0d80eab11;hb=b00527ff4a4883f2bd8bdfcceb6d4123f19ef785;hp=d031c9e41dbfdb02d9ce15d36f37ac2c6079fbcd;hpb=eaf30d86cc99df2414cf4f171a9b0f11b0561e3b;p=platal.git diff --git a/modules/payment/money/cyberpaiement.inc.php b/modules/payment/money/cyberpaiement.inc.php index d031c9e..462bae7 100644 --- a/modules/payment/money/cyberpaiement.inc.php +++ b/modules/payment/money/cyberpaiement.inc.php @@ -1,6 +1,6 @@ baseurl) . '/' . $platal->ns . "payment/cyber_return/".S::v('uid')."?comment=".urlencode(Env::v('comment'))."&CHAMPBPX"; - $req = XDB::query("SELECT IF(nom_usage!='', nom_usage, nom) AS nom - FROM auth_user_md5 - WHERE user_id = {?}",S::v('uid')); - $name = $req->fetchOneCell(); + $user = S::user(); + $name = $user->lastName(); // 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); $this->urlform = "https://ecom.cimetz.com/telepaie/cgishell.exe/epaie01.exe"; - $this->infos['commercant'] = Array( - 'CHAMP000' => 510879, - 'CHAMP001' => 5965, - 'CHAMP002' => 5429159012, - 'CHAMP003' => "I", - 'CHAMP004' => "Polytechnique.org", - 'CHAMP005' => $roboturl, - 'CHAMP006' => "Polytechnique.org", - 'CHAMP007' => $globals->baseurl . '/' . $platal->ns, - 'CHAMP008' => $pay->mail); - $this->infos['client'] = Array( - 'CHAMP100' => $name, - 'CHAMP101' => S::v('prenom'), - 'CHAMP102' => '.', - 'CHAMP103' => '.', - 'CHAMP104' => S::v('bestalias').'@' . $globals->mail->domain, - 'CHAMP106' => '.', - 'CHAMP107' => '.', - 'CHAMP108' => '.', - 'CHAMP109' => '.', - 'CHAMP110' => '.'); - $this->infos['commande'] = Array( - 'CHAMP200' => $fullref, - 'CHAMP201' => $this->val, - 'CHAMP202' => "EUR"); - $this->infos['divers'] = Array('CHAMP900' => '01'); + $this->infos['commercant'] = Array( + 'CHAMP000' => 510879, + 'CHAMP001' => 5965, + 'CHAMP002' => 5429159012, + 'CHAMP003' => "I", + 'CHAMP004' => "Polytechnique.org", + 'CHAMP005' => $roboturl, + 'CHAMP006' => "Polytechnique.org", + 'CHAMP007' => $pay->url ? $pay->url : $globals->baseurl . '/' . $platal->ns, + 'CHAMP008' => $pay->mail); + $this->infos['client'] = Array( + 'CHAMP100' => replace_accent($name), + 'CHAMP101' => replace_accent(S::v('prenom')), + 'CHAMP102' => '.', + 'CHAMP103' => '.', + 'CHAMP104' => S::user()->bestEmail(), + 'CHAMP106' => '.', + 'CHAMP107' => '.', + 'CHAMP108' => '.', + 'CHAMP109' => '.', + 'CHAMP110' => '.'); + $this->infos['commande'] = Array( + 'CHAMP200' => $fullref, + 'CHAMP201' => $this->val, + 'CHAMP202' => "EUR"); + $this->infos['divers'] = Array('CHAMP900' => '01'); } // }}}