What I posted is fine - as Robin said if you swap A+ and A-, OR B+ and B- the motor will just spin the other way... i.e. if you change the current direction in either phase.