update order state if payment successful, cancelled or a failure has occurred.