Better rule for redirect to paymentok/ko.

This commit is contained in:
ldestailleur 2025-05-26 21:26:44 +02:00
parent 57d337696c
commit 1f056c4102

View file

@ -258,7 +258,8 @@ if ($ws && !defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { //
$tmpwebsite = new Website($db);
$tmpwebsite->fetch(0, $ws);
if ($tmpwebsite->virtualhost == $lastproxy) {
if (preg_replace('/https?:\/\//i', '', $tmpwebsite->virtualhost) == $lastproxy) {
// If the newpayment.php page was called from a proxy with same domain than the website virtual host, we must use this one as the redirect domain url.
$urlok = $tmpwebsite->virtualhost.'/public/payment/paymentok.php?';
$urlko = $tmpwebsite->virtualhost.'/public/payment/paymentko.php?';
}