Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor angelleye

    (@angelleye)

    This sounds like a rounding issue happening from discounted items or tax calculations. We have a few issues in our GitHub repo about this sort of thing already, so we’ve been making adjustments, testing and troubleshooting quite a bit. It’s a tough thing to troubleshoot, though, because of the way WC seems to provide data based on different scenarios.

    Do you have logging enabled in the plugin? I’d like to get a look at the log file that gets saved at /wc-logs on the server.

    Same error for me, but in my case I didn’t even have a rounding problem since the original price, the error reported and the amount I received are the same.

    Curious thing is that the payment actually processes and I did receive the payment in my PayPal account. Just the plugin side of things didn’t work as expected.

    https://gyazo.com/abf1cddb7181ac3e743ff63fadc53044

    It’s important to add that I do use a currency converter plugin that might have something to do:

    https://codecanyon.net/item/woocommerce-currency-switcher/8085217

    Plugin Contributor angelleye

    (@angelleye)

    @arkymedes, yes, currency converters could cause issues. That particular error you’re showing doesn’t look like something that came from our plugin, though. We don’t have any “validation” that takes place on order totals. If they don’t match the PayPal API would return an error, but you’d see a different error than you’re showing in this screenshot. I’m thinking maybe that came from the currency switcher..??

    Do you have logging enabled in the PayPal plugin settings? If so, please send me the log file so we can see what was actually sent to PayPal for this transaction.

    Thread Starter CelticWebs

    (@podman)

    Hi,

    When I had the error I was not using a currency converter. The error was that when using the discount plugin the amount of money requested from PayPal was one cent different to the invoice. When the payment was received it didn’t match the invoice value so woo commerce put the order on hold.

    I eventually used a different plugin to cure my problem because I didn’t have time to debug unfortunately.

    Hello again thanks for the super fast response!

    Just before putting a link to the log file here, is there any sensitive information that might be there that I need to take care of in advance?

    Thank you!

    PS: Took care of the emails and this things.. might be ok now.

    https://pastebin.com/nxsZdG3k

    Ok I think I found what the problem is and I believe it would be interesting for you to know:

    My currency converter actually gets its exchange rates with 4 decimal numbers after the comma, so for example the exchange rate from EUR to GBP today is as follow:

    1 EUR = 0.7399 GBP

    I believe that PayPal uses only 2 decimal numbers and this might have problems with what PayPal reports back?

    Plugin Contributor angelleye

    (@angelleye)

    Right, that is the issue. WooCommerce itself has made lots of changes over versions with how they handle and provide pricing calculations, and then other plugins sometimes do things a little differently that throw things for a loop, too. It’s been a tough thing to troubleshoot.

    Basically, what we’re going to have to do is ensure that we’re rounding everything the WC platform provides us, and then we’re going to have to add a check to see if the totals add up correctly or not prior to sending the request to PayPal. If not, we’ll have to add the penny somewhere.

    That’s part of what makes this difficult, though. Where do I add the penny? I could make it an extra line item on the order, but then that would drive accountants crazy (because then where do they put it?)

    I could add the penny to one of the current line items, shipping, tax, or some value, but then it wouldn’t match exactly what WooCommerce shows.

    This is one of the primary issues that has delayed our next update. We’re working on it, though, and we’ll get it resolved ASAP.

    In my case it’s the shipping module that returns 3 decimal. If I manually round it off in the code before passing it on to PP for WC, then it works properly. My problem is I’m unable to do this using proper accounting convention (rounding half-up). The strange part of this of course is that if my client checkouts with PP standard, it all goes fine. If he uses his credit card and PP pro, it goes to hell.

    Plugin Contributor angelleye

    (@angelleye)

    I guess I’m not familiar with rounding “half-up”..??

    I am having this problem, but it is NOT due to rounding issues. I am having the problem with US transactions and I am in the US, so it isn’t a currency conversion issue. It isn’t a tax issue because all of the problematic orders except 1 did NOT charge tax. All of the on hold orders were exactly $10 or $20 difference. For example, here is the error:

    Validation error: PayPal amounts do not match (gross 474.00). Order status changed from Pending Payment to On Hold.

    and the totals:

    Discount [?]: $0.00
    Shipping [?]: $5.00
    Order Total:
    $464.00
    Refunded: -$0.00

    The problem is not happening on all orders and I cannot find any pattern in the problematic orders.

    Plugin Contributor angelleye

    (@angelleye)

    @netpagz,

    Yes, currency converters can cause the same sort of issue, unfortunately. Do you have logging enabled in the plugin? I would need to see a sample of the API request that is generating the error.

    Plugin Contributor angelleye

    (@angelleye)

    We have released the 1.1.6.3 which resolves these types of issues. Or at least it should based on the testing we’ve done.

    I’m going to close this thread, but please download the update and let me know if you continue to have problems.

    Thank you a lot! Going to try ASAP ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Validation error: PayPal amounts do not match’ is closed to new replies.