def security_token(gateway_options)
      t = Time.now
      hash = Hash.new
      hash["Seed"] = "#{t.year}#{t.month}#{t.day}#{t.hour}#{rand(1000)}"
      hash["Type"] = 'sha1'

      prehash = "#{@source_key}#{hash["Seed"]}#{@pin.to_s.strip}"
      hash["HashValue"] = Digest::SHA1.hexdigest(prehash).to_s

      token = Hash.new
      token["ClientIP"] = gateway_options[:ip]
      token["PinHash"] = hash
      token["SourceKey"] = @source_key
      token
    end
def security_token(gateway_options)
      t = Time.now
      hash = Hash.new
      hash["Seed"] = "#{t.year}#{t.month}#{t.day}#{t.hour}#{rand(1000)}"
      hash["Type"] = 'sha1'

      prehash = "#{@source_key}#{hash["Seed"]}#{@pin.to_s.strip}"
      hash["HashValue"] = Digest::SHA1.hexdigest(prehash).to_s

      token = Hash.new
      token["ClientIP"] = gateway_options[:ip]
      token["PinHash"] = hash
      token["SourceKey"] = @source_key
      token
    end
http://wiki.usaepay.com/developer/soap-1.4/objects/uesecuritytoken