Yeah logic has a learn midi option but doesn't work with the play pause etc functions for whatever reason.
Don't go for the midi learn function, go into the key commands menu to set up your transport controls. There will be a midi learn button in this menu for you to get stuff done easily so you don't have to fuss with those confusing midi numbers. The menu is worth taking a look at regardless, you might learn a few useful shortcuts (by far the most useful I've come across is pressing the ESC key in the sequencer/piano roll views.)