Skip to content

Commit

Permalink
Fix: Bad parameter that duplicate info.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 7, 2013
1 parent fa0470b commit adf5540
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
8 changes: 4 additions & 4 deletions htdocs/paypal/lib/paypal.lib.php
Expand Up @@ -309,10 +309,10 @@ function getPaypalPaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f
}
}
}

// For multicompany
$out.="&entity=".$conf->entity;
//$out.="&entity=".$conf->entity; // This should not be into link. Link contains already a ref of an object that allow to retreive entity

return $out;
}

Expand Down Expand Up @@ -691,7 +691,7 @@ function hash_call($methodName,$nvpStr)

curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, empty($conf->global->MAIN_USE_CONNECT_TIMEOUT)?5:$conf->global->MAIN_USE_CONNECT_TIMEOUT);
curl_setopt($ch, CURLOPT_TIMEOUT, empty($conf->global->MAIN_USE_RESPONSE_TIMEOUT)?30:$conf->global->MAIN_USE_RESPONSE_TIMEOUT);

curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);

Expand Down
10 changes: 4 additions & 6 deletions htdocs/public/paypal/paymentko.php
Expand Up @@ -29,12 +29,10 @@
define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.

// For MultiCompany module
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_int($entity))
{
define("DOLENTITY", $entity);
}
// For MultiCompany module. This should be useless. Because entity must be retreive from object ref and not from url.
$entity=GETPOST('entity')?GETPOST('entity','int'):1;
if (is_int($entity)) define("DOLENTITY", $entity);


require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
Expand Down
10 changes: 4 additions & 6 deletions htdocs/public/paypal/paymentok.php
Expand Up @@ -29,12 +29,10 @@
define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.

// For MultiCompany module
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_int($entity))
{
define("DOLENTITY", $entity);
}
// For MultiCompany module. This should be useless. Because entity must be retreive from object ref and not from url.
$entity=GETPOST('entity')?GETPOST('entity','int'):1;
if (is_int($entity)) define("DOLENTITY", $entity);


require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
Expand Down

0 comments on commit adf5540

Please sign in to comment.