A and B are required to determine direction of rotation. If A is logic high when B goes high, it is going one direction. When A is logic low when B goes high, it is going the other direction. You need both connected. To troubleshoot, you could swap the A and B wires where they connect to the board. If its still clockwise only, your software or board probably has an issue. If it will only go CCW, then the encoder probably has a problem.