Openfoodnetwork: Orders with tax refunds: Can't checkout with paypal - "PayPal failed. Tax total is invalid"

Created on 3 May 2021  路  5Comments  路  Source: openfoodfoundation/openfoodnetwork

Description


If a product has an included tax (for a given zone), but the order is placed from a customer with billing address outside that zone, then the order will include the refund of that tax amount.

This scenario seems to prevent Paypal from being used as a payment gateway on checkout: . The error "PayPal failed. Tax total is invalid" is displayed on the checkout page.

Expected Behavior

It should be possible to take payments with Paypal, in cases where there is a tax refund.

Actual Behaviour

It is not possible to take payments with Paypal, in cases where there is a tax refund.

Steps to Reproduce




  1. Set up an included tax, for a given Zone.
  2. Log in as a customer, and place some items in the cart in which this tax applies.
  3. Fill in the billing address making sure it is outside the Zone set for that tax.
  4. Attempt to checkout with Paypal.

Animated Gif/Screenshot



Peek 2021-05-03 11-10.gif

Workaround

Using another payment method.

Severity

It has workarounds, but I guess it will may prevent customer checkout, for hubs in which no other payment method is set. This would point out to S2.

Your Environment

  • Version used: while testing v3.6.10 but pre-existing.
  • Browser name and version: Firefox 88
  • Operating System and version (desktop or mobile): Ubuntu 20.04

Possible Fix

bug-s5

All 5 comments

I'm pretty sure all instances that use included tax use a single default zone, so I don't think we'll currently hit this in production.

There are definitely issues around this tax-refund-for-inclusive-tax-on-orders-outside-the-default-zone scenario though :+1:

That's good news! :+1: Shall we downgrade or rather or close?

Downgrade for sure, maybe s5. I'm pretty sure it's pre-exisiting for a long time. It would be good to make sure some of these little potential issues are solved though, in case a new instance pops up with different tax configurations.

There are a number of bugs like this that only appear with certain specific configurations and don't currently affect any production servers.

Sure, I'm thinking of a similar case on #6463. Maybe grouping them in a Tax Refunds epic?

Was this page helpful?
0 / 5 - 0 ratings