Yeah, I would think this was a dark pattern, but it was probably just simple incompetence. The refund process sounds like it must involve humans and is therefore expensive. Presumably the system had his id number, as you said, a simple data lookup and filter to avoid over deposits would make much more sense. Setting aside the authors bad decisions, he really was dealing with a ridiculously poor system design.