Mort-lemur Posted July 23, 2014 Posted July 23, 2014 Have had a string of Debug emails today as a customer tried to buy something, the error messages in the email read as follows: [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 Not seen this error before - any ideas what may have caused it ?? Many Thanks Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
♥14steve14 Posted July 23, 2014 Posted July 23, 2014 @@Mort-lemur I occasionally get something like this if someone used a discount coupon. As its generally just a few pence difference I just ignore them. Why it does it, I have no idea, so no real help to you. Quote REMEMBER BACKUP, BACKUP AND BACKUP
burt Posted July 23, 2014 Posted July 23, 2014 [L_LONGMESSAGE0] => The totals of the cart item amounts do not match order amounts. Quote
Harald Ponce de Leon Posted July 23, 2014 Posted July 23, 2014 The total values are also included in the parameter debug email. If you add them up you will see where the difference is coming from. L_PAYMENTREQUEST_0_AMTx - add these up, this should equal PAYMENTREQUEST_0_ITEMAMT. PAYMENTREQUEST_0_ITEMAMT + PAYMENTREQUEST_0_SHIPPINGAMT + PAYMENTREQUEST_0_TAXAMT should equal PAYMENTREQUEST_0_AMT. Quote , osCommerce
Mort-lemur Posted July 23, 2014 Author Posted July 23, 2014 Hi Harald - I cannot see any of those parameters on the email I received? Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Harald Ponce de Leon Posted July 23, 2014 Posted July 23, 2014 @@Mort-lemur if you're still logging the transactions in the database, they will be listed under SetExpressCheckout. Quote , osCommerce
Mort-lemur Posted July 23, 2014 Author Posted July 23, 2014 (edited) This is the database call request: VERSION: 112METHOD: SetExpressCheckoutPAYMENTREQUEST_0_PAYMENTACTION: SaleRETURNURL: https://www.mysite.co.uk/ext/modules/payment/paypal/express.php?osC_Action=retrieveCANCELURL: https://www.mysite.co.uk/ext/modules/payment/paypal/express.php?osC_Action=cancelBRANDNAME: My SiteSOLUTIONTYPE: SoleUSER: sales_api1.mysite.co.ukPWD: xxxxxxxxxSIGNATURE: xxxxxxxxxxxPAYMENTREQUEST_0_CURRENCYCODE: GBPALLOWNOTE: 0***CUSTOMER ADDRESS REMOVED FROM HERE***PAYMENTREQUEST_0_AMT: 22.95L_PAYMENTREQUEST_0_NAME0: Worm Count KitL_PAYMENTREQUEST_0_AMT0: 9.98L_PAYMENTREQUEST_0_NUMBER0: 2242{39}125L_PAYMENTREQUEST_0_QTY0: 2L_PAYMENTREQUEST_0_ITEMURL0: http://www.mysite.co.uk/product_info.php?products_id=2242{39}125L_PAYMENTREQUEST_n_ITEMCATEGORY0: PhysicalL_SHIPPINGOPTIONNAME0: UK Mainland (0.3 Kg) 48 Hour CourierL_SHIPPINGOPTIONAMOUNT0: 8.40L_SHIPPINGOPTIONISDEFAULT0: falseL_SHIPPINGOPTIONNAME1: UK Mainland (0.3 Kg) 24 Hour CourierL_SHIPPINGOPTIONAMOUNT1: 9.60L_SHIPPINGOPTIONISDEFAULT1: falseL_SHIPPINGOPTIONNAME2: UK Mainland (0.3 Kg) Hermes 3 - 5 DayL_SHIPPINGOPTIONAMOUNT2: 2.98L_SHIPPINGOPTIONISDEFAULT2: trueL_SHIPPINGOPTIONNAME3: UK Mainland (0.3 Kg) RM 1st ClassL_SHIPPINGOPTIONAMOUNT3: 3.84L_SHIPPINGOPTIONISDEFAULT3: falsePAYMENTREQUEST_0_INSURANCEOPTIONOFFERED: falseCALLBACK: https://www.mysite.co.uk/ext/modules/payment/paypal/express.php?osC_Action=callbackSetCALLBACKTIMEOUT: 6CALLBACKVERSION: 112MAXAMT: 132.55PAYMENTREQUEST_0_ITEMAMT: 19.97PAYMENTREQUEST_0_SHIPPINGAMT: 2.98PAYMENTREQUEST_0_CUSTOM: xxxxxxxxxIDENTITYACCESSTOKEN: xxxxxxx Edited July 23, 2014 by Mort-lemur Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Mort-lemur Posted July 23, 2014 Author Posted July 23, 2014 Maybe this could be caused by attributes? Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Harald Ponce de Leon Posted July 23, 2014 Posted July 23, 2014 9.98 * 2 = 19.96 PAYMENTREQUEST_0_ITEMAMT = 19.97 What price do you have in the database for that product? Quote , osCommerce
Mort-lemur Posted July 23, 2014 Author Posted July 23, 2014 Oh dear - I experienced this before with other paypal versions - the dreaded rounding up! The item is priced @ £8.32 net £8.32 x 2 = £16.64 add Vat @ 1.2% = £19.968 which seems to get rounded up to £19.97 somewhere in the paypal / osc loop The store displays the price at £9.98 each including Vat so 2 x £9.98 = £19.96 On previous paypal systems this just gave a missmatch but let the transaction proceed - but it seems to be causing a fail and aborted sale with PP Express. Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Mort-lemur Posted July 24, 2014 Author Posted July 24, 2014 Still not got this sorted, but the interesting thing is that I only found out about the failed sale due to the paypal debug email - If I had not had this enabled and set with a valid email address then I would be completly unaware of this - as no trace of the failed sale was left on the store admin. So I think enabling the debug email system should be an essential requirement. Thanks Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Harald Ponce de Leon Posted July 24, 2014 Posted July 24, 2014 Heather, can you confirm that Display Prices with Tax is enabled or disabled on your store, and that the net product price is 8.3200 and gross is 9.984? Quote , osCommerce
Mort-lemur Posted July 24, 2014 Author Posted July 24, 2014 @@Harald Ponce de Leon hi Harald, I display prices with tax - to prevent surprises for customers at checkout and shipping has tax as well. Yes the prices you quoted above are the ones for this product. Thanks :) Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Harald Ponce de Leon Posted July 24, 2014 Posted July 24, 2014 This is what I am getting without any code changes: L_PAYMENTREQUEST_0_AMT0 9.98 L_PAYMENTREQUEST_0_QTY0 2 PAYMENTREQUEST_0_ITEMAMT 19.96 PAYMENTREQUEST_0_SHIPPINGAMT 2.98 PAYMENTREQUEST_0_AMT 22.94 I'll set something similar up on the demo site for further testing. Quote , osCommerce
Harald Ponce de Leon Posted July 24, 2014 Posted July 24, 2014 Actually, the demo site would produce the same result as it is currently running from a private branch. I will setup a clean v2.3.4 installation with your prices and tax setting to see if I can reproduce it there. It would be great if you could do the same too so we can compare our results. Quote , osCommerce
Mort-lemur Posted July 24, 2014 Author Posted July 24, 2014 Hi Harald - im seeing some strange behaviour - my site is calculating 2 x the item as 19.97 and not allowing me to proceed to paypal express - however, if I log into the site and choose say bank transfer payment, even though the subtotal is shown at 19.97 and the shipping at 2.98 the order total is shown as 22.94 ? Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Mort-lemur Posted July 24, 2014 Author Posted July 24, 2014 ok tried it on a vanilla 2.3.3.4 BS version and it works as it should But on all 3 of my 2.3.4 sites it has this £0.01 discrepancy.... Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Mort-lemur Posted July 24, 2014 Author Posted July 24, 2014 (edited) Hmm so unless anyone else can confirm this then it looks like it may be perculiar to my stores. which of course leads me to wonder whats going on For now Im going to have to ensure that all my gross prices are only to two decimal places Maybe I should restrict them to this via the database? Many Thanks Edited July 24, 2014 by Mort-lemur Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Harald Ponce de Leon Posted July 24, 2014 Posted July 24, 2014 @@Mort-lemur I just tried on a fresh v2.3.4 install and get the same (successful) result I posted earlier. Do you remember the base version of your store you first used? There might be an update that was missed while upgrading. Quote , osCommerce
Harald Ponce de Leon Posted July 24, 2014 Posted July 24, 2014 The PAYMENTREQUEST_0_ITEMAMT value is taken directly from $order->info['subtotal'] (line 814 in ext/modules/payment/paypal/express.php), so you might have an add-on installed that is manipulating the core value. Or it might be an extra order total module - this is also added to the item amount on lines 816-825. Quote , osCommerce
Harald Ponce de Leon Posted July 24, 2014 Posted July 24, 2014 The shipping rate of 2.98 - is this calculated with a tax rate class too? I have been testing with 2.98 as the net amount (without a tax class). Quote , osCommerce
Mort-lemur Posted July 25, 2014 Author Posted July 25, 2014 @@Harald Ponce de Leon Hi Harald, The shipping rate has a net value of 2.48 then has the same tax class applied ie vat @ 20% Thanks Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Mort-lemur Posted July 25, 2014 Author Posted July 25, 2014 Would it help if you saw how it was behaving on the site? if so I will set up a test product and send you the link Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Harald Ponce de Leon Posted July 25, 2014 Posted July 25, 2014 As this can't be reproduced in a clean installation it means either an add-on or missing update (I presume your stores have been upgraded) is causing the problem. Comparing the following functions and classes from a clean installation may help: includes/functions/general.php includes/classes/currencies.php includes/classes/shopping_cart.php includes/classes/order.php Quote , osCommerce
Mort-lemur Posted July 25, 2014 Author Posted July 25, 2014 Thanks Harald I will do a comparison of the files. The site was originally 2.3.3.4 then I did most of the 2.3.4 upgrades Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.