Replace payment pre_state_change event
Merge pull request #1447 from winzou/state-machine

[State machine] Improve things drastically