The incident occurred around 5:45 p.m. Tuesday in the 2300 block of Old Lincoln Highway.
Bensalem Police say an undercover officer was attempting to buy 300 Oxycodone Pills, worth up to $9,000, from the suspects.
Those men, 29-year-old Tariq Moore from the 4700 block of Sansom Street and 25-year-old David McCoy of the 6500 block of North Woodstock Street, allegedly arrived at the location in a car.
As the officer got into the car to conduct the buy, police say he noticed someone hiding under a blanket in the back seat.
The officer got back out of the car but continued the transaction. When he was given only half the drugs, police say, Moore became argumentative, turned toward the vehicle and allegedly ordered McCoy to shoot him.
Instead, police say, the officer identified himself as a cop and McCoy climbed into the trunk in an attempt to hide the gun.
The pair then tried to drive away as other police officers arrived. They rammed a police cruiser but were blocked from escaping.
The pair were arrested and charged and ordered held in Bucks County Prison. Moore was held on 10% of $1 million bail while McCoy was held on 10% of $75,000 bail.