diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 5a79f6e3f22..ddaf6dbb90e 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -96,9 +96,7 @@ if (!GETPOST("currency", 'alpha')) { } $source = GETPOST("s", 'aZ09') ? GETPOST("s", 'aZ09') : GETPOST("source", 'aZ09'); $getpostlang = GETPOST('lang', 'aZ09'); -$noheaderfooter = GETPOSTINT("noheaderfooter"); -$isembed = GETPOSTINT("isembed"); -$ws = GETPOSTINT("ws"); +$ws = GETPOSTINT("ws"); // Website reference where the newpayment page is embedded if (!$action) { if (!GETPOST("amount", 'alpha') && !$source) { @@ -217,10 +215,6 @@ if ($paymentmethod && !preg_match('/'.preg_quote('PM='.$paymentmethod, '/').'/', $FULLTAG .= ($FULLTAG ? '.' : '').'PM='.$paymentmethod; } -if ($isembed) { - $FULLTAG .= ($FULLTAG ? '.' : '').'EMB='.$isembed; -} - if ($ws) { $FULLTAG .= ($FULLTAG ? '.' : '').'WS='.$ws; } @@ -895,8 +889,6 @@ print ''; print ''; print ''; print ''; -print ''; -print ''; print "\n"; @@ -923,7 +915,7 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb } // Output html code for logo -if ($urllogo && !$noheaderfooter) { +if ($urllogo && !$ws) { print '
'; print '
'; print ''.$langs->trans("PoweredBy").'
'; } print '
'; -} elseif ($creditor && !$noheaderfooter) { +} elseif ($creditor && !$ws) { print '
'; print '
'; print $creditor; @@ -2723,7 +2715,7 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme } } -if (!$noheaderfooter) { +if (!$ws) { htmlPrintOnlineFooter($mysoc, $langs, 1, $suffix, $object); } diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 616d00d7467..1cb3c2174f0 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -96,12 +96,6 @@ if (empty($paymentmethod)) { dol_syslog("paymentmethod=".$paymentmethod); } -// Detect $isembed -$isembed = preg_match('/EMB=([^\.]+)/', $FULLTAG, $reg_emb) ? $reg_emb[1] : 0; -if ($isembed) { - dol_syslog("paymentko.php page is called into an iframe.", LOG_DEBUG, 0, '_payment'); -} - // Detect $ws $ws = preg_match('/WS=([^\.]+)/', $FULLTAG, $reg_ws) ? $reg_ws[1] : 0; if ($ws) { @@ -321,11 +315,6 @@ $db->close(); if (!empty($doactionsthenredirect)) { // Redirect to an error page // Paymentko page must be created for the specific website - $ext_urlko = DOL_URL_ROOT.'/public/website/index.php?website='.$ws.'&pageref=paymentko&fulltag='.$FULLTAG; - if (!empty($isembed)) { - print ""; - } else { - header("Location: ".$ext_urlko); - exit; - } + $ext_urlko = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG; + print ""; } diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index f88309cab27..7ca756aa033 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -128,12 +128,6 @@ if (empty($paymentmethod)) { dol_syslog("***** paymentok.php is called paymentmethod=".$paymentmethod." FULLTAG=".$FULLTAG." REQUEST_URI=".$_SERVER["REQUEST_URI"], LOG_DEBUG, 0, '_payment'); -// Detect $isembed -$isembed = preg_match('/EMB=([^\.]+)/', $FULLTAG, $reg_emb) ? $reg_emb[1] : 0; -if ($isembed) { - dol_syslog("paymentok.php page is called into an iframe.", LOG_DEBUG, 0, '_payment'); -} - // Detect $ws $ws = preg_match('/WS=([^\.]+)/', $FULLTAG, $reg_ws) ? $reg_ws[1] : 0; if ($ws) { @@ -2080,22 +2074,12 @@ if (!empty($doactionsthenredirect)) { if ($ispaymentok) { // Redirect to a success page // Paymentok page must be created for the specific website - $ext_urlok = DOL_URL_ROOT.'/public/website/index.php?website='.$ws.'&pageref=paymentok&fulltag='.$FULLTAG; - if (!empty($isembed)) { - print ""; - } else { - header("Location: ".$ext_urlok); - exit; - } + $ext_urlok = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentok&fulltag='.$FULLTAG; + print ""; } else { // Redirect to an error page // Paymentko page must be created for the specific website - $ext_urlko = DOL_URL_ROOT.'/public/website/index.php?website='.$ws.'&pageref=paymentko&fulltag='.$FULLTAG; - if (!empty($isembed)) { - print ""; - } else { - header("Location: ".$ext_urlko); - exit; - } + $ext_urlko = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG; + print ""; } }