Skip to content
Snippets Groups Projects
Commit 9428c5d6 authored by Regis Houssin's avatar Regis Houssin
Browse files

Works on enhancement of paypal module

New: add triggers for post treatment
New: possibility to add payment link to email
parent 2b70e828
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,7 @@ function getPaymentUrl($source='',$ref='',$amount=0,$freetag='')
if (! empty($source) && ! empty($ref))
{
$token='';
if (! empty($conf->global->PAYPAL_SECURITY_TOKEN)) $token='&securekey='.dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.$ref, 2);
if (! empty($conf->global->PAYPAL_SECURITY_TOKEN)) $token='&securekey='.dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.$source.$ref, 2);
if ($source == 'commande') $source = 'order';
if ($source == 'facture') $source = 'invoice';
......
......@@ -296,7 +296,7 @@ $var=false;
$valid=true;
if (! empty($conf->global->PAYPAL_SECURITY_TOKEN) )
{
$token = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN . $ref, 2);
$token = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN . $SOURCE . $ref, 2);
if ($SECUREKEY != $token) $valid=false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment