Refactor and add test to Spree::Payment#set_unique_identifier.

A small refactor on `Spree::Payment#set_unique_identifier`. Also added some tests for that method.