- Posts: 22
- Thank you received: 2
Error 10426: Item total is invalid, UPS/PayPal Pro
14 years 1 month ago #61291
by sammsui
Error 10426: Item total is invalid, UPS/PayPal Pro was created by sammsui
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
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.
14 years 1 month ago #61300
by nicolas
Replied by nicolas on topic Re: Error 10426: Item total is invalid, UPS/PayPal Pro
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 ?
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.
14 years 1 month ago #61304
by sammsui
Replied by sammsui on topic Re: Error 10426: Item total is invalid, UPS/PayPal Pro
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,
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.
14 years 1 month ago #61383
by nicolas
Replied by nicolas on topic Re: Error 10426: Item total is invalid, UPS/PayPal Pro
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.
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.
14 years 1 month ago - 14 years 1 month ago #61419
by sammsui
Replied by sammsui on topic Re: Error 10426: Item total is invalid, UPS/PayPal Pro
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:
Thanks,
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 %)
Thanks,
Last edit: 14 years 1 month ago by sammsui.
Please Log in or Create an account to join the conversation.
14 years 1 month ago #61421
by nicolas
Replied by nicolas on topic Re: Error 10426: Item total is invalid, UPS/PayPal Pro
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 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.
14 years 1 month ago - 14 years 1 month ago #61572
by sammsui
Replied by sammsui on topic Re: Error 10426: Item total is invalid, UPS/PayPal Pro
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,
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: 14 years 1 month ago by sammsui.
Please Log in or Create an account to join the conversation.
14 years 1 month ago #61705
by nicolas
Replied by nicolas on topic Re: Error 10426: Item total is invalid, UPS/PayPal Pro
Ah yes. Both modifications are recommended.
You won't have problems updating. We'll include the modifications in the next release too.
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.206 seconds