New: Add substitution key into emailing module to include securitykey
used for paypal links into email.
This commit is contained in:
parent
3461b1932b
commit
fce9baddf0
@ -71,6 +71,11 @@ $object->substitutionarray=array(
|
|||||||
'__UNSUBSCRIBE__' => 'TagUnsubscribe'
|
'__UNSUBSCRIBE__' => 'TagUnsubscribe'
|
||||||
//,'__PERSONALIZED__' => 'Personalized' // Hidden because not used yet
|
//,'__PERSONALIZED__' => 'Personalized' // Hidden because not used yet
|
||||||
);
|
);
|
||||||
|
if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN))
|
||||||
|
{
|
||||||
|
$object->substitutionarray['__SECUREKEYPAYPAL__']='SecureKeyPaypal';
|
||||||
|
if (! empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $object->substitutionarray['__SECUREKEYPAYPAL_MEMBER__']='SecureKeyPaypalUniquePerMember';
|
||||||
|
}
|
||||||
|
|
||||||
$object->substitutionarrayfortest=array(
|
$object->substitutionarrayfortest=array(
|
||||||
'__ID__' => 'TESTIdRecord',
|
'__ID__' => 'TESTIdRecord',
|
||||||
@ -222,7 +227,12 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
|
|||||||
'__OTHER4__' => $other4,
|
'__OTHER4__' => $other4,
|
||||||
'__OTHER5__' => $other5
|
'__OTHER5__' => $other5
|
||||||
);
|
);
|
||||||
|
if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN))
|
||||||
|
{
|
||||||
|
$substitutionarray['__SECUREKEYPAYPAL__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2);
|
||||||
|
if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $substitutionarray['__SECUREKEYPAYPAL_MEMBER__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2);
|
||||||
|
else $substitutionarray['__SECUREKEYPAYPAL_MEMBER__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN . 'membersubscription' . $obj->source_id, 2);
|
||||||
|
}
|
||||||
$substitutionisok=true;
|
$substitutionisok=true;
|
||||||
complete_substitutions_array($substitutionarray, $langs);
|
complete_substitutions_array($substitutionarray, $langs);
|
||||||
$newsubject=make_substitutions($subject,$substitutionarray);
|
$newsubject=make_substitutions($subject,$substitutionarray);
|
||||||
|
|||||||
@ -158,6 +158,12 @@ if ($resql)
|
|||||||
'__OTHER4__' => $other4,
|
'__OTHER4__' => $other4,
|
||||||
'__OTHER5__' => $other5
|
'__OTHER5__' => $other5
|
||||||
);
|
);
|
||||||
|
if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN))
|
||||||
|
{
|
||||||
|
$substitutionarray['__SECUREKEYPAYPAL__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2);
|
||||||
|
if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $substitutionarray['__SECUREKEYPAYPAL_MEMBER__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2);
|
||||||
|
else $substitutionarray['__SECUREKEYPAYPAL_MEMBER__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN . 'membersubscription' . $obj->source_id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
complete_substitutions_array($substitutionarray,$langs);
|
complete_substitutions_array($substitutionarray,$langs);
|
||||||
$newsubject=make_substitutions($subject,$substitutionarray);
|
$newsubject=make_substitutions($subject,$substitutionarray);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user