Fixed PayPal processor error: || instead of &&

Arty

Well-known member
In library/XenForo/UserUpgradeProcessor/PayPal.php line 250
Code:
          $paymentAmountPassed = $paymentAmountPassed || (
             round($this->_filtered['mc_gross'], 2) == round($cost, 2)
             || strtolower($this->_filtered['mc_currency']) == $currency
           );
It should be && on third line of that code instead of || because condition should check if both currency and cost match, not just one of them.

Correct code
Code:
          $paymentAmountPassed = $paymentAmountPassed || (
             round($this->_filtered['mc_gross'], 2) == round($cost, 2)
             && strtolower($this->_filtered['mc_currency']) == $currency
           );
 
Top Bottom