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:
parent
2b70e828fa
commit
9428c5d6ae
@ -162,7 +162,7 @@ function getPaymentUrl($source='',$ref='',$amount=0,$freetag='')
|
|||||||
if (! empty($source) && ! empty($ref))
|
if (! empty($source) && ! empty($ref))
|
||||||
{
|
{
|
||||||
$token='';
|
$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 == 'commande') $source = 'order';
|
||||||
if ($source == 'facture') $source = 'invoice';
|
if ($source == 'facture') $source = 'invoice';
|
||||||
|
|||||||
@ -296,7 +296,7 @@ $var=false;
|
|||||||
$valid=true;
|
$valid=true;
|
||||||
if (! empty($conf->global->PAYPAL_SECURITY_TOKEN) )
|
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;
|
if ($SECUREKEY != $token) $valid=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user