enhance website payment v21 (#33915)
This commit is contained in:
parent
483112810e
commit
06cbf7e50e
2 changed files with 9 additions and 33 deletions
|
|
@ -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 "<!DOCTYPE html><html><head></head><script>window.top.location.href = '".dol_escape_js($ext_urlko)."';</script></html>";
|
||||
} 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 "<!DOCTYPE html><html><head></head><script>window.top.location.href = '".dol_escape_js($ext_urlok)."';</script></html>";
|
||||
} 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 "<!DOCTYPE html><html><head></head><script>window.top.location.href = '".dol_escape_js($ext_urlko)."';</script></html>";
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue