Refactoring:  Validate payment method id before doing any database stuff.