Modified to accept offline payments