Hey everybody,
We’re definitely working hard on it. I have a bunch of new commits in our GitHub repo that I need to test which I’m hoping will resolve these issues for good.
We’ll get it released ASAP!
For those that are curious, here’s a great example of the problem in screenshot form. Take a look at this.
You can see the in the screenshot we have the following…
Subtotal = 75.00
Shipping = 10.11
Tax = 4.88
You add that up and you get 89.99, however, you can see WooCommerce is showing a grand total of 89.98. It’s actually displaying it incorrectly on screen.
So then our plugin, of course, simply pulls the current subtotal, shipping, tax values from WC, and then it also pulls the grand total, but PayPal sees that and says…uh…no…this doesn’t add up, you’re a penny off.
The good news is I think I’ve finally found a way to continually reproduce this so I can finally do more troubleshooting with the code and add some checks and balances to get around this issue.
I also just find it sort of fascinating that a solution like WooCommerce is actually displaying incorrect math like this and everybody just seems to accept it.
Anyway, we’re working on it and hoping to get an update done here soon!
I’m very familiar with this problem from software I wrote some years ago and am posting this in case it would help.
Currency has to be displayed rounded to 2 places of decimals for people to read it. This isn’t accurate enough however and will give for example (using the Irish standard VAT of 23%) a price of 9.99 on a pre vat price of 8.13 or 10.01 on a price of 8.14, ie it’s impossible using 2 places of decimals to get a price of 10.00 including VAT. We get over this by rounding behind the scenes to 4 places of decimals (can still throw up the odd strange price, 6 places would be better but for us 4 is enough)
This approach can lead to a situation where what’s displayed on screen won’t add up to the calculation done by the software – rounding errors.
This seems to be the problem here. I know nothing about Woocommerce apart from being a user but wonder would the following help?
Find how many places Woo rounds to
Using this re-create the final total Woo comes up with (the total behind the display so to speak) and get the plugin to use this figure for comparison. Knowing the number of rounding places in use (seems to be 6) it should always be possible to make the two match.
In case that’s of help!
Fionnbarr
@fionnbarr, thanks for providing that info. Actually, though, in studying this data a little more closely I’m noticing something a little odd.
In the screenshot I provided the grand total WC is displaying came out as 89.98. What’s interesting, though, is that when I follow the data more closely it’s actual value is 89.9865. So it seems that WC actually did NOT round this, but instead they simply chopped off the last 2 decimals. If it was rounded it would have become 89.99 (65 would round up, of course) and then this problem would not have happened on this particular sample.
This sample I’ve been working with actually does not including tax in the pricing, so that’s going to be another issue I need to focus on after I get to the bottom of this one. So again, I appreciate your feedback on that.
Hi Angeleye,
I noticed the forum topic title says RESOLVED, can you please remove this as it is misleading. Are you any closer to finding a solution?
To others,
Has anyone been able to find a plugin to replace this one? Our clients are losing customers and likely won’t return with the error message below. I appreciate any advice on this. Thanks!
PayPal Express Checkout Error Notification
DoExpressCheckoutPayment API call failed.
Error Code: 10410
Error Severity Code: Error
Short Error Message: Invalid token
Detailed Error Message: Invalid token.
To my knowledge we had it resolved in our last 1.1.6.3 update. Most of the feedback we’ve received since then confirmed that, but apparently there’s some other scenario that must be causing it.
Do you have logging enabled in the plugin settings? I would need to get a look at the log file to see exactly what happened.
Hi Angelleye, I didn’t know you’d released an update. I was waiting for your a response in this forum.
Ah, sorry. I guess I shouldn’t rely too much on people seeing that in the WordPress Plugins page. It should show up like any other plugin update.
Are you seeing it? Can you go ahead and update and see if the problem still exists for you?
Version 1.1.6.3.4
Hi, thanks for the great plugin π
I also have had a few of these errors pop up. How do I enable logging or access it?
Let me know and I am willing to help.
Thanks,
Ewan
Logging can be enabled from within the Express Checkout and/or Payments Pro plugin settings.