public function getTrackingKey()
 {
     $trackingKey = new WPAM_Tracking_TrackingKey();
     $trackingKey->setAffiliateRefKey($this->affiliate->uniqueRefKey);
     $trackingKey->setCreativeId($this->creative->creativeId);
     return $trackingKey;
 }
function to_token($uniqueRefKey)
{
    $binConverter = new WPAM_Util_BinConverter();
    $binRefKey = $binConverter->stringToBin($uniqueRefKey);
    $creative_id = 1;
    $reserved = 0;
    $revRefKey = new WPAM_Tracking_TrackingKey();
    $revRefKey->setAffiliateRefKey($binRefKey);
    $revRefKey->setCreativeId($creative_id);
    $revRefKey->setReserved($reserved);
    $token = $revRefKey->pack();
    var_dump($token);
    return $token;
}