Police in Pennsylvania nabbed a drug dealer after the 20-year-old texted a constable asking if he’d like to purchase marijuana.

“It must have been a wrong number. He just happened to text the wrong person, and it turned out pretty bad for him,” Police Chief Eric Porter told WPXI-TV.

Police advised the constable to text back.

“How much?” he asked.

“A gram for $20,” the man responded.

A drug deal was then arranged between the two. At the scene, the 20-year-old, identified as Jordan Burney, was arrested. Police later learned he is also wanted out of Florida for minor charges, WPXI reported.

Follow Oliver Darcy (@oliverdarcy) on Twitter