My question involves criminal law for the state of: Pennsylvania

Last night I received a citation for 'underage purchase, attempt to purchase, consumption, possession or transportation of alcohol. I am 19 years old.
I was a passenger in the car. I did not purchase, consume, or even touch the beer in the back seat. In fact, the vehicle did not even move after the beer was placed in it. The man who purchased the beer (he was, to my knowledge, 21 years old) and placed it in the back seat, was asked to exit the car by officers in a black crown victoria and was not allowed to re enter upon request. 15 minutes after handing our ID's over to the pair of police officers, they returned our ID's and informed us that we will be receiving underage alcohol citations by mail. When the driver, and owner of the car asked why we were being cited, the officer responded by saying that he did not believe that the beer was not intended for our consumption. The man who purchased the beer was then arrested at the last minute, at the request of a nearby plainclothes police officer.

So here's my question: Did these officers have proper cause to cite me for underage purchase/consumption/possession/transportation? And what do you suggest as my course of action in court?

Quick summary:

I was:

-In Pennsylvania
-19 years old
-Not the owner of the car
-Not driving, a passenger in a stationary car
-Not intoxicated
-Not purchasing OR attempting to purchase alcohol
-Not holding/touching the beer