Add basic domain creating via EPP

This commit is contained in:
Martin Lensment 2014-06-25 18:12:00 +03:00
parent 8c1ea03f95
commit aa88c30565
4 changed files with 34 additions and 1 deletions

View file

@ -0,0 +1,18 @@
module Epp::DomainsHelper
def create_domain
domain = Domain.create!(domain_params)
render '/epp/domains/create'
end
def domain_params
cp = command_params
{
name: cp[:name],
registrar: nil, #well come from current_epp_user
registered_at: Time.now,
valid_from: Date.today,
valid_to: Date.today + cp[:period].to_i.years,
auth_info: cp[:authInfo]
}
end
end