how about: rename search_payment_code to find_payment_from_csv 
and inside that method you just try to find the match. (as you do now) and return either Registration.find_by_payment_code(code) (which can be nil) or you return false. 

Then you check if the return value is truthy (basically non-nil) and the rest you append to the fails array