| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
PayPal cart item totals error- Solved? | |||
![]() |
|
|
Thread Tools |
#1
|
|||||||||
|
|||||||||
![]() Hi guys and gals,
I have spent the last 12 hours of my life stressing about a problem with XC5 and X-Payments, and I am reporting here to help others as well as get feedback on my ultimate solution. Here is the setup: One of my clients has been receiving complaints from customers that they receive the following PayPal error message when placing their order: "10413: The totals of the cart item amounts do not match order amounts" The client is using XC 5.2.9, and hosted X-Payments, with PayPal PayFlow Pro and iframe credit card form. The problem only occurs when using the volume discounts module, and if the customer has a discounted item in their cart. Then the order item's "price" is different than the item's "itemNetPrice". When this happens, PayPal checks the item price and qty, and totals it up to see if it matches the cart total, and it doesn't. To fix this, I edited the class XLite\Module\CDev\XPaymentsConnector\Core\Xpayment sClient Line #637: I changed: 'price' => $this->roundCurrency($item->getPrice()), to: 'price' => $this->roundCurrency($item->getItemNetPrice()), My thinking was that this is the file that sent the cart information to X-Payments, or at least prepared that info.And rather than send the price, I wanted to send the itemNetPrice which is what the cart total was being calculated from. What do you think of this solution? Is there a better way? Should this fix be added to the core? Thanks, -Mike
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() Hey Mike,
Upgrade of X-Payments to v2.2 should fix the issue, too. It happens because of line items passed to PayPal from an integrated cart like X-Cart that do not match total of the order. The mismatch happens because of rounding. X-Payments Hosted users can get upgrade to any new X-Payments version free of charge - just post us a ticket about that!
__________________
Sincerely yours, Alex Mulin VP of Business Development for X-Cart X-Payments product manager Last edited by ambal : 11-19-2015 at 12:04 AM. |
|||||||||
|
#3
|
|||||||||
|
|||||||||
![]() Quote:
Please note that this issue was fixed in 2.2 only for the PayPal Pro (Payflow API) gateway. "Payflow Pro" itself left untouched since it is an universal module (e.g. it may use FDMS instead of PayPal), but this issue is only related to PayPal. We'll consider to change this behavior to avoid such issues in future. But anyway, If you use PayPal through Payflow you'd better use PayPal Pro (Payflow API) module, since it is absolutely same as Payflow Pro, but supports PayPal-only features (like IPN).
__________________
Sincerely yours, Vladimir Petrov Senior X-Payments Developer |
|||||||||
|
#4
|
|||||||
|
|||||||
![]() Quote:
Here we are years later and this problem still exists in the Payflow API module on 5.3.3.1. Very sad as we were the ones that paid the OP to work on this issue. I have filed a support ticket and would like this resolved please.
__________________
RUNNING: X-Cart Business 5.4.1.25 |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Quote:
If you've mentioned the "PayPal Pro (Payflow Api)" payment gateway then it is powered by X-Payments and in case you're using an old version of X-Payments you still may face with that issue. Please upgrade your X-Payments to the latest version to fix this issue.
__________________
Sincerely yours, Vladimir Petrov Senior X-Payments Developer |
|||||||||
#6
|
|||||||
|
|||||||
![]() Perhaps it is... I will look into getting that upgraded. Thank you for the feedback.
__________________
RUNNING: X-Cart Business 5.4.1.25 |
|||||||
![]() |
|
Thread Tools | |
|
|
|
|||
X-Cart forums © 2001-2020
|