Raise custom error on payment failure
Light refactors