From 06cbf7e50e2cee2907d8f8873436eae2923d3b9d Mon Sep 17 00:00:00 2001 From: Mohamed DAOUD Date: Fri, 18 Apr 2025 20:02:57 +0200 Subject: [PATCH] enhance website payment v21 (#33915) --- htdocs/public/payment/paymentko.php | 14 +++----------- htdocs/public/payment/paymentok.php | 28 ++++++---------------------- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index de41adb9ef4..3cd0ecd04a6 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -359,15 +359,7 @@ if (!empty($doactionsthenredirect)) { $ext_urlko = DOL_URL_ROOT.'/public/website/index.php?paymentsessionkey='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG; } - if (getDolGlobalInt('MARKETPLACE_PAYMENT_IN_FRAME') == 1) { // TODO Remove this to make only a http redirect, if the website need a js redirect to parent frame, he must do it itself. - dol_syslog("Now do a redirect in iframe mode in js to ".$ext_urlko, LOG_DEBUG, 0, '_payment'); - - // Redirect in js is not reliable - print ""; - } else { - dol_syslog("Now do a redirect using Location : ".$ext_urlko, LOG_DEBUG, 0, '_payment'); - - header("Location: ".$ext_urlko); - exit; - } + dol_syslog("Now do a redirect using Location : ".$ext_urlko, LOG_DEBUG, 0, '_payment'); + header("Location: ".$ext_urlko); + exit; } diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 6bde8c52f96..7ee00438afc 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -2166,17 +2166,9 @@ if (!empty($doactionsthenredirect)) { $ext_urlok = DOL_URL_ROOT.'/public/website/index.php?paymentsessionkey='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentok&fulltag='.$FULLTAG; } - if (getDolGlobalInt('MARKETPLACE_PAYMENT_IN_FRAME') == 1) { // TODO Remove this to make only a http redirect, if the website need a js redirect to parent frame, he must do it itself. - dol_syslog("Now do a redirect in iframe mode in js to ".$ext_urlok, LOG_DEBUG, 0, '_payment'); - - // Redirect in js is not reliable - print ""; - } else { - dol_syslog("Now do a redirect using a Location: ".$ext_urlok, LOG_DEBUG, 0, '_payment'); - - header("Location: ".$ext_urlok); - exit; - } + dol_syslog("Now do a redirect using a Location: ".$ext_urlok, LOG_DEBUG, 0, '_payment'); + header("Location: ".$ext_urlok); + exit; } else { // Redirect to an error page // Paymentko page must be created for the specific website @@ -2186,16 +2178,8 @@ if (!empty($doactionsthenredirect)) { $ext_urlko = DOL_URL_ROOT.'/public/website/index.php?paymentsessionkey='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG; } - if (getDolGlobalInt('MARKETPLACE_PAYMENT_IN_FRAME') == 1) { // TODO Remove this to make only a http redirect, if the website need a js redirect to parent frame, he must do it itself. - dol_syslog("Now do a redirect in iframe mode in js to ".$ext_urlko, LOG_DEBUG, 0, '_payment'); - - // Redirect in js is not reliable - print ""; - } else { - dol_syslog("Now do a redirect using a Location:".$ext_urlko, LOG_DEBUG, 0, '_payment'); - - header("Location: ".$ext_urlko); - exit; - } + dol_syslog("Now do a redirect using a Location:".$ext_urlko, LOG_DEBUG, 0, '_payment'); + header("Location: ".$ext_urlko); + exit; } }