Help on extension licensing code

Hi, I posted ad extension in warehouse with license, now it is active and it is possible to download it but, after installation someting is wrong with licensing.

Sketchup pops me up the message with the “not licensed” error message.

this is the main code of the plugin where I call the “Sketchup::License” (I only replaced the relevant names of directory, files and module):

##
## Main file "myplugin.rb" located in Sketchup plugins directory
##
require 'sketchup'
require 'extensions'
require 'langhandler'
require 'json'
require 'uri'
require 'date'

module Myplugin
  unless file_loaded?(__FILE__)
    PLUGINPATH = File.expand_path( File.dirname(__FILE__) ).to_s + "/myplugin/"
    Sketchup::require File.join(PLUGINPATH, 'plugin_config') ## Sets only CONSTANTS for my Module
    def self.load_extension
      myextension = SketchupExtension.new APPLICATION_TITLE.to_s, "myplugin/myplugin_loader"
      myextension.version = VERSION.to_s
      myextension.copyright = APPLICATION_COPYRIGHT.to_s
      myextension.creator = APPLICATION_CREATOR.to_s
      myextension.description = APPLICATION_DESCRIPTION.to_s
      Sketchup.register_extension myextension, true
    end
    load_extension
    file_loaded(__FILE__)
  end
end#module
##
##-----------------------------------------------------------
##
## Loader file "myplugin_loader.rb" located in "Sketchup plugins directory"/myplugin
module Myplugin
  if (Sketchup::Licensing.get_extension_license('the id obtained from extension warehouse')).licensed?
    ..... do something
  else
    .... do something else
  end
end#module

Is this correct?
I verified that the extension ID is correct and the plugin is in trial mode in “my extensions” on warehouse!
Someone could Help me?

tnk’s

Please edit your post and put your code inside a code block [</>] - otherwise things like __FILE__ become FILE

You also seem to be using Constants without defining them ?
VERSION
APPLICATION_* etc
Have you just omitted those for our version ?

How are you passing the license code ?
As a string inside " " ?
http://www.sketchup.com/intl/en/developer/docs/ourdoc/licensing
www.sketchup.com/intl/en/developer/docs/ourdoc/licensing

my costants are defined in:

 Sketchup::require File.join(PLUGINPATH, 'plugin_config') 

that i load on first rows of myplugin.rb before registering and call licence

Yes a string like this: “nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn” insede double quote "

OK I found the problem!!!

When you download a plugin logged as the Owner something does not works and you will have a “not licensed” message. Instead if you create a different login in google and you download the plugin every thing is ok

hmm… that sounds strange. @ChrisFullmer - heard of this before?