Support for overriding failure handling in stripe_utils

Current implementation remains the default, but user can now call ```registerCustomFailureHandler``` to override the error handling.