Fix payment link for renewal with a unique secure key
This commit is contained in:
parent
91fc78ac9c
commit
a7a95cff03
@ -28,7 +28,6 @@
|
|||||||
*/
|
*/
|
||||||
function payment_prepare_head(Paiement $object)
|
function payment_prepare_head(Paiement $object)
|
||||||
{
|
{
|
||||||
|
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
@ -264,9 +263,9 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
|
|||||||
$out .= ($mode ? '</font>' : '');
|
$out .= ($mode ? '</font>' : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($type == 'member' || $type == 'membersubscription')
|
} elseif ($type == 'member' || $type == 'membersubscription') {
|
||||||
{
|
$newtype = 'member';
|
||||||
$out = $urltouse.'/public/payment/newpayment.php?source=membersubscription&ref='.($mode ? '<font color="#666666">' : '');
|
$out = $urltouse.'/public/payment/newpayment.php?source='.$newtype.'&ref='.($mode ? '<font color="#666666">' : '');
|
||||||
if ($mode == 1) $out .= 'member_ref';
|
if ($mode == 1) $out .= 'member_ref';
|
||||||
if ($mode == 0) $out .= urlencode($ref);
|
if ($mode == 0) $out .= urlencode($ref);
|
||||||
$out .= ($mode ? '</font>' : '');
|
$out .= ($mode ? '</font>' : '');
|
||||||
@ -275,8 +274,8 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
|
|||||||
if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
|
if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
|
||||||
else {
|
else {
|
||||||
$out .= '&securekey='.($mode ? '<font color="#666666">' : '');
|
$out .= '&securekey='.($mode ? '<font color="#666666">' : '');
|
||||||
if ($mode == 1) $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + member_ref)";
|
if ($mode == 1) $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$newtype."' + member_ref)";
|
||||||
if ($mode == 0) $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2);
|
if ($mode == 0) $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$newtype.$ref, 2);
|
||||||
$out .= ($mode ? '</font>' : '');
|
$out .= ($mode ? '</font>' : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user