Added method to cancel a transaction