Hello and thank you for contacting us. This is Dwayne B. and I’m an expert here and looking forward to assisting you today. If at any point any of my answers aren’t clear please don’t hesitate to ask for clarification. Also, I can only answer the questions you specifically ask and based on the facts that you give so please be sure that you ask the questions you want to ask and provide all necessary facts. Further, if you get a message asking if you want to do additional services like a telephone call that message is automatically generated by the website and is not sent from me. I, like most of the experts in the Legal categories, do not do telephone calls due to issues with State Bar rules and other concerns.
Unfortunately, it likely is not legal as you describe it.
There are four different types of programs in CA which this could fall under, 1) a contest, 2) a sweepstakes, 3) a lottery, and 4) a raffle.
A contest involves some type of skill which, obviously, a drawing of a name does not.
A sweepstakes is like a lottery but no purchase can be required to enter the drawing.
The lottery allows for the drawing of a name and can be based solely on luck but, unfortunately, in California a lottery can only be conducted by the state of California.
A raffle, which sound like what you want to conduct, can only be done for charitable work and 90% or more of the proceeds must go to a recognized charitable organization.
You can read more about these at http://www.dca.ca.gov/publications/legal_guides/u-3.shtml
You can read about raffles at https://oag.ca.gov/charities/raffles