Q: air pump replacement after "service engine soon" light goes on on 2004 BMW 325xi

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
We paid for this expensive part to be replaced. Now my friend says the light went on because the gas cap wasn't closed securely! Is this true? (He said this happens on his Honda and Toyota) Was I ripped off? The car has 67K miles on it.
(1) Answer
A loose gas cap is only one of over 100 different faults that can turn the check engine light in your 2004 BMW 325xi to turn on. When the light came on a fault code or codes were stored in the Engine Control Module. The BMW tech retrieved the stored code(s) and was most likely lead to the Air Pump System. If you know the number of the code which turned your SES light on please compare it to the RepairPal OBDII code chart to determine the meaning of the stored code -