Error 10426: Item total is invalid, UPS/PayPal Pro

  • Posts: 22
  • Thank you received: 2
12 years 3 months ago #61291

I think I may have discovered an incompatibility between the UPS shipping plugin and the Paypal plugin. My client notified me that their customers were getting the following message "Error 10426: Item total is invalid" during the checkout process and were unable to submit their orders.

I tried out several things and located the root of the problem. When an amount is added to the "handling fees %" of the UPS configuration, this causes the error.

Is there an update to the UPS or PayPal plugin that fixes this bug? My customer is very adamant about using the "handling fees %" feature.

Thanks,

HikaShop Essential user

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 3 months ago #61300

That's a PayPal error.

I've never seen such error with PayPal Pro but it can happen in some rare cases with PayPal standard.

I don't think that UPS settings are related to that, but maybe a calculation rounding in the PayPal Pro plugin because of the shipping price.
Could you give more information ?
Could you try to turn on the debug option of the payment plugin and see if you get additional information on the error or some traces ?

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 2
12 years 3 months ago #61304

Nicolas,
I don't doubt that it's more related to Paypal than UPS. However, I do want to emphasize that the system works flawlessly when the "handling fees percent" field is left blank on the UPS plugin.

If I enable the debugging option of the PayPal plugin, will this affect the checkout process / customer experience in any way? How can I access the payment log file? Is this part of the Cron tab in the configuration?

Thanks,

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 3 months ago #61383

Hi,

It won't affect the process. The payment log file is available in the Files tab of the configuration. It's not related to the cron.

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 2
12 years 3 months ago #61419

Thanks Nicholas,
I'll try this out and let you know if I get any feedback.
I was able to output some data on the checkout screen:

  • shipping_price: 16.7675 (with 5% handling fee)
  • shipping_price: 16.34 (without handling fee %)
So, looks like it could definitely be a rounding issue.

Thanks,

Last edit: 12 years 3 months ago by sammsui.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 3 months ago #61421

Thanks for the feedback.

Please change the line:
$rates[$i]->shipping_price+=$method+$handlingFees;

to:
$rates[$i]->shipping_price+=round($method+$handlingFees,2);

in the file plugins/hikashopshipping/ups/ups.php and that should fix the problem I think.

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 2
12 years 3 months ago #61572

I tried replacing the code, but it had no affect.

However, I changed:
$rates[$i]->shipping_price+=$order->total->prices[0]->price_value_with_tax*($rate->shipping_params->handling_fees_percent/100);

to:
$rates[$i]->shipping_price+=round($order->total->prices[0]->price_value_with_tax*($rate->shipping_params->handling_fees_percent/100),2);

and it is now providing a figure with two decimals whenever using the "handling fees percent" option. I won't know for sure if this is the solution until I can test later on my live site.

Question. Will the UPS plugin be replaced if I ever update HikaShop or will my changes persist?

Thanks,

Last edit: 12 years 3 months ago by sammsui.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 3 months ago #61705

Ah yes. Both modifications are recommended.
You won't have problems updating. We'll include the modifications in the next release too.

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum