• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 PayPal tax invalid amount

#1
Hi,

To follow the EU relegations regarding taxes, some people within EU are required to pay VAT depending on their country. This is fairly easily as PayPal allows you to set a VAT amount for each country individually. However Xenforo seems to be having issues with this. Whenever someone buys and upgrade with VAT paid, Xenforo notices it's not the expected amount and rejects the upgrade.

Example, user from UK buys $10 account upgrade. They check out, paypal adds 20% tax. The amount is $12 now. XenForo expects $10 and won't process the upgrade for this reason.

Any way of quickly fixing this?
 

Mike

XenForo developer
Staff member
#2
I can't really think of a quick fix for this, short of modifying the way the payment amount check happens in library/XenForo/UserUpgradeProcessor/PayPal.php. Look for $paymentAmountPassed. I suppose the simplest hack would be to check if the amount paid (mc_gross) is >= than what was expected (rather than ==).
 
#3
I can't really think of a quick fix for this, short of modifying the way the payment amount check happens in library/XenForo/UserUpgradeProcessor/PayPal.php. Look for $paymentAmountPassed. I suppose the simplest hack would be to check if the amount paid (mc_gross) is >= than what was expected (rather than ==).
Can you get me the exact code I need to replace? I'm not really the strongest when it comes to development.
 
#4
I can't really think of a quick fix for this, short of modifying the way the payment amount check happens in library/XenForo/UserUpgradeProcessor/PayPal.php. Look for $paymentAmountPassed. I suppose the simplest hack would be to check if the amount paid (mc_gross) is >= than what was expected (rather than ==).
Code:
                    $paymentAmountPassed = $paymentAmountPassed || (
                        round($this->_filtered['mc_gross'], 2) >= round($cost, 2)
                        && strtolower($this->_filtered['mc_currency']) == $currency
                    );
Like that?
 

Chris D

XenForo developer
Staff member
#5
Code:
                    $paymentAmountPassed = $paymentAmountPassed || (
                        round($this->_filtered['mc_gross'], 2) >= round($cost, 2)
                        && strtolower($this->_filtered['mc_currency']) == $currency
                    );
Like that?
Yes, that should work for now.

We have, however, identified a workaround which we have implemented for the next XF release.