Random Checkout Behaviour…
-
OK, something strange is going on. Browser and W3TC caches cleared.
Using latest WP, WC and WC paypal express.
For example…
4 items.
Product 1, checkout straight to paypal.
Product 1 and 2, checkout straight to paypal.
Product 1, 2 and 3; error “An error occurred, please try again or try an alternate form of payment.”
Remove item 3, and it checks out again.
Product 1, 2, 3 and 4, checkout straight to paypal.
Remove items 3 and 4, and then it fails.As such, it’s seems random. Sometimes a product will check out, sometimes it won’t.
-
This is really bad.
Created a new simple item.
Already one simple item in cart. Able to check out.
Added new simple item “An error occurred, please try again or try an alternate form of payment.”
Removed original item, and able to check out with new item.This is bad, random behaviour.
Anyway forget all that.
I’ve got an empty cart.
Add a single, simple product.
Try and checkout and…
“An error occurred, please try again or try an alternate form of payment.”
…and then add another product, and able to check out.
This needs sorting with urgency.
To think I came from Bigcommerce for this.
Was a happy WP user until today.
Log file…
09-10-2014 @ 23:30:22 - Request method: POST uri: https://api-3t.paypal.com/nvp user-agent: WooCommerce-PayPal-Express-Gateway/3.1.0 (WooCommerce/2.2.1; WordPress/4.0) headers: Array ( ) body: Array ( [USER] => ************************** [PWD] => **************** [SIGNATURE] => ******************************************************** [VERSION] => 115 [METHOD] => SetExpressCheckout [RETURNURL] => http://www.domain.co.uk/wc-api/WC_Gateway_PayPal_Express/?action=get_express_checkout_details [CANCELURL] => http://www.domain.co.uk/cart/ [BRANDNAME] => domain.co.uk [SOLUTIONTYPE] => Sole [LANDINGPAGE] => Login [L_PAYMENTREQUEST_0_NAME0] => domain.co.uk - Order [L_PAYMENTREQUEST_0_DESC0] => Ranger Lite 3S Sleeping Bag x 1 [L_PAYMENTREQUEST_0_AMT0] => 27.49 [L_PAYMENTREQUEST_0_QTY0] => 1 [PAYMENTREQUEST_0_AMT] => 36.99 [PAYMENTREQUEST_0_CURRENCYCODE] => GBP [PAYMENTREQUEST_0_ITEMAMT] => 27.49 [PAYMENTREQUEST_0_SHIPPINGAMT] => 3.33 [PAYMENTREQUEST_0_TAXAMT] => 6.16 [PAYMENTREQUEST_0_PAYMENTACTION] => Sale [MAXAMT] => 55.49 ) duration: 0.89768s 09-10-2014 @ 23:30:22 - Response code: 200 message: OK headers: Array ( [date] => Wed, 10 Sep 2014 22:30:22 GMT [server] => Apache [content-length] => 388 [connection] => close [content-type] => text/plain; charset=utf-8 ) body: Array ( [TIMESTAMP] => 2014-09-10T22:30:22Z [CORRELATIONID] => ec23019a2088e [ACK] => Failure [VERSION] => 115 [BUILD] => 12709182 [L_ERRORCODE0] => 10413 [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details. [L_LONGMESSAGE0] => The totals of the cart item amounts do not match order amounts. [L_SEVERITYCODE0] => Error ) 09-10-2014 @ 23:30:22 - Code: 10413, Error: Transaction refused because of an invalid argument. See additional error messages for details. - <strong>The totals of the cart item amounts do not match order amounts.</strong>[PAYMENTREQUEST_0_AMT] => 36.99
but…
[PAYMENTREQUEST_0_ITEMAMT] => 27.49
[PAYMENTREQUEST_0_SHIPPINGAMT] => 3.33
[PAYMENTREQUEST_0_TAXAMT] => 6.16=£36.98
If this is the PayPal express gateway by WooThemes, Log the above information on the support area so the devs can be notified.
If you need a temporary solution for payment, enable PayPal standard.
Also just found out ‘version 3.1.1’ was put live a moment ago to fix a calculation issue, so try that too.
It’s VAT rounding in WC that’s the problem.
Take an item that costs £9.99.
WC is calculating £8.33 + 1.67 tax, which is incorrect. The tax is supposed to be rounded down to 1.66.
£9.99 / 1.2 = £8.325
This is supposed to be rounded down not up… http://www.hmrc.gov.uk/manuals/vatrecmanual/vatrec12030.htm
From your link
If the VAT comes to 0.5 of one penny or more, it should be rounded up.
The VAT on £9.99 is £1.665 and so it should be rounded up to £1.67
OK, Correct in that respect, but if the customer is getting charged £9.99, and the vat is correctly £1.67, then the excluding VAT price is £8.32.
[PAYMENTREQUEST_0_ITEMAMT] => 8.33 <——————-
[PAYMENTREQUEST_0_TAXAMT] => 1.67Both parts of the equation have been rounded up. VAT should be rounded, then a straight subtraction to two decimal places to find the balance.
It’s still a problem, you can barely checkout with anything using this logic.
`[PAYMENTREQUEST_0_AMT] => 7.99
[PAYMENTREQUEST_0_ITEMAMT] => 3.33
[PAYMENTREQUEST_0_SHIPPINGAMT] => 4.00
[PAYMENTREQUEST_0_TAXAMT] => 0.67That’s a total of £8.00, and only £7.99 requested. FAIL.
* Feature – Shipping & Tax are now sent to PayPal during initial checkout
How about NOT sending shipping and tax, and just requesting the total????
Just noting the plugin author’s first reply to you:
If this is the PayPal express gateway by WooThemes, Log the above information on the support area so the devs can be notified.
Where do you think the plugin is getting its information from?
That’s what I’m saying, and it’s the very first thing the ‘devs’ will say.
I don’t know, but the plugin author is kind of telling you bring this to the devs, so you should probably bring it to the devs. 😉
Done. I already know what the outcome will be.
And that link was wrong, to log a support job it’s four pages away… https://support.woothemes.com/hc/en-us/requests/new
The topic ‘Random Checkout Behaviour…’ is closed to new replies.