Move otp code verification into a single method.
Move otp code verification into a single method.

rubygems/rubygems.org,rubygems/rubygems.org,rubygems/rubygems.org,sonalkr132/rubygems.org,rubygems/rubygems.org,sonalkr132/rubygems.org,sonalkr132/rubygems.org,sonalkr132/rubygems.org