diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php index 0403f2c2735..db2ba280d3f 100644 --- a/htdocs/paypal/lib/paypalfunctions.lib.php +++ b/htdocs/paypal/lib/paypalfunctions.lib.php @@ -74,8 +74,8 @@ if (getDolGlobalString('PAYPAL_API_SANDBOX')) { } // Proxy -$PROXY_HOST = $conf->global->MAIN_PROXY_HOST; -$PROXY_PORT = $conf->global->MAIN_PROXY_PORT; -$PROXY_USER = $conf->global->MAIN_PROXY_USER; -$PROXY_PASS = $conf->global->MAIN_PROXY_PASS; +$PROXY_HOST = getDolGlobalString('MAIN_PROXY_HOST'); +$PROXY_PORT = getDolGlobalString('MAIN_PROXY_PORT'); +$PROXY_USER = getDolGlobalString('MAIN_PROXY_USER'); +$PROXY_PASS = getDolGlobalString('MAIN_PROXY_PASS'); $USE_PROXY = !getDolGlobalString('MAIN_PROXY_USE') ? false : true; diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index d909773d049..a56d291644c 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -360,10 +360,10 @@ if ($reshook >= 0) { // If data not provided into callback url, search them into the session env if (empty($ipaddress)) { - $ipaddress = $_SESSION['ipaddress']; + $ipaddress = $_SESSION['ipaddress']; } if (empty($TRANSACTIONID)) { - $TRANSACTIONID = $_SESSION['TRANSACTIONID']; // pi_... or ch_... + $TRANSACTIONID = empty($_SESSION['TRANSACTIONID']) ? '' :$_SESSION['TRANSACTIONID']; // pi_... or ch_... if (empty($TRANSACTIONID) && GETPOST('payment_intent', 'alphanohtml')) { // For the case we use STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 2 $TRANSACTIONID = GETPOST('payment_intent', 'alphanohtml'); @@ -377,7 +377,7 @@ if (empty($currencyCodeType)) { } // Seems used onyl by Paypal if (empty($paymentType)) { - $paymentType = $_SESSION["paymentType"]; + $paymentType = $_SESSION["paymentType"]; } $fulltag = $FULLTAG;