Jump to content
Mort-lemur

Paypal Express - Seen New Error - Help Please

Recommended Posts

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


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.

Share this post


Link to post
Share on other sites

@@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.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

[L_LONGMESSAGE0] => The totals of the cart item amounts do not match order amounts.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

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.


:heart:, osCommerce

Share this post


Link to post
Share on other sites

Hi Harald - I cannot see any of those parameters on the email I received?


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.

Share this post


Link to post
Share on other sites

This is the database call request:

 

VERSION: 112
METHOD: SetExpressCheckout
PAYMENTREQUEST_0_PAYMENTACTION: Sale
RETURNURL: https://www.mysite.co.uk/ext/modules/payment/paypal/express.php?osC_Action=retrieve
CANCELURL: https://www.mysite.co.uk/ext/modules/payment/paypal/express.php?osC_Action=cancel
BRANDNAME: My Site
SOLUTIONTYPE: Sole
USER: sales_api1.mysite.co.uk
PWD: xxxxxxxxx
SIGNATURE: xxxxxxxxxxx
PAYMENTREQUEST_0_CURRENCYCODE: GBP
ALLOWNOTE: 0
***CUSTOMER ADDRESS REMOVED FROM HERE***
PAYMENTREQUEST_0_AMT: 22.95
L_PAYMENTREQUEST_0_NAME0: Worm Count Kit
L_PAYMENTREQUEST_0_AMT0: 9.98
L_PAYMENTREQUEST_0_NUMBER0: 2242{39}125
L_PAYMENTREQUEST_0_QTY0: 2
L_PAYMENTREQUEST_0_ITEMURL0: http://www.mysite.co.uk/product_info.php?products_id=2242{39}125
L_PAYMENTREQUEST_n_ITEMCATEGORY0: Physical
L_SHIPPINGOPTIONNAME0: UK Mainland (0.3 Kg) 48 Hour Courier
L_SHIPPINGOPTIONAMOUNT0: 8.40
L_SHIPPINGOPTIONISDEFAULT0: false
L_SHIPPINGOPTIONNAME1: UK Mainland (0.3 Kg) 24 Hour Courier
L_SHIPPINGOPTIONAMOUNT1: 9.60
L_SHIPPINGOPTIONISDEFAULT1: false
L_SHIPPINGOPTIONNAME2: UK Mainland (0.3 Kg) Hermes 3 - 5 Day
L_SHIPPINGOPTIONAMOUNT2: 2.98
L_SHIPPINGOPTIONISDEFAULT2: true
L_SHIPPINGOPTIONNAME3: UK Mainland (0.3 Kg) RM 1st Class
L_SHIPPINGOPTIONAMOUNT3: 3.84
L_SHIPPINGOPTIONISDEFAULT3: false
PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED: false
CALLBACK: https://www.mysite.co.uk/ext/modules/payment/paypal/express.php?osC_Action=callbackSet
CALLBACKTIMEOUT: 6
CALLBACKVERSION: 112
MAXAMT: 132.55
PAYMENTREQUEST_0_ITEMAMT: 19.97
PAYMENTREQUEST_0_SHIPPINGAMT: 2.98
PAYMENTREQUEST_0_CUSTOM: xxxxxxxxx
IDENTITYACCESSTOKEN: xxxxxxx

 

Edited by Mort-lemur

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.

Share this post


Link to post
Share on other sites

Maybe this could be caused by attributes?


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.

Share this post


Link to post
Share on other sites

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.


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.

Share this post


Link to post
Share on other sites

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


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.

Share this post


Link to post
Share on other sites

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?


:heart:, osCommerce

Share this post


Link to post
Share on other sites

@@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 :)


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.

Share this post


Link to post
Share on other sites

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.


:heart:, osCommerce

Share this post


Link to post
Share on other sites

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.


:heart:, osCommerce

Share this post


Link to post
Share on other sites

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 ?


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.

Share this post


Link to post
Share on other sites

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....


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.

Share this post


Link to post
Share on other sites

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 by Mort-lemur

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.

Share this post


Link to post
Share on other sites

@@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.


:heart:, osCommerce

Share this post


Link to post
Share on other sites

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.


:heart:, osCommerce

Share this post


Link to post
Share on other sites

@@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


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.

Share this post


Link to post
Share on other sites

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


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.

Share this post


Link to post
Share on other sites

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


:heart:, osCommerce

Share this post


Link to post
Share on other sites

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


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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×