diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 02dcc1ce6af..fcff7afc7d6 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -230,15 +230,13 @@ $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than curren $urlok = $urlwithroot.'/public/payment/paymentok.php?'; $urlko = $urlwithroot.'/public/payment/paymentko.php?'; -/* -if ($ws) { +if ($ws && !defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { // So defined('USEEXTERNALSERVER') should be set but is not always include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; $tmpwebsite = new WebSite($db); $tmpwebsite->fetch(0, $ws); $urlok = $tmpwebsite->virtualhost.'/public/payment/paymentok.php?'; $urlko = $tmpwebsite->virtualhost.'/public/payment/paymentko.php?'; } -*/ // Complete urls for post treatment $ref = $REF = GETPOST('ref', 'alpha');