Change payment state machine to rely on the last successful state rather than the last payment state.

The intent is to reduce the matrix of linkStateMachine transitions that would have to be coded to support all cases.
Also, from a semantix point of view, a failed state should not have any impact on what is available next so this makes sense.