1. 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

Discussion in 'Troubleshooting and Problems' started by Marks534, Jun 20, 2016.

  1. Marks534

    Marks534 Member


    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?
  2. Mike

    Mike XenForo Developer Staff Member

    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. Marks534

    Marks534 Member

    Can you get me the exact code I need to replace? I'm not really the strongest when it comes to development.
  4. Marks534

    Marks534 Member

                        $paymentAmountPassed = $paymentAmountPassed || (
                            round($this->_filtered['mc_gross'], 2) >= round($cost, 2)
                            && strtolower($this->_filtered['mc_currency']) == $currency
    Like that?
  5. Chris D

    Chris D XenForo Developer Staff Member

    Yes, that should work for now.

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

    Marks534 Member

    Are you guys eventually planning to have full support for tax based on location?

Share This Page