Works on enhancement of paypal module

New: add triggers for post treatment
New: possibility to add payment link to email
This commit is contained in:
Regis Houssin 2011-06-17 10:30:23 +00:00
parent 2b70e828fa
commit 9428c5d6ae
2 changed files with 2 additions and 2 deletions

View File

@ -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';

View File

@ -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;
}