I'm running Woocommerce in a WordPress website using the Divi theme.
OS: CentOS Linux release 7.5.1804 (Core)
PHP 7.1.22 (cli) (built: Sep 13 2018 16:54:21) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.22, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
WordPress: 4.9.8
I am running Woocommerce and I've modified the standard install to allow for a quantity out to 2 decimal places.
1.57, 2.39, 3.17, etc ...
The mods work great, and they're working well inside Woocommerce, however, when I submit for payment I get:
PayPal error (10413): An error (10413) occurred while processing your PayPal payment.
Of course, the line item amounts are not adding up to the order total amount.
Here's the API request and error:
[01-Dec-2018 16:53:22 UTC] WC_Gateway_PPEC_Client::_request: remote request to https://api-3t.sandbox.paypal.com/nvp with params: Array
(
[LOGOIMG] => https://example.com/wp-content/uploads/2018/07/logo-150x150.png
[HDRIMG] =>
[PAGESTYLE] =>
[BRANDNAME] => CodeMilitant
[RETURNURL] => https://example.com/checkout/?woo-paypal-return=true
[CANCELURL] => https://example.com/cart/?woo-paypal-cancel=true
[ADDROVERRIDE] => 1
[LANDINGPAGE] => Login
[SOLUTIONTYPE] => Sole
[PAYMENTREQUEST_0_PAYMENTACTION] => sale
[PAYMENTREQUEST_0_INSURANCEAMT] => 0
[PAYMENTREQUEST_0_HANDLINGAMT] => 0
[PAYMENTREQUEST_0_CUSTOM] =>
[PAYMENTREQUEST_0_INVNUM] =>
[PAYMENTREQUEST_0_CURRENCYCODE] => USD
[PAYMENTREQUEST_0_AMT] => 141.92
[PAYMENTREQUEST_0_ITEMAMT] => 141.92
[PAYMENTREQUEST_0_SHIPPINGAMT] => 0
[PAYMENTREQUEST_0_TAXAMT] => 0
[PAYMENTREQUEST_0_SHIPDISCAMT] => 0
[NOSHIPPING] => 1
[PAYMENTREQUEST_0_SHIPTONAME] => Tom <removed>
[PAYMENTREQUEST_0_SHIPTOSTREET] => <removed>
[PAYMENTREQUEST_0_SHIPTOSTREET2] =>
[PAYMENTREQUEST_0_SHIPTOCITY] => Bristol
[PAYMENTREQUEST_0_SHIPTOSTATE] => TN
[PAYMENTREQUEST_0_SHIPTOZIP] => 37620
[PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => US
[L_PAYMENTREQUEST_0_NAME0] => Freelance Hourly Rate - 57
[L_PAYMENTREQUEST_0_DESC0] =>
[L_PAYMENTREQUEST_0_QTY0] => 1.23
[L_PAYMENTREQUEST_0_AMT0] => 57
[L_PAYMENTREQUEST_0_NAME1] => Freelance Hourly Rate - 43
[L_PAYMENTREQUEST_0_DESC1] =>
[L_PAYMENTREQUEST_0_QTY1] => 1.67
[L_PAYMENTREQUEST_0_AMT1] => 43
[METHOD] => SetExpressCheckout
[VERSION] => 120.0
[USER] => <removed>
[PWD] => *******************
[SIGNATURE] => ************************************************
)
[01-Dec-2018 16:53:23 UTC] WC_Gateway_PPEC_Client::_process_response: acknowleged response body: Array
(
[TIMESTAMP] => 2018-12-01T16:53:23Z
[CORRELATIONID] => d829ab70e4feb
[ACK] => Failure
[VERSION] => 120.0
[BUILD] => 000000
[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
)
I removed my private info.
As you can see, the quantities for each line item and out to 2 decimal places, and when added together, the line item totals are an exact match to the order total, however, it all fails.
Since I'm sending the correct info, and the line items and order total match, my guess is that PayPal does not allow for decimal quantities.
Does anyone have a suggestion for correcting this?
Thank you.
... View more