Moved your topic to the Altima Forum as the Audio Forum is pretty dead.
The dealership has a tool for programming keys. Did they offer an explanation as to why they couldn't get yours to work?
Are these keys the actual OEM ones that came with the car or replacements?