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