District Attorney Matt Weintraub says he had a license to carry, but his permit was recently expired. Officials say the man is a business owner, who carried the gun for his own protection.
"He is a lifelong, law-abiding citizen and yes, you do get credit for that. A business owner who had the gun solely for his own protection and thank God he did," Weintraub said.
Meanwhile, police say the guns that the brothers used were actually airsoft guns.
It happened after 10 p.m. Tuesday at Porfirio's II Pizza and Pasta in the 900 block of Veteran Highway (Route 413) near Trenton Road.
"Everything happened so fast. Everything got crazy," Porfirio's co-owner Alex Lara said.
Middletown Township Police say the the customer and two employees were inside when two armed men entered the restaurant.
"They were wearing dark clothing, backpacks, had hoods up, face masks on, gloves, brandishing handguns," said Middletown Twp. Police Lt. Stephen Forman.
Police say they were yelling commands at the customer, who complied, backed away and put his hands up.
Investigators say the brothers, Shawn and Justin Rose of Bucks County, pistol-whipped the customer.
"When the armed suspect looked away for a moment, the customer pulled out a .45 caliber handgun from beneath his jacket. He shot the man who had just pistol-whipped him once in the torso, killing him," Weintraub said.
The man killed was identified as 24-year-old Shawn Rose.
The customer then turned to 22-year-old Justin Rose, who was pointing the gun at the clerk, and fired twice. Authorities say the suspect fell through the pizza shop's front door.
Justin was taken to St. Mary Medical Center in Langhorne in serious condition and later transferred to Thomas Jefferson University Hospital in Philadelphia in critical condition.
The customer refused medical treatment for lacerations and abrasions to his head.
"He was pistol-whipped," said Forman. "They were very aggressive. He was in imminent fear of his life, and believed that was his only option to get out of there that night."
The shop's other owner, Gilmer Porfirio, says he can't thank that customer enough.
"To me his is part of the family, now. He's a hero," Porfirio said.
Officials say security video captured the attempted robbery, pistol whipping, and the shooting.
The shop remained closed Wednesday.