The commission of acts which would otherwise constitute an offense is not criminal if the defendant engaged in the proscribed conduct because he was induced to do so by a law enforcement official or other person acting under his direction, seeking to obtain evidence for the purpose of prosecution, and the methods used to obtain that evidence were such as to create a substantial risk that the acts would be committed by a person who, but for such inducement, would not have conceived of or engaged in conduct of the sort induced. Merely affording a person an opportunity to commit an offense is not entrapment even though representations or inducements calculated to overcome the offender's fear of detection are used.