Fix: Bad url key

This commit is contained in:
Laurent Destailleur
2012-01-16 18:53:11 +01:00
parent 13b50e3dd7
commit 2da59b8727

View File

@@ -160,7 +160,7 @@ function getPaypalPaymentUrl($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.$source.$ref, 2);
if (! empty($conf->global->PAYPAL_SECURITY_TOKEN)) $token='&securekey='.urlencode($conf->global->PAYPAL_SECURITY_TOKEN);
if ($source == 'commande') $source = 'order';
if ($source == 'facture') $source = 'invoice';