PayPal Express Checkout – Error Code: 10431
-
Hi
I have been getting a lot of PayPal Express Checkout – Error Code: 10431 errors and submitted the problems to Paypal who said the following. Hope you can help out…
When checking the request your system sent to PayPal, I found this item number in the request:
42.950000000001
while PayPal was expecting 42.95. And thus the amount doesn’t correspond with other parts of the request.Please check the source code on your system and make sure the prices are correct in the request.
The deeper reason of this is actually a common floating point number issue which is present in all programming languages, that the last digits of floating point numbers are not accurate. It is why floating point numbers are not to be compared with “=” sign in programming languages. There is some more information here:
https://stackoverflow.com/questions/2896013/manipulating-and-comparing-floating-points-in-javaI would guess (from my experience) that the problem is with the plugin, because if a platform or a plugin is wisely designed, they should have logics encapsulated, which means PayPal logics go to PayPal plugin.
-
I have definitely seen caching plugins cause problems, yes. Can I get a look at the request log for one that failed?
Do you mean this one?
“DoExpressCheckoutPayment API call failed.
Error Code: 10431
Error Severity Code: Error
Short Error Message: Transaction refused because of an invalid argument. See additional error messages for details.
Detailed Error Message: Item amount is invalid.”That’s just the error. Make sure you have logging enabled in the plugin settings, and then you’ll see some logs in the /wc-logs directory on your web server. That’s what I’d like to see.
Note that you may want to mask sensitive data in the log before posting it here.
I have a logs for you. Can I send it per email, because it contains some sensitive data?
You can mask the sensitive data or you can submit a ticket here, which is private.
I hope this helps to find out what went wrong ??
Thanks for your time!10:20:36 - Start Pay Action 02-21-2015 @ 10:20:37 - ...Order ID: 21172 02-21-2015 @ 10:20:37 - ...Order Total: 107.70 02-21-2015 @ 10:20:37 - ...Cart Total: <span class="amount">107.70 €</span> 02-21-2015 @ 10:20:37 - ...Token:EC-7CW86115N0508964J 02-21-2015 @ 10:20:38 - Test Mode: no 02-21-2015 @ 10:20:38 - Endpoint: https://api-3t.paypal.com/nvp 02-21-2015 @ 10:20:38 - Request: Array ( [USER] => ***** [PWD] => ***** [VERSION] => 112.0 [BUTTONSOURCE] => AngellEYE_SP_WooCommerce [SIGNATURE] => ***** [METHOD] => DoExpressCheckoutPayment [TOKEN] => EC-7CW86115N0508964J [PAYERID] => SLDRRK5JKSM4A [PAYMENTREQUEST_0_AMT] => 107.70 [PAYMENTREQUEST_0_CURRENCYCODE] => EUR [PAYMENTREQUEST_0_INVNUM] => 7530 [PAYMENTREQUEST_0_SHIPTONAME] => masked [PAYMENTREQUEST_0_SHIPTOSTREET] => masked [PAYMENTREQUEST_0_SHIPTOCITY] => masked [PAYMENTREQUEST_0_SHIPTOZIP] => masked [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => DE [PAYMENTREQUEST_0_PAYMENTACTION] => Sale [PAYMENTREQUEST_0_ITEMAMT] => 107.70 [L_PAYMENTREQUEST_0_NAME0] => masked [L_PAYMENTREQUEST_0_AMT0] => 22.9 [L_PAYMENTREQUEST_0_NUMBER0] => 100000007 [L_PAYMENTREQUEST_0_QTY0] => 1 [L_PAYMENTREQUEST_0_NAME1] => masked [L_PAYMENTREQUEST_0_AMT1] => 59.900000000001 [L_PAYMENTREQUEST_0_NUMBER1] => 900000029 [L_PAYMENTREQUEST_0_QTY1] => 1 [L_PAYMENTREQUEST_0_NAME2] => masked [L_PAYMENTREQUEST_0_AMT2] => 24.9 [L_PAYMENTREQUEST_0_NUMBER2] => 600000036 [L_PAYMENTREQUEST_0_QTY2] => 1 ) 02-21-2015 @ 10:20:38 - Response: Array ( [TIMESTAMP] => 2015-02-21T10:20:38Z [CORRELATIONID] => 1fe2bf2cf3c63 [ACK] => Failure [VERSION] => 112.0 [BUILD] => 15295733 [L_ERRORCODE0] => 10431 [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details. [L_LONGMESSAGE0] => Item amount is invalid. [L_SEVERITYCODE0] => Error ) 02-21-2015 @ 10:20:38 - ...Error confirming order 21172 with PayPal 02-21-2015 @ 10:20:38 - ...response:Array ( [TIMESTAMP] => 2015-02-21T10:20:38Z [CORRELATIONID] => 1fe2bf2cf3c63 [ACK] => Failure [VERSION] => 112.0 [BUILD] => 15295733 [L_ERRORCODE0] => 10431 [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details. [L_LONGMESSAGE0] => Item amount is invalid. [L_SEVERITYCODE0] => Error [ERRORS] => Array ( [0] => Array ( [L_ERRORCODE] => 10431 [L_SHORTMESSAGE] => Transaction refused because of an invalid argument. See additional error messages for details. [L_LONGMESSAGE] => Item amount is invalid. [L_SEVERITYCODE] => Error ) ) [PAYMENTS] => Array ( ) [REQUESTDATA] => Array ( [USER] => masked [PWD] => X6RDBP7ZT7FBP9XD [VERSION] => 112.0 [BUTTONSOURCE] => AngellEYE_SP_WooCommerce [SIGNATURE] => AFcWxV21C7fd0v3bYYYRCpSSRl31AthE-z5aKJ4yk5YWSZk.xniY514Q [METHOD] => DoExpressCheckoutPayment [TOKEN] => EC-7CW86115N0508964J [PAYERID] => SLDRRK5JKSM4A [PAYMENTREQUEST_0_AMT] => 107.70 [PAYMENTREQUEST_0_CURRENCYCODE] => EUR [PAYMENTREQUEST_0_INVNUM] => 7530 [PAYMENTREQUEST_0_SHIPTONAME] => masked [PAYMENTREQUEST_0_SHIPTOSTREET] => masked [PAYMENTREQUEST_0_SHIPTOCITY] => masked [PAYMENTREQUEST_0_SHIPTOZIP] => masked [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => DE [PAYMENTREQUEST_0_PAYMENTACTION] => Sale [PAYMENTREQUEST_0_ITEMAMT] => 107.70 [L_PAYMENTREQUEST_0_NAME0] => masked [L_PAYMENTREQUEST_0_AMT0] => 22.9 [L_PAYMENTREQUEST_0_NUMBER0] => 100000007 [L_PAYMENTREQUEST_0_QTY0] => 1 [L_PAYMENTREQUEST_0_NAME1] => masked [L_PAYMENTREQUEST_0_AMT1] => 59.900000000001 [L_PAYMENTREQUEST_0_NUMBER1] => 900000029 [L_PAYMENTREQUEST_0_QTY1] => 1 [L_PAYMENTREQUEST_0_NAME2] => masked [L_PAYMENTREQUEST_0_AMT2] => 24.9 [L_PAYMENTREQUEST_0_NUMBER2] => 600000036 [L_PAYMENTREQUEST_0_QTY2] => 1 ) [RAWREQUEST] => USER=masked&PWD=X6RDBP7ZT7FBP9XD&VERSION=112.0&BUTTONSOURCE=AngellEYE_SP_WooCommerce&SIGNATURE=AFcWxV21C7fd0v3bYYYRCpSSRl31AthE-z5aKJ4yk5YWSZk.xniY514Q&METHOD=DoExpressCheckoutPayment&TOKEN=EC-7CW86115N0508964J&PAYERID=SLDRRK5JKSM4A&PAYMENTREQUEST_0_AMT=107.70&PAYMENTREQUEST_0_CURRENCYCODE=EUR&PAYMENTREQUEST_0_INVNUM=7530&PAYMENTREQUEST_0_SHIPTONAME=masked PAYMENTREQUEST_0_SHIPTOSTREET=masked PAYMENTREQUEST_0_SHIPTOCITY=masked PAYMENTREQUEST_0_SHIPTOZIP=masked PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=DE&PAYMENTREQUEST_0_PAYMENTACTION=Sale&PAYMENTREQUEST_0_ITEMAMT=107.70&L_PAYMENTREQUEST_0_NAME0=masked L_PAYMENTREQUEST_0_AMT0=22.9&L_PAYMENTREQUEST_0_NUMBER0=100000007&L_PAYMENTREQUEST_0_QTY0=1&L_PAYMENTREQUEST_0_NAME1=Pmasked_PAYMENTREQUEST_0_AMT1=59.900000000001&L_PAYMENTREQUEST_0_NUMBER1=900000029&L_PAYMENTREQUEST_0_QTY1=1&L_PAYMENTREQUEST_0_NAME2=masked L_PAYMENTREQUEST_0_AMT2=24.9&L_PAYMENTREQUEST_0_NUMBER2=600000036&L_PAYMENTREQUEST_0_QTY2=1 [RAWRESPONSE] => TIMESTAMP=2015%2d02%2d21T10%3a20%3a38Z&CORRELATIONID=1fe2bf2cf3c63&ACK=Failure&VERSION=112%2e0&BUILD=15295733&L_ERRORCODE0=10431&L_SHORTMESSAGE0=Transaction%20refused%20because%20of%20an%20invalid%20argument%2e%20See%20additional%20error%20messages%20for%20details%2e&L_LONGMESSAGE0=Item%20amount%20is%20invalid%2e&L_SEVERITYCODE0=Error ) 02-21-2015 @ 10:20:38 - SetExpressCheckout API call failed. 02-21-2015 @ 10:20:38 - Detailed Error Message: Item amount is invalid. 02-21-2015 @ 10:20:38 - Short Error Message: Transaction refused because of an invalid argument. See additional error messages for details. 02-21-2015 @ 10:20:38 - Error Code: 10431 02-21-2015 @ 10:20:38 - Error Severity Code: Error 02-21-2015 @ 10:21:19 - Start Express Checkout 02-21-2015 @ 10:21:20 - Test Mode: no 02-21-2015 @ 10:21:20 - Endpoint: https://api-3t.paypal.com/nvp 02-21-2015 @ 10:21:20 - Request: Array ( [USER] => ***** [PWD] => ***** [VERSION] => 112.0 [BUTTONSOURCE] => AngellEYE_SP_WooCommerce [SIGNATURE] => ***** [METHOD] => SetExpressCheckout [RETURNURL] => https://www.masked.com/shop-2/cart/checkout/review-order/?pp_action=revieworder [CANCELURL] => https://www.masked.com/shop-2/cart/ [LOCALECODE] => DE [LOGOURL] => https://www.masked.com/wp-content/uploads/2014/06/Paypal-Logo.jpg [BRANDNAME] => masked [SOLUTIONTYPE] => Sole [LANDINGPAGE] => Login [PAYMENTREQUEST_0_AMT] => 107.70 [PAYMENTREQUEST_0_CURRENCYCODE] => EUR [PAYMENTREQUEST_0_SHIPPINGAMT] => 0.00 [PAYMENTREQUEST_0_TAXAMT] => 0.00 [PAYMENTREQUEST_0_PAYMENTACTION] => Sale [L_PAYMENTREQUEST_0_NAME0] => masked [L_PAYMENTREQUEST_0_AMT0] => 22.90 [L_PAYMENTREQUEST_0_NUMBER0] => 100000007 [L_PAYMENTREQUEST_0_QTY0] => 1 [L_PAYMENTREQUEST_0_NAME1] => masked [L_PAYMENTREQUEST_0_AMT1] => 59.90 [L_PAYMENTREQUEST_0_NUMBER1] => 900000029 [L_PAYMENTREQUEST_0_QTY1] => 1 [L_PAYMENTREQUEST_0_NAME2] => masked [L_PAYMENTREQUEST_0_AMT2] => 24.90 [L_PAYMENTREQUEST_0_NUMBER2] => 600000036 [L_PAYMENTREQUEST_0_QTY2] => 1 [PAYMENTREQUEST_0_ITEMAMT] => 107.7 ) 02-21-2015 @ 10:21:20 - Response: Array ( [TOKEN] => EC-2X973691DB6136915 [TIMESTAMP] => 2015-02-21T10:21:20Z [CORRELATIONID] => 5112d6ae3374c [ACK] => Success [VERSION] => 112.0 [BUILD] => 15295733 ) 02-21-2015 @ 10:21:20 - Redirecting to PayPal 02-21-2015 @ 10:21:41 - Start Review Order 02-21-2015 @ 10:21:41 - ...Token:EC-2X973691DB6136915 02-21-2015 @ 10:21:41 - ...PayerID: SLDRRK5JKSM4A 02-21-2015 @ 10:21:42 - Test Mode: no 02-21-2015 @ 10:21:42 - Endpoint: https://api-3t.paypal.com/nvp 02-21-2015 @ 10:21:42 - Request: Array ( [USER] => ***** [PWD] => ***** [VERSION] => 112.0 [BUTTONSOURCE] => AngellEYE_SP_WooCommerce [SIGNATURE] => ***** [METHOD] => GetExpressCheckoutDetails [TOKEN] => EC-2X973691DB6136915 ) 02-21-2015 @ 10:21:42 - Response: Array ( [TOKEN] => EC-2X973691DB6136915 [BILLINGAGREEMENTACCEPTEDSTATUS] => 0 [CHECKOUTSTATUS] => PaymentActionNotInitiated [TIMESTAMP] => 2015-02-21T10:21:42Z [CORRELATIONID] => edd66e459c28e [ACK] => Success [VERSION] => 112.0 [BUILD] => 15295733 [EMAIL] => masked [PAYERID] => SLDRRK5JKSM4A [PAYERSTATUS] => verified [FIRSTNAME] => masked [LASTNAME] => masked [COUNTRYCODE] => DE [SHIPTONAME] => masked [SHIPTOSTREET] => masked [SHIPTOCITY] => masked [SHIPTOZIP] => masked [SHIPTOCOUNTRYCODE] => DE [SHIPTOCOUNTRYNAME] => Germany [ADDRESSSTATUS] => Confirmed [CURRENCYCODE] => EUR [AMT] => 107.70 [ITEMAMT] => 107.70 [SHIPPINGAMT] => 0.00 [HANDLINGAMT] => 0.00 [TAXAMT] => 0.00 [INSURANCEAMT] => 0.00 [SHIPDISCAMT] => 0.00 [L_NAME0] => masked [L_NAME1] => masked [L_NAME2] => masked [L_NUMBER0] => 100000007 [L_NUMBER1] => 900000029 [L_NUMBER2] => 600000036 [L_QTY0] => 1 [L_QTY1] => 1 [L_QTY2] => 1 [L_TAXAMT0] => 0.00 [L_TAXAMT1] => 0.00 [L_TAXAMT2] => 0.00 [L_AMT0] => 22.90 [L_AMT1] => 59.90 [L_AMT2] => 24.90 [L_ITEMWEIGHTVALUE0] => 0.00000 [L_ITEMWEIGHTVALUE1] => 0.00000 [L_ITEMWEIGHTVALUE2] => 0.00000 [L_ITEMLENGTHVALUE0] => 0.00000 [L_ITEMLENGTHVALUE1] => 0.00000 [L_ITEMLENGTHVALUE2] => 0.00000 [L_ITEMWIDTHVALUE0] => 0.00000 [L_ITEMWIDTHVALUE1] => 0.00000 [L_ITEMWIDTHVALUE2] => 0.00000 [L_ITEMHEIGHTVALUE0] => 0.00000 [L_ITEMHEIGHTVALUE1] => 0.00000 [L_ITEMHEIGHTVALUE2] => 0.00000 [PAYMENTREQUEST_0_CURRENCYCODE] => EUR [PAYMENTREQUEST_0_AMT] => 107.70 [PAYMENTREQUEST_0_ITEMAMT] => 107.70 [PAYMENTREQUEST_0_SHIPPINGAMT] => 0.00 [PAYMENTREQUEST_0_HANDLINGAMT] => 0.00 [PAYMENTREQUEST_0_TAXAMT] => 0.00 [PAYMENTREQUEST_0_INSURANCEAMT] => 0.00 [PAYMENTREQUEST_0_SHIPDISCAMT] => 0.00 [PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED] => false [PAYMENTREQUEST_0_SHIPTONAME] => masked [PAYMENTREQUEST_0_SHIPTOSTREET] => masked [PAYMENTREQUEST_0_SHIPTOCITY] => masked [PAYMENTREQUEST_0_SHIPTOZIP] => masked [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => DE [PAYMENTREQUEST_0_SHIPTOCOUNTRYNAME] => Germany [PAYMENTREQUEST_0_ADDRESSSTATUS] => Confirmed [L_PAYMENTREQUEST_0_NAME0] => masked [L_PAYMENTREQUEST_0_NAME1] => masked [L_PAYMENTREQUEST_0_NAME2] => masked [L_PAYMENTREQUEST_0_NUMBER0] => 100000007 [L_PAYMENTREQUEST_0_NUMBER1] => 900000029 [L_PAYMENTREQUEST_0_NUMBER2] => 600000036 [L_PAYMENTREQUEST_0_QTY0] => 1 [L_PAYMENTREQUEST_0_QTY1] => 1 [L_PAYMENTREQUEST_0_QTY2] => 1 [L_PAYMENTREQUEST_0_TAXAMT0] => 0.00 [L_PAYMENTREQUEST_0_TAXAMT1] => 0.00 [L_PAYMENTREQUEST_0_TAXAMT2] => 0.00 [L_PAYMENTREQUEST_0_AMT0] => 22.90 [L_PAYMENTREQUEST_0_AMT1] => 59.90 [L_PAYMENTREQUEST_0_AMT2] => 24.90 [L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE0] => 0.00000 [L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE1] => 0.00000 [L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE2] => 0.00000 [L_PAYMENTREQUEST_0_ITEMLENGTHVALUE0] => 0.00000 [L_PAYMENTREQUEST_0_ITEMLENGTHVALUE1] => 0.00000 [L_PAYMENTREQUEST_0_ITEMLENGTHVALUE2] => 0.00000 [L_PAYMENTREQUEST_0_ITEMWIDTHVALUE0] => 0.00000 [L_PAYMENTREQUEST_0_ITEMWIDTHVALUE1] => 0.00000 [L_PAYMENTREQUEST_0_ITEMWIDTHVALUE2] => 0.00000 [L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE0] => 0.00000 [L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE1] => 0.00000 [L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE2] => 0.00000 [PAYMENTREQUESTINFO_0_ERRORCODE] => 0 ) 02-21-2015 @ 10:21:57 - Start Pay Action 02-21-2015 @ 10:21:58 - ...Order ID: 21173 02-21-2015 @ 10:21:58 - ...Order Total: 107.70 02-21-2015 @ 10:21:58 - ...Cart Total: <span class="amount">107.70 €</span> 02-21-2015 @ 10:21:58 - ...Token:EC-2X973691DB6136915 02-21-2015 @ 10:21:59 - Test Mode: no 02-21-2015 @ 10:21:59 - Endpoint: https://api-3t.paypal.com/nvp 02-21-2015 @ 10:21:59 - Request: Array ( [USER] => ***** [PWD] => ***** [VERSION] => 112.0 [BUTTONSOURCE] => AngellEYE_SP_WooCommerce [SIGNATURE] => ***** [METHOD] => DoExpressCheckoutPayment [TOKEN] => EC-2X973691DB6136915 [PAYERID] => SLDRRK5JKSM4A [PAYMENTREQUEST_0_AMT] => 107.70 [PAYMENTREQUEST_0_CURRENCYCODE] => EUR [PAYMENTREQUEST_0_INVNUM] => 7531 [PAYMENTREQUEST_0_SHIPTONAME] => masked [PAYMENTREQUEST_0_SHIPTOSTREET] => masked [PAYMENTREQUEST_0_SHIPTOCITY] => masked [PAYMENTREQUEST_0_SHIPTOZIP] => masked [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => DE [PAYMENTREQUEST_0_PAYMENTACTION] => Sale [PAYMENTREQUEST_0_ITEMAMT] => 107.70 [L_PAYMENTREQUEST_0_NAME0] => masked [L_PAYMENTREQUEST_0_AMT0] => 22.9 [L_PAYMENTREQUEST_0_NUMBER0] => 100000007 [L_PAYMENTREQUEST_0_QTY0] => 1 [L_PAYMENTREQUEST_0_NAME1] => masked [L_PAYMENTREQUEST_0_AMT1] => 59.900000000001 [L_PAYMENTREQUEST_0_NUMBER1] => 900000029 [L_PAYMENTREQUEST_0_QTY1] => 1 [L_PAYMENTREQUEST_0_NAME2] => masked [L_PAYMENTREQUEST_0_AMT2] => 24.9 [L_PAYMENTREQUEST_0_NUMBER2] => 600000036 [L_PAYMENTREQUEST_0_QTY2] => 1 ) 02-21-2015 @ 10:21:59 - Response: Array ( [TIMESTAMP] => 2015-02-21T10:21:59Z [CORRELATIONID] => 506bd3bd7938d [ACK] => Failure [VERSION] => 112.0 [BUILD] => 15295733 [L_ERRORCODE0] => 10431 [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details. [L_LONGMESSAGE0] => Item amount is invalid. [L_SEVERITYCODE0] => Error ) 02-21-2015 @ 10:21:59 - ...Error confirming order 21173 with PayPal 02-21-2015 @ 10:21:59 - ...response:Array ( [TIMESTAMP] => 2015-02-21T10:21:59Z [CORRELATIONID] => 506bd3bd7938d [ACK] => Failure [VERSION] => 112.0 [BUILD] => 15295733 [L_ERRORCODE0] => 10431 [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details. [L_LONGMESSAGE0] => Item amount is invalid. [L_SEVERITYCODE0] => Error [ERRORS] => Array ( [0] => Array ( [L_ERRORCODE] => 10431 [L_SHORTMESSAGE] => Transaction refused because of an invalid argument. See additional error messages for details. [L_LONGMESSAGE] => Item amount is invalid. [L_SEVERITYCODE] => Error ) ) [PAYMENTS] => Array ( ) [REQUESTDATA] => Array ( [USER] => masked [PWD] => X6RDBP7ZT7FBP9XD [VERSION] => 112.0 [BUTTONSOURCE] => AngellEYE_SP_WooCommerce [SIGNATURE] => AFcWxV21C7fd0v3bYYYRCpSSRl31AthE-z5aKJ4yk5YWSZk.xniY514Q [METHOD] => DoExpressCheckoutPayment [TOKEN] => EC-2X973691DB6136915 [PAYERID] => SLDRRK5JKSM4A [PAYMENTREQUEST_0_AMT] => 107.70 [PAYMENTREQUEST_0_CURRENCYCODE] => EUR [PAYMENTREQUEST_0_INVNUM] => 7531 [PAYMENTREQUEST_0_SHIPTONAME] => masked [PAYMENTREQUEST_0_SHIPTOSTREET] => masked [PAYMENTREQUEST_0_SHIPTOCITY] => masked [PAYMENTREQUEST_0_SHIPTOZIP] => masked [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => DE [PAYMENTREQUEST_0_PAYMENTACTION] => Sale [PAYMENTREQUEST_0_ITEMAMT] => 107.70 [L_PAYMENTREQUEST_0_NAME0] => masked [L_PAYMENTREQUEST_0_AMT0] => 22.9 [L_PAYMENTREQUEST_0_NUMBER0] => 100000007 [L_PAYMENTREQUEST_0_QTY0] => 1 [L_PAYMENTREQUEST_0_NAME1] => masked [L_PAYMENTREQUEST_0_AMT1] => 59.900000000001 [L_PAYMENTREQUEST_0_NUMBER1] => 900000029 [L_PAYMENTREQUEST_0_QTY1] => 1 [L_PAYMENTREQUEST_0_NAME2] => masked [L_PAYMENTREQUEST_0_AMT2] => 24.9 [L_PAYMENTREQUEST_0_NUMBER2] => 600000036 [L_PAYMENTREQUEST_0_QTY2] => 1 ) [RAWREQUEST] => USER=masked&PWD=X6RDBP7ZT7FBP9XD&VERSION=112.0&BUTTONSOURCE=AngellEYE_SP_WooCommerce&SIGNATURE=AFcWxV21C7fd0v3bYYYRCpSSRl31AthE-z5aKJ4yk5YWSZk.xniY514Q&METHOD=DoExpressCheckoutPayment&TOKEN=EC-2X973691DB6136915&PAYERID=SLDRRK5JKSM4A&PAYMENTREQUEST_0_AMT=107.70&PAYMENTREQUEST_0_CURRENCYCODE=EUR&PAYMENTREQUEST_0_INVNUM=7531&PAYMENTREQUEST_0_SHIPTONAME=masked PAYMENTREQUEST_0_SHIPTOSTREET=masked PAYMENTREQUEST_0_SHIPTOCITY=masked PAYMENTREQUEST_0_SHIPTOZIP=masked PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=DE&PAYMENTREQUEST_0_PAYMENTACTION=Sale&PAYMENTREQUEST_0_ITEMAMT=107.70&L_PAYMENTREQUEST_0_NAME0=masked L_PAYMENTREQUEST_0_AMT0=22.9&L_PAYMENTREQUEST_0_NUMBER0=100000007&L_PAYMENTREQUEST_0_QTY0=1&L_PAYMENTREQUEST_0_NAME1=masked _PAYMENTREQUEST_0_AMT1=59.900000000001&L_PAYMENTREQUEST_0_NUMBER1=900000029&L_PAYMENTREQUEST_0_QTY1=1&L_PAYMENTREQUEST_0_NAME2=masked L_PAYMENTREQUEST_0_AMT2=24.9&L_PAYMENTREQUEST_0_NUMBER2=600000036&L_PAYMENTREQUEST_0_QTY2=1 [RAWRESPONSE] => TIMESTAMP=2015%2d02%2d21T10%3a21%3a59Z&CORRELATIONID=506bd3bd7938d&ACK=Failure&VERSION=112%2e0&BUILD=15295733&L_ERRORCODE0=10431&L_SHORTMESSAGE0=Transaction%20refused%20because%20of%20an%20invalid%20argument%2e%20See%20additional%20error%20messages%20for%20details%2e&L_LONGMESSAGE0=Item%20amount%20is%20invalid%2e&L_SEVERITYCODE0=Error ) 02-21-2015 @ 10:21:59 - SetExpressCheckout API call failed. 02-21-2015 @ 10:21:59 - Detailed Error Message: Item amount is invalid. 02-21-2015 @ 10:21:59 - Short Error Message: Transaction refused because of an invalid argument. See additional error messages for details. 02-21-2015 @ 10:21:59 - Error Code: 10431 02-21-2015 @ 10:21:59 - Error Severity Code: Error
Ok, the problem is that for some reason the price of one of your items on the order that failed came out to 59.900000000001 instead of getting rounded to 59.90. PayPal wont’ accept an item price like this, of course.
I’ve never seen that, though, except for when people are using the bulk item discount. You’ve said you’re not using that, but are you using any other similar discount type plugin? Did these failed orders have a standard WooCommerce coupon added?
Ah okay. That seems logical!
No coupons were added, that’s strange. We also don’t use any other discount plugin.
Is it a problem with tax settings maybe?Probably, yeah. How do you have your tax settings configured? Do you have “Prices Entered With Tax” set to Yes?
FYI I am still getting this problem even after all the recent Woocommerce updates.
I have prices entered with tax and I am not using any discount plugins
SetExpressCheckout API call failed. Error Code: 10413 Error Severity Code: Error Short Error Message: Transaction refused because of an invalid argument. See additional error messages for details. Detailed Error Message: The totals of the cart item amounts do not match order amounts.
@andyussdu, we are working to get this issue resolved in our 1.1.7 update. It may be a few weeks before that’s done, though. Sorry I don’t have better immediate news.
@angelleye, yes prices entered with tax is set to yes.
As well as:
Rounding: Rounding Round tax at subtotal level, instead of rounding per line
Display prices: including taxSo yeah, that seems to be the issue. Tax included in pricing. WooCommerce does some math to display the pricing correctly that way, and the functions to pull pricing out of their API aren’t rounding for us like I thought they would.
We’ll get it all resolved (hopefully) in our 1.1.7 update. It’s probably going to get a couple of weeks before that’s ready, though.
Ok, thanks for the good support!
Hi,
Just adding that I am having the exact same error (Error Code: 10431) using the plugin at the moment. No discounts, coupons or other plugins affecting the pricing of woocommerce. I do have prices inclusive of tax as suggested above.
WP 4.1.1
WC 2.3.11
Plugin 1.1.6.2When I return to the website from PayPal to accept shipping option it also displays with the error code:
First Name is a required field.
Last Name is a required field.
Address is a required field.
Suburb is a required field.
Country is a required field.
State is a required field.
Postcode is a required field.
Email Address is a required field.
Phone is a required field.Is all this information not being sent back from PayPal because of the $$ issue, or is there more at play here?
Thanks
- The topic ‘PayPal Express Checkout – Error Code: 10431’ is closed to new replies.