Open PxT opened 10 years ago
USPS only requires a 5 digit ZIP code to provide rates. If you are sending more than 5 digits, this may be causing the situation described.
Can't control what a customer enters into the checkout so if the backend requires only 5 digits then the front-end should enforce it or strip the extra characters before sending.
we should consider 3`rd party gateways too, for example in romania postal codes have 6 digits
I disagree with @PxT, the back-end can't blow it's brains out on bad user input, the new shipping component needs to support some type of parameter validation and error handling. Postal codes are a great example of something that should have validation by region.
By "back-end" I meant USPS. If their servers go crazy when you send zip+4 (unconfirmed, but that's the behavior I am seeing) then wpec should take care to only send 5 digits.
Romania isn't really relevant to this specific bug but could be part of a larger region validation idea.
Not sure if it's something specific to my setup, but when a customer enters a ZIP+4 code in the shipping calculator it doesn't return an accurate quote, instead they just get back a zero.
Wordpress 3.9.1, wp-e-commerce 3.8.14