From 9428c5d6aeeb0397400b70c6130771855707893f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 17 Jun 2011 10:30:23 +0000 Subject: [PATCH] Works on enhancement of paypal module New: add triggers for post treatment New: possibility to add payment link to email --- htdocs/paypal/lib/paypal.lib.php | 2 +- htdocs/public/paypal/newpayment.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 8263e5fa0e0..0e846c9e9a7 100755 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -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'; diff --git a/htdocs/public/paypal/newpayment.php b/htdocs/public/paypal/newpayment.php index c5af46a6748..8a697973b35 100755 --- a/htdocs/public/paypal/newpayment.php +++ b/htdocs/public/paypal/newpayment.php @@ -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; }