When you get to the writing portion, you don't have a new card. You have already detected the new card and read it so you are already authenticated with it. Just do the write. Look at the examples that came with the library.
When you get to the writing portion, you don't have a new card. You have already detected the new card and read it so you are already authenticated with it. Just do the write. Look at the examples that came with the library.