Adding error constants, refactoring error struct, and tests

Hope this is useful to you. I needed a good way to switch on Stripe's possible errors.