X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fpayment%2Fmoney%2Fbplccyberplus.inc.php;h=0b273a58b4bc63716ad0ae5fa33c3ed03d46b33b;hb=5096676e03dcd626d6e64696cb9d6ee5d8e054da;hp=e82fb8f3b4181abe97a22d4fc64cd96ab4ecca0d;hpb=5289c142e04219cb8e846c86ccd9f5005d7d49e1;p=platal.git diff --git a/modules/payment/money/bplccyberplus.inc.php b/modules/payment/money/bplccyberplus.inc.php index e82fb8f..0b273a5 100644 --- a/modules/payment/money/bplccyberplus.inc.php +++ b/modules/payment/money/bplccyberplus.inc.php @@ -1,6 +1,6 @@ val = 100 * strtr(sprintf("%.02f", (float)$val), '.', ','); + $this->val = 100 * strtr($val, ',', '.'); } // }}} @@ -66,11 +66,11 @@ class BPLCCyberPlus $log = S::v('log'); // Transaction's reference computation. - $prefix = ($pay->flags->hasflag('unique')) ? str_pad("",15,"0") : rand_url_id(); + $prefix = rand_url_id(); $fullref = substr("$prefix-{$pay->id}",-12); // FIXME : check for duplicates $ts = time(); - $trans_date = date("YmdHis", $ts); - $trans_id = date("His", $ts); // FIXME : check for duplicates + $trans_date = gmdate("YmdHis", $ts); + $trans_id = gmdate("His", $ts); // FIXME : check for duplicates // Form's content. $this->urlform = "https://systempay.cyberpluspaiement.com/vads-payment/"; @@ -80,7 +80,7 @@ class BPLCCyberPlus 'vads_url_return' => $pay->url ? $pay->url : $globals->baseurl . '/' . $platal->ns); $this->infos['client'] = Array( 'vads_cust_email' => $user->bestEmail(), - 'vads_cust_id' => S::v('uid'), + 'vads_cust_id' => $user->id(), 'vads_cust_name' => substr(self::replaceNonAlpha(replace_accent($user->shortName())), 0, 127)); $this->infos['commande'] = Array( 'vads_amount' => $this->val, @@ -108,5 +108,5 @@ class BPLCCyberPlus $api = 'BPLCCyberPlus'; -// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8: ?>