bluehandtalking/spree_tax_cloud — pull request #26 by bbuchalter (2013-07-11 22:09:24+00:00)
Title: Add useful error hooks

@bluehandtalking

Sorry for the splash of pull requests. I'm trying to give you options about how much you want to pull in. All the previous ones build up to this BIG one. Let me give you some backstory.

Essentially, this PR started for one simple reason...currently the 1-3-stable branch will return an unhandled exception if the user provides Tax Cloud with a zip code which does not match the provided state. This is obviously, not so good.

This pull request (and centrally f8a8f01) is about two things:
* Provide a sane default behavior when errors occur: don't do a tax calculation and allow the checkout to complete.
* Give developers hooks to be able to interact with the API's errors and handle them as desired.

I am using the hooks provided by f8a8f01 (as documented in the README) in order to give users an opportunity to correct their addresses. Let me know if you want more information or more explicit documentation in the README. I'm kinda burnt on this, as it's taken a lot of work, but I think it's a big improvement on an important branch.....I hear Spree 2.0 is pretty unstable now, and I'm steering clients away from it.

Thanks for your previous work to build on!