Bug: When VIES returns a placeholder address for a valid VAT number (e.g. the Finnish 00000 OSOITE TUNTEMATON when no address is published), revalidateVat() copies it straight onto the billing address. The order then has an empty/invalid postcode+city and Ingrid rejects it (On Hold). Seen on order #13467 (FI, returning customer).
Detection is country-agnostic: we don't enumerate per-country placeholder strings - we check whether the resulting postcode/city is usable (empty or all-zero postcode, or empty city = unusable).
Gate: only valid VAT numbers reach the propagation path; invalid VAT already propagates nothing.
Two use cases (valid VAT + unusable VIES address):
- A. Logged-in / registered customer: fall back to the customer's registered
billing_defaultaddress (their real address on file); keep company name + VAT. - B. Anonymous checkout: fall back to the delivery address entered at checkout; keep company name + VAT; let the order proceed.
Fix: PR #593 - VatNumber::hasUsableAddress() + revalidateVat() uses the VIES address when usable, otherwise the customer's real address per the two cases above. Unit tests for the detection.
VIES placeholder address propagates to order and breaks delivery (FI '00000 OSOITE TUNTEMATON')
Assigned to
Tags
-
Jonathan Gustafsson moved item to board Backlog
1 month ago -
Jonathan Gustafsson moved item to project Bugs
1 month ago -
Jonathan Gustafsson created the item
1 month ago -
Jonathan Gustafsson moved item to board Awaiting Review
1 month ago