PayPal Express Checkout for nopCommerce 3.0 & 3.10

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
PayPal express checkout giving 'AF'(Afganistan) as country in payer info, whereas my sandbox account is having US as country.

I don't know from where it is coming?
10 years ago
thought wrote:
Hi guys,

I'm getting the error - 10413: The totals of the cart item amounts do not match order amounts. This only occurs intermittently, depending on what items are in the cart.

I think the problem is caused by rounding when calculating prices of items without tax (our prices include a 10% tax), when multiple items are in the cart.

This is my example case. I have a product worth $124.99 (Inc tax). I add 2 of this product to the cart. In the PayPalOrderService.GetPaymentDetails the itemTotalWithDiscount, which excludes tax, is calculated at $227.25 but the 2 cart items are calculated at $113.63 each. So when these are added together they equal $227.26. A 1 cent difference due to rounding.

Just wondering if there is something wrong with my configuration or if there is a small bug here? Any help would be much appreciated.

Cheers

This is a bug in nopCommerce - they know about it. For now you have to fix the code to sort the rounding out. I will try free up a developer to share the code we used to fix this.

Apologies for the lack of replies here, we are a little swamped at the moment. We have been made aware of the multiple currency issue. Just to re-iterate, the code is open source on Codeplex. We are encouraging people to join in and submit bug fixes and feature enhancements. https://paypalexpressnopcommerce.codeplex.com/


Does anyone have this solution? Thanks in advance
10 years ago
Hi,

we modifed the code and the Paypal express works in our case now. The problem was the  itemTotalWithDiscount + taxTotal was not equal with the OrderTotal. The harm in our solution is that the taxAmount is not equal in nopcommerce and in paypal now. The difference could be 1 cent.

in PapalOrderService

in GetPaymentDetails Method


            //var taxTotal = _payPalCartItemService.GetTax(cart);
            decimal taxRate = 0;
            itemTotalWithDiscount = 0;
            foreach (var item in cart)
            {
                var productPrice = _taxService.GetProductPrice(item.ProductVariant,
                                                           _priceCalculationService.GetUnitPrice(item, true), false,
                                                           _workContext.CurrentCustomer, out taxRate);
                 var roundPrice = Math.Round(productPrice, 2);
                 itemTotalWithDiscount = itemTotalWithDiscount + roundPrice*item.Quantity;
            }
            

            itemTotalWithDiscount = itemTotalWithDiscount - orderTotalDiscountAmount - giftCardsAmount;

            //var taxTotal = _payPalCartItemService.GetTax(cart);


in GetMaxAmount

            decimal cartTotal = 0;
            decimal taxRate = 0;
            foreach (var item in cart)
            {
                var productPrice = _taxService.GetProductPrice(item.ProductVariant,
                                                           _priceCalculationService.GetUnitPrice(item, true), false,
                                                           _workContext.CurrentCustomer, out taxRate);
                var roundPrice = Math.Round(productPrice, 2);
                cartTotal = cartTotal + roundPrice * item.Quantity;
            }
10 years ago
Hi,

I will give this a try later, looks good! Thank you for replying
10 years ago
Any help with the curency conversion issue, I also noticed if you have checkout atributes, add-ons: the vaule is NOT been passed to PayPal..
10 years ago
This was easy to setup and use.  

I'm having an issue with adding a handling/processing fee surcharge on, as I do with PayPal Standard.  Has anyone else encountered this?
10 years ago
Hi ,
   Does anyone know if I have to create account by going into Paypal Sandbox or can i select option to say "I do not have paypal business account"?

I have enabled the plugin but still cannot get it to appear in the payment page.

Regards,
P
10 years ago
acharyapank wrote:
Hi ,
   Does anyone know if I have to create account by going into Paypal Sandbox or can i select option to say "I do not have paypal business account"?

I have enabled the plugin but still cannot get it to appear in the payment page.

Regards,
P


It won't show up in the payment page during checkout, only in the shopping cart page. I personally would prefer this button would appear in payment options as the PayPal standard plugin is flawed and allows orders to be created without payment.
10 years ago
Can someone please tell me when an order is actually submitted to the nopCommerce database when using the Paypal Express plugin's "Check out with Paypal" button from the shopping cart?

When testing (using Sandbox), I noticed that payment seems to complete and then the user is directed to the final confirmation page where there is a "Confirm Order" button. What will happen if the user abandons the cart at this point (does not click "Confirm Order")? Does the order still get saved? Does the payment still complete?

What does the "transaction mode" setting do?

Clarification on how this process works would be helpful. Thanks!
10 years ago
you are returned to the site to select shipping and confirm, once confirm button is clicked temp transaction auth from PayPal becomes permanent with shipping added to total:
( that part works)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.