Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal Express - Seen New Error - Help Please


Mort-lemur

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.

Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...