When Eells failed to comply, the assailants opened fire, police said. Eells, struck in the stomach, fired a couple of rounds toward the would-be robbers, wounding one suspect, a 15-year-old boy, in the chest and a leg.
The 15-year-old was charged by police; his name was not released. The other suspects fled north on 12th.
The teenager will face charges of aggravated and simple assault, robbery, and possibly attempted murder, said police spokeswoman Tanya Little.
She said Eells had a license to carry a firearm and probably would not be charged.
"As far as the investigation stands now, I don't believe so. He was acting in self-defense," she said.
"If you do have a permit, that would be the time to use your weapon, when someone tries to rob you and shoots you," she said.
No one answered the door at the brown stucco rowhouse where the shooting occurred.
Several Temple students live in the area, about two blocks north of campus, neighbors said. But the area is not prime student housing. Across the way are vacant, overgrown lots and boarded-up rowhouses.
Temple spokesman Ray Betzner asked anyone with information about the crime to contact Philadelphia police.
Eells' grandmother Kathy Mack of Southampton said he was awake and expected to recover.
"We are very thankful," she said.
She said Eells attended Central Bucks High School South and was majoring in psychology. He shares the house with five other students and works in a nearby grocery, she said.
Mack said her grandson was standing on the steps, smoking a cigarette, when the shooting occurred.
On Eells' Facebook page, he lists one of his inspirations as Samuel Colt, the weapons manufacturer and designer, and his favorite activities as playing bass guitar and shooting guns.
"The world looks different when you're looking at it down the barrel of a loaded gun," his page says. "Whether that's good or bad depends on which end you're looking down."
Contact staff writer Michael Vitez at 215-854-5639 or firstname.lastname@example.org.
This article includes information from the Associated Press.