diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 287f9a576db..38732d3825f 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -254,11 +254,15 @@ $parameters = [ $reshook = $hookmanager->executeHooks('doValidatePayment', $parameters, $object, $action); // Check security token +$tmpsource = $source; +if ($tmpsource == 'membersubscription') { + $tmpsource = 'member'; +} $valid = true; if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { - if ($source && $REF) { - $token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$source.$REF, 2); // Use the source in the hash to avoid duplicates if the references are identical + if ($tmpsource && $REF) { + $token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$tmpsource.$REF, 2); // Use the source in the hash to avoid duplicates if the references are identical } else { $token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2); } @@ -770,7 +774,7 @@ $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '