add activation in license

This commit is contained in:
Yan
2017-11-15 19:10:56 +06:30
parent c2095b4a61
commit b1f98df4e0
3 changed files with 48 additions and 13 deletions

View File

@@ -10,11 +10,14 @@ class InstallController < BaseController
db_user = params[:db_user]
db_password = params[:db_password]
# Export for Key
aes = MyAesCrypt.new
aes_key, aes_iv = aes.export_key(lookup)
@license = License.new(ENV["SX_PROVISION_URL"])
@license.license_activate(aes_key, aes_iv, license_key)
end
def lookup_domain
if request.subdomain.present? && request.subdomain != "www"
@license = current_license(ENV["SX_PROVISION_URL"], request.subdomain.downcase)