From: Damien Bobillot Date: Wed, 23 Jun 2010 01:22:17 +0000 (+0200) Subject: Fix return url X-Git-Tag: xorg/1.0.0~83 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=31d6c664e030255f2b6c5112bbeeb7c67af284f9;p=platal.git Fix return url --- diff --git a/modules/payment/money/bplccyberplus.inc.php b/modules/payment/money/bplccyberplus.inc.php index ae8fdbb..6f7a007 100644 --- a/modules/payment/money/bplccyberplus.inc.php +++ b/modules/payment/money/bplccyberplus.inc.php @@ -46,9 +46,6 @@ class BPLCCyberPlus global $globals, $platal; $log = S::v('log'); - $url_return = str_replace("https://","http://", $globals->baseurl) - . '/' . $platal->ns . "payment/cyber2_return/"; - // on constuit la reference de la transaction $prefix = ($pay->flags->hasflag('unique')) ? str_pad("",15,"0") : rand_url_id(); $fullref = substr("$prefix-{$pay->id}",-12); // FIXME : check for duplicates @@ -61,7 +58,7 @@ class BPLCCyberPlus $this->infos['commercant'] = Array( 'vads_site_id' => $globals->money->cyperplus_account, 'vads_return_mode' => 'NONE', - 'vads_url_return' => $url_return); + 'vads_url_return' => $pay->url ? $pay->url : $globals->baseurl . '/' . $platal->ns); $this->infos['client'] = Array( 'vads_cust_email' => S::user()->bestEmail(), 'vads_cust_id' => S::v('uid'),