From: Raphaël Barrois Date: Sat, 28 Apr 2012 20:19:07 +0000 (+0200) Subject: Output time in UTC format when sending payment requests to CyberPlusPayment. Also... X-Git-Tag: xorg/1.1.5~9 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=0640ab411285058d9f64e81cbc0ce74cb791aef8;p=platal.git Output time in UTC format when sending payment requests to CyberPlusPayment. Also use it in vads_trans_id. Signed-off-by: Raphaël Barrois --- diff --git a/modules/payment/money/bplccyberplus.inc.php b/modules/payment/money/bplccyberplus.inc.php index 6f3c4e1..07e3ec5 100644 --- a/modules/payment/money/bplccyberplus.inc.php +++ b/modules/payment/money/bplccyberplus.inc.php @@ -68,9 +68,9 @@ class BPLCCyberPlus // Transaction's reference computation. $prefix = ($pay->flags->hasflag('unique')) ? str_pad("",15,"0") : 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 + $ts = new DateTime('now', new DateTimeZone('UTC')); + $trans_date = $ts->format("YmdHis"); + $trans_id = $ts->format("His"); // FIXME : check for duplicates // Form's content. $this->urlform = "https://systempay.cyberpluspaiement.com/vads-payment/";