you can try it in the court. you have nothing more to lose. If you lose the case, you pay the ticket, that's it. You just waste your time, and get the bad feeling of losing a battle. But it would be a good experience to have.
the cop is likely to testify that you admitted you did not stop at the scene. he might genuinely thinks so, as you might have said things like "I may not have stoppped for long enough..." but he just took the first half.
Like I said, as a witness, if the thing you can offer in the court is just "I did stop", you will most likely lose the case. But you have a good chance here since the cop said "if you are nicer to me, I would not give you the ticket." Telling this in the court may help alot.
Do you how you possibly offended the cop so he stopped/ticketed you? If there is no such reason, and you genuinely came to a complete halt, the cop shouldn't stop you.