From: Florent Bruneau Date: Fri, 5 Oct 2007 21:24:55 +0000 (+0200) Subject: Send ascii to payment sites in order to avoid annoying encoding issues X-Git-Tag: xorg/0.9.15~65 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=c2ad0ec13496ca7c3e2481d87b87c23518839544;p=platal.git Send ascii to payment sites in order to avoid annoying encoding issues Signed-off-by: Florent Bruneau --- diff --git a/modules/payment/money/cyberpaiement.inc.php b/modules/payment/money/cyberpaiement.inc.php index 11e7ad8..6d2b5f6 100644 --- a/modules/payment/money/cyberpaiement.inc.php +++ b/modules/payment/money/cyberpaiement.inc.php @@ -68,11 +68,11 @@ class CyberPayment 'CHAMP004' => "Polytechnique.org", 'CHAMP005' => $roboturl, 'CHAMP006' => "Polytechnique.org", - 'CHAMP007' => $globals->baseurl . '/' . $platal->ns, + 'CHAMP007' => $pay->url ? $pay->url : $globals->baseurl . '/' . $platal->ns, 'CHAMP008' => $pay->mail); $this->infos['client'] = Array( - 'CHAMP100' => $name, - 'CHAMP101' => S::v('prenom'), + 'CHAMP100' => replace_accent($name), + 'CHAMP101' => replace_accent(S::v('prenom')), 'CHAMP102' => '.', 'CHAMP103' => '.', 'CHAMP104' => S::v('bestalias').'@' . $globals->mail->domain, diff --git a/modules/payment/money/paypal.inc.php b/modules/payment/money/paypal.inc.php index 5f454a3..ffd561f 100644 --- a/modules/payment/money/paypal.inc.php +++ b/modules/payment/money/paypal.inc.php @@ -53,8 +53,8 @@ class PayPal $this->urlform = 'https://'.$globals->money->paypal_site.'/cgi-bin/webscr'; $req = XDB::query("SELECT IF(nom_usage!='', nom_usage, nom) AS nom - FROM auth_user_md5 - WHERE user_id = {?}",S::v('uid')); + FROM auth_user_md5 + WHERE user_id = {?}",S::v('uid')); $name = $req->fetchOneCell(); $roboturl = str_replace("https://","http://",$globals->baseurl) @@ -86,20 +86,20 @@ class PayPal LEFT JOIN tels AS t ON (t.uid = a.uid AND t.adrid = a.adrid) WHERE q.user_id = {?} LIMIT 1", S::v('uid')); - $this->infos['client'] = array_merge($info_client, $res->fetchOneAssoc()); + $this->infos['client'] = array_map('replace_accent', array_merge($info_client, $res->fetchOneAssoc())); - // 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); + // 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->infos['commande'] = Array( - 'item_name' => $pay->text, - 'amount' => $this->val_number, - 'currency_code' => 'EUR', - 'custom' => $fullref); + $this->infos['commande'] = Array( + 'item_name' => replace_accent($pay->text), + 'amount' => $this->val_number, + 'currency_code' => 'EUR', + 'custom' => $fullref); - $this->infos['divers'] = Array('cmd' => '_xclick'); + $this->infos['divers'] = Array('cmd' => '_xclick'); } // }}}