Certainly I'm sure your intentions were nothing but good, however, in most schools and with most kids, there would probably be some repercussions. I went to what I consider to be very good, safe, nice schools for my entire life, but something like that would still have some pretty stiff results. Mostly a lot of teasing, which, depending on the child, can either be traumatic or no big deal. It's the type of thing that would probably follow the kid around for a while (kids' friends would probably bug him about it for the next ten years). Even the kid's friends would probably tease him... and I disagree with people saying that if a friend teased him that they're not his friend. If anything, friends will tend to tease more than complete/semi strangers.
On the whole, I think it would have been a better idea just to wait until he came home. If he likes flowers, he can still wait until he comes home... the couple of hours won't make a difference.