The same as him is short for 'Please give me the same as him'. So it's OK.
The same as he is short for 'I'll have the same as he has'. So it's OK too, but it sounds old-fashioned and fastidious, like "If only I were as handsome as he!"
The same as he ordered and The same as what he ordered both sound awkward to me, though "I'd like what he ordered" sounds a bit better.
But... pointing at each other, and even referring to each other as 'he/him' or 'she/her', might be considered impolite. "I'd like the same as my friend" would be better. And better still would be "I would also like the (pizza ai) quattro formaggi (please/per favore)."
Maybe I'm over-sensitive. As a child, if I ever referred to my aunt in her presence as "she", there would be shrieks of "Who's 'she' - the cat's mother?!"
Among friends and in an informal setting I'd do as Chspsa in the US suggests and say, "The same as him."