Responding to a broken laser beam?
Without a data sheet or the device on hand not sure what the middle pin is used for.  On the topic of detecting a broken beam the item you purchased is purely an emitter, in order to detect the beam being broken there are two main ways, using a photodetector on the "opposite end" of the beam but this means having wires trailing the same path as the laser beam, alternatively you could mount a mirror where the beam lands and reflect it back to a photodetector mounted close to the laser diode.  You would them use the arduino to detect the state of the photodetector.