18 Pa.C.S. § 313
(a) General rule.— A public law enforcement official or a person acting in cooperation with such an official perpetrates an entrapment if for the purpose of obtaining evidence of the commission of an offense, he induces or encourages another person to engage in conduct constituting such offense by either: