From 744e1d7301028ef8dff5a999722a046044d47416 Mon Sep 17 00:00:00 2001 From: Scott Claeys Date: Tue, 23 Apr 2024 06:22:32 -0500 Subject: [PATCH] Updates Updating Module --- RadWebHosting/Calls/DeleteNameServer.php | 15 - RadWebHosting/Calls/GetContactDetails.php | 15 - RadWebHosting/Calls/GetDns.php | 15 - RadWebHosting/Calls/GetEmailForwarding.php | 15 - RadWebHosting/Calls/GetNameServers.php | 15 - RadWebHosting/Calls/GetRegistrarLock.php | 15 - RadWebHosting/Calls/ModifyNameServer.php | 15 - RadWebHosting/Calls/RegisterDomain.php | 15 - RadWebHosting/Calls/RegisterNameServer.php | 15 - RadWebHosting/Calls/ReleaseDomain.php | 15 - RadWebHosting/Calls/RequestDelete.php | 15 - RadWebHosting/Calls/SaveDns.php | 15 - RadWebHosting/Calls/Sync.php | 15 - RadWebHosting/Calls/TransferSync.php | 15 - .../RadWebHosting/Calls/CheckAvailability.php | 15 - .../RadWebHosting/Calls/GetEppCode.php | 15 - .../RadWebHosting/Calls/RenewDomain.php | 15 - .../Calls/SaveContactDetails.php | 15 - .../Calls/SaveEmailForwarding.php | 15 - .../RadWebHosting/Calls/SaveNameServers.php | 15 - .../RadWebHosting/Calls/SaveRegistrarLock.php | 15 - .../RadWebHosting/Calls/ToggleIdProtect.php | 15 - .../RadWebHosting/Calls/TransferDomain.php | 15 - .../registrars/RadWebHosting/Core/Call.php | 164 ---- .../RadWebHosting/Core/Configuration.php | 83 -- .../registrars/RadWebHosting/Core/Loader.php | 37 - .../Helpers/ResultsListFactory.php | 35 - .../RadWebHosting/RadWebHosting.php | 734 ------------------ .../registrars/RadWebHosting/whmcs.json | 12 - RadWebHosting/whmcs.json | 29 - .../RadWebPro}/Calls/CheckAvailability.php | 4 +- .../RadWebPro}/Calls/DeleteNameServer.php | 4 +- .../RadWebPro}/Calls/GetContactDetails.php | 4 +- .../registrars/RadWebPro}/Calls/GetDns.php | 4 +- .../RadWebPro/Calls/GetDomainInformation.php | 12 + .../RadWebPro/Calls/GetDomainSuggestions.php | 17 + .../RadWebPro}/Calls/GetEmailForwarding.php | 4 +- .../RadWebPro}/Calls/GetEppCode.php | 4 +- .../RadWebPro}/Calls/GetNameServers.php | 4 +- .../RadWebPro}/Calls/GetRegistrarLock.php | 4 +- .../RadWebPro/Calls/GetTldPricing.php | 12 + .../RadWebPro}/Calls/ModifyNameServer.php | 4 +- .../RadWebPro}/Calls/RegisterDomain.php | 4 +- .../RadWebPro}/Calls/RegisterNameServer.php | 4 +- .../RadWebPro}/Calls/ReleaseDomain.php | 4 +- .../RadWebPro}/Calls/RenewDomain.php | 4 +- .../RadWebPro}/Calls/RequestDelete.php | 4 +- .../RadWebPro}/Calls/SaveContactDetails.php | 4 +- .../registrars/RadWebPro}/Calls/SaveDns.php | 4 +- .../RadWebPro}/Calls/SaveEmailForwarding.php | 4 +- .../RadWebPro}/Calls/SaveNameServers.php | 4 +- .../RadWebPro}/Calls/SaveRegistrarLock.php | 4 +- .../registrars/RadWebPro}/Calls/Sync.php | 4 +- .../RadWebPro}/Calls/ToggleIdProtect.php | 4 +- .../RadWebPro}/Calls/TransferDomain.php | 4 +- .../RadWebPro}/Calls/TransferSync.php | 4 +- .../registrars/RadWebPro}/Core/Call.php | 2 +- .../RadWebPro}/Core/Configuration.php | 2 +- .../registrars/RadWebPro}/Core/Loader.php | 4 +- .../RadWebPro}/Helpers/ResultsListFactory.php | 4 +- .../registrars/RadWebPro/RadWebPro.php | 262 +++++-- .../modules/registrars/RadWebPro}/logo.png | Bin .../modules/registrars/RadWebPro/whmcs.json | 33 + 63 files changed, 313 insertions(+), 1566 deletions(-) delete mode 100644 RadWebHosting/Calls/DeleteNameServer.php delete mode 100644 RadWebHosting/Calls/GetContactDetails.php delete mode 100644 RadWebHosting/Calls/GetDns.php delete mode 100644 RadWebHosting/Calls/GetEmailForwarding.php delete mode 100644 RadWebHosting/Calls/GetNameServers.php delete mode 100644 RadWebHosting/Calls/GetRegistrarLock.php delete mode 100644 RadWebHosting/Calls/ModifyNameServer.php delete mode 100644 RadWebHosting/Calls/RegisterDomain.php delete mode 100644 RadWebHosting/Calls/RegisterNameServer.php delete mode 100644 RadWebHosting/Calls/ReleaseDomain.php delete mode 100644 RadWebHosting/Calls/RequestDelete.php delete mode 100644 RadWebHosting/Calls/SaveDns.php delete mode 100644 RadWebHosting/Calls/Sync.php delete mode 100644 RadWebHosting/Calls/TransferSync.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Calls/CheckAvailability.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Calls/GetEppCode.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Calls/RenewDomain.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Calls/SaveContactDetails.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Calls/SaveEmailForwarding.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Calls/SaveNameServers.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Calls/SaveRegistrarLock.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Calls/ToggleIdProtect.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Calls/TransferDomain.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Core/Call.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Core/Configuration.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Core/Loader.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/Helpers/ResultsListFactory.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/RadWebHosting.php delete mode 100644 RadWebHosting/modules/registrars/RadWebHosting/whmcs.json delete mode 100644 RadWebHosting/whmcs.json rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/CheckAvailability.php (57%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/DeleteNameServer.php (60%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/GetContactDetails.php (58%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/GetDns.php (55%) create mode 100644 RadWebPro/modules/registrars/RadWebPro/Calls/GetDomainInformation.php create mode 100644 RadWebPro/modules/registrars/RadWebPro/Calls/GetDomainSuggestions.php rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/GetEmailForwarding.php (58%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/GetEppCode.php (57%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/GetNameServers.php (58%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/GetRegistrarLock.php (57%) create mode 100644 RadWebPro/modules/registrars/RadWebPro/Calls/GetTldPricing.php rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/ModifyNameServer.php (59%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/RegisterDomain.php (62%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/RegisterNameServer.php (60%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/ReleaseDomain.php (58%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/RenewDomain.php (56%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/RequestDelete.php (57%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/SaveContactDetails.php (58%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/SaveDns.php (56%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/SaveEmailForwarding.php (58%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/SaveNameServers.php (58%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/SaveRegistrarLock.php (58%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/Sync.php (56%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/ToggleIdProtect.php (58%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/TransferDomain.php (62%) rename {RadWebHosting/modules/registrars/RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Calls/TransferSync.php (58%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Core/Call.php (98%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Core/Configuration.php (96%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Core/Loader.php (85%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/Helpers/ResultsListFactory.php (90%) rename RadWebHosting/RadWebHosting.php => RadWebPro/modules/registrars/RadWebPro/RadWebPro.php (69%) rename {RadWebHosting => RadWebPro/modules/registrars/RadWebPro}/logo.png (100%) create mode 100644 RadWebPro/modules/registrars/RadWebPro/whmcs.json diff --git a/RadWebHosting/Calls/DeleteNameServer.php b/RadWebHosting/Calls/DeleteNameServer.php deleted file mode 100644 index 567c9e6..0000000 --- a/RadWebHosting/Calls/DeleteNameServer.php +++ /dev/null @@ -1,15 +0,0 @@ - - */ -class RegisterDomain extends Call -{ - public $action = "order/domains/register"; - - public $type = parent::TYPE_POST; -} diff --git a/RadWebHosting/Calls/RegisterNameServer.php b/RadWebHosting/Calls/RegisterNameServer.php deleted file mode 100644 index 29d9896..0000000 --- a/RadWebHosting/Calls/RegisterNameServer.php +++ /dev/null @@ -1,15 +0,0 @@ - - */ -class TransferDomain extends Call -{ - public $action = "order/domains/transfer"; - - public $type = parent::TYPE_POST; -} \ No newline at end of file diff --git a/RadWebHosting/modules/registrars/RadWebHosting/Core/Call.php b/RadWebHosting/modules/registrars/RadWebHosting/Core/Call.php deleted file mode 100644 index 74be2b0..0000000 --- a/RadWebHosting/modules/registrars/RadWebHosting/Core/Call.php +++ /dev/null @@ -1,164 +0,0 @@ - - */ -abstract class Call -{ - const TYPE_GET = "GET"; - - const TYPE_POST = "POST"; - - const TYPE_PUT = "PUT"; - - const TYPE_DELETE = "DELETE"; - - /** - * Action path - * - * @var string - */ - public $action; - - /** - * Request type - * - * @var string - */ - public $type; - - /** - * Configuration - * - * @var Configuration - */ - public $config; - - /** - * params to send trough API - * - * @var mixed - */ - public $params; - - /** - * AbstractCall constructor - * - * @param Configuration $config - * @param $params - */ - public function __construct(Configuration $config, $params = []) - { - $this->config = $config; - $this->params = $params; - } - - /** - * Make request to API - * - * @return array|bool|mixed|\stdClass|string - */ - public function process() - { - try - { - $this->setVariablesInActionString(); - $url = "{$this->config->ApiEndpoint}/{$this->action}"; - - $client = new Client(); - if($this->isWhmcsVersionHigherOrEqual('8.0.0')) - { - $params = $this->type === self::TYPE_POST ? $this->params : []; - $request = $client->request($this->type, $url, ["headers" => $this->config->getAuthHeaders(), "form_params" => $params]); - $output = $request->getBody()->getContents(); - } else - { - $request = $client->createRequest($this->type, $url, ["headers" => $this->config->getAuthHeaders(), $this->getParamKeyName() => $this->params]); - $output = $client->send($request)->getBody()->getContents(); - } - } - catch (\GuzzleHttp\Exception\ClientException $ex) - { - $response = $ex->getResponse(); - $output = $response->getBody()->getContents(); - } - catch (\GuzzleHttp\Exception\ServerException $ex) - { - $response = $ex->getResponse(); - $output = $response->getBody()->getContents(); - } - catch (\Exception $ex) - { - $output = $ex->getMessage(); - } - - $result = json_decode($output, true); - if($result === null && is_string($output)) - { - $result = ["error" => $output]; - } - - return $result; - } - - /** - * Put variables from params to action string if possible - */ - protected function setVariablesInActionString() - { - //Check if params needs to be filled - if(strpos($this->action, ":") !== false) - { - //Get params names - $pos = 0; - $names = []; - while(($pos = strpos($this->action, ":", $pos)) !== false) - { - $pos++; - - $slash = strpos($this->action, "/", $pos); - $names[] = substr($this->action, $pos, $slash - $pos); - } - - foreach($names as $name) - { - $this->action = str_replace(":{$name}", $this->params[$name], $this->action); - } - } - } - - /** - * Get correct param name depending on the request type - * - * @return string - */ - protected function getParamKeyName() - { - $result = "query"; - if($this->type == self::TYPE_POST) - { - $result = "body"; - } - - return $result; - } - - private function isWhmcsVersionHigherOrEqual($toCompare) - { - if (isset($GLOBALS['CONFIG']['Version'])) - { - $version = explode('-', $GLOBALS['CONFIG']['Version']); - return (version_compare($version[0], $toCompare, '>=')); - } - - global $whmcs; - - return (version_compare($whmcs->getVersion()->getRelease(), $toCompare, '>=')); - } -} \ No newline at end of file diff --git a/RadWebHosting/modules/registrars/RadWebHosting/Core/Configuration.php b/RadWebHosting/modules/registrars/RadWebHosting/Core/Configuration.php deleted file mode 100644 index 486ae15..0000000 --- a/RadWebHosting/modules/registrars/RadWebHosting/Core/Configuration.php +++ /dev/null @@ -1,83 +0,0 @@ - - */ -class Configuration -{ - const FIELD_USERNAME = "Username"; - const FIELD_API_KEY = "ApiKey"; - const FIELD_API_ENDPOINT = "ApiEndpoint"; - - /** - * @var mixed - */ - protected $configuration; - - /** - * Get configuration values and create params - * - * @param $params - */ - public static function create($params) - { - //Get configuration fields from params - $config = [self::FIELD_USERNAME, self::FIELD_API_KEY, self::FIELD_API_ENDPOINT]; - foreach($config as $name) - { - $result[$name] = $params[$name]; - } - - return new Configuration($result); - } - - /** - * Create Configuration - * - * @param $params - * @throws \Exception - */ - public function __construct($params) - { - //Check if registrar is enabled in WHMCS configuration - if($params[self::FIELD_API_ENDPOINT] === null) - { - throw new \Exception("Domain registrar is deactivated in WHMCS configuration"); - } - - $this->configuration = $params; - } - - /** - * Get values from configuration array - * - * @param $name - * @return mixed - */ - public function __get($name) - { - return $this->configuration[$name]; - } - - /** - * Create authorization headers - * - * @return array - */ - public function getAuthHeaders() - { - $timestamp = time(); - $time = gmdate("y-m-d H", $timestamp); - $token = base64_encode(hash_hmac("sha256", $this->ApiKey, "{$this->Username}:$time")); - - return - [ - "username" => $this->Username, - "token" => $token, - "timestamp" => $timestamp, - ]; - } -} \ No newline at end of file diff --git a/RadWebHosting/modules/registrars/RadWebHosting/Core/Loader.php b/RadWebHosting/modules/registrars/RadWebHosting/Core/Loader.php deleted file mode 100644 index 51dbc8b..0000000 --- a/RadWebHosting/modules/registrars/RadWebHosting/Core/Loader.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class Loader -{ - private $rootdir; - - public function __construct($dir) - { - $this->rootdir = $dir; - $this->register(); - } - - protected function register() - { - spl_autoload_register(function($className) - { - $namespace = str_replace("\\Core","", __NAMESPACE__); - if (strpos($className, $namespace) === 0) - { - $className = str_replace("\\", DIRECTORY_SEPARATOR, $className); - $file = str_replace("ModulesGarden".DIRECTORY_SEPARATOR."DomainsReseller".DIRECTORY_SEPARATOR."Registrar".DIRECTORY_SEPARATOR."RadWebHosting", $this->rootdir, $className) . '.php'; - - if (file_exists($file)) - { - require_once $file; - } - } - }); - } -} diff --git a/RadWebHosting/modules/registrars/RadWebHosting/Helpers/ResultsListFactory.php b/RadWebHosting/modules/registrars/RadWebHosting/Helpers/ResultsListFactory.php deleted file mode 100644 index 8039294..0000000 --- a/RadWebHosting/modules/registrars/RadWebHosting/Helpers/ResultsListFactory.php +++ /dev/null @@ -1,35 +0,0 @@ -setStatus($domainResult["status"]); - if(!empty($domainResult["premiumCostPricing"])) - { - $searchResult->setPremiumCostPricing($domainResult["premiumCostPricing"]); - } - $resultList->append($searchResult); - } - return $resultList; - } - -} diff --git a/RadWebHosting/modules/registrars/RadWebHosting/RadWebHosting.php b/RadWebHosting/modules/registrars/RadWebHosting/RadWebHosting.php deleted file mode 100644 index f10998a..0000000 --- a/RadWebHosting/modules/registrars/RadWebHosting/RadWebHosting.php +++ /dev/null @@ -1,734 +0,0 @@ - [ - "Type" => "System", - "Value" => "RadWebHosting" - ], - "Description" => [ - "Type" => "System", - "Value" => "Don't have a Rad Web Hosting Account yet? Get one here: https://radwebhosting.com/domains-reseller " - ], - "Username" => [ - "FriendlyName" => "API Username", - "Type" => "text", - "Size" => "40", - "Description" => "Enter your email used in the main WHMCS" - ], - "ApiKey" => [ - "FriendlyName" => "API Key", - "Type" => "text", - "Size" => "40", - "Description" => "Enter your API key received from provider" - ], - "ApiEndpoint" => [ - "FriendlyName" => "API Endpoint", - "Type" => "text", - "Size" => "40", - "Description" => "Enter API endpoint", - "Default" => "https://radwebhosting.com/client_area/modules/addons/DomainsReseller/api/index.php" - ], - ]; - - return $configarray; -} - -/** - * Register Domain - * - * @param array $params - * @return array $return - */ -function RadWebHosting_RegisterDomain($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - "regperiod" => (int)$params["regperiod"], - "domainfields" => base64_encode(serialize($params["additionalfields"])), - "addons" => - [ - "dnsmanagement" => $params['dnsmanagement'] ? 1 : 0, - "emailforwarding" => $params['emailforwarding'] ? 1 : 0, - "idprotection" => $params['idprotection'] ? 1 : 0, - ], - "nameservers" => - [ - $params["ns1"], - $params["ns2"], - $params["ns3"], - $params["ns4"], - $params["ns5"], - ], - "contacts" => - [ - "registrant" => - [ - 'firstname' => $params["firstname"], - 'lastname' => $params["lastname"], - 'companyname' => $params["companyname"], - 'email' => $params["email"], - 'address1' => $params["address1"], - 'address2' => $params["address2"], - 'city' => $params["city"], - 'state' => $params["state"], - 'postcode' => $params["postcode"], - 'country' => $params["country"], - 'phonenumber' => $params["phonenumber"], - 'tax_id' => $params['tax_id'] - ], - ] - ]; - try - { - $call = new Calls\RegisterDomain(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Transfer Domain - * - * @param array $params - * @return array $return - */ -function RadWebHosting_TransferDomain($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - "regperiod" => (int)$params["regperiod"], - "eppcode" => $params["eppcode"], - 'domainfields' => base64_encode(serialize($params["additionalfields"])), - "addons" => - [ - "dnsmanagement" => $params['dnsmanagement'] ? 1 : 0, - "emailforwarding" => $params['emailforwarding'] ? 1 : 0, - "idprotection" => $params['idprotection'] ? 1 : 0, - ], - "nameservers" => - [ - $params["ns1"], - $params["ns2"], - $params["ns3"], - $params["ns4"], - $params["ns5"], - ], - "contacts" => - [ - "registrant" => - [ - 'firstname' => $params["firstname"], - 'lastname' => $params["lastname"], - 'companyname' => $params["companyname"], - 'email' => $params["email"], - 'address1' => $params["address1"], - 'address2' => $params["address2"], - 'city' => $params["city"], - 'state' => $params["state"], - 'postcode' => $params["postcode"], - 'country' => $params["country"], - 'phonenumber' => $params["phonenumber"], - 'tax_id' => $params['tax_id'] - ], - ] - ]; - - try - { - $call = new Calls\TransferDomain(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Renew Domain - * - * @param array $params - * @return array $return - */ -function RadWebHosting_RenewDomain($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - "regperiod" => (int)$params["regperiod"], - "addons" => - [ - "dnsmanagement" => $params['dnsmanagement'] ? 1 : 0, - "emailforwarding" => $params['emailforwarding'] ? 1 : 0, - "idprotection" => $params['idprotection'] ? 1 : 0, - ], - ]; - - try - { - $call = new Calls\RenewDomain(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Get name servers - * - * @param array $params - * @return array $return - */ -function RadWebHosting_GetNameservers($params) -{ - $postfields = - [ - "domain" => $params["domainname"] - ]; - - try - { - $call = new Calls\GetNameServers(Configuration::create($params), $postfields); - - $result = $call->process(); - unset($result['success']); - unset($result['message']); - - return $result; - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Save nameservers - * - * @param array $params - * @return array $return - */ -function RadWebHosting_SaveNameservers($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - - "ns1" => $params["ns1"], - "ns2" => $params["ns2"], - "ns3" => $params["ns3"], - "ns4" => $params["ns4"], - "ns5" => $params["ns5"], - ]; - - try - { - $call = new Calls\SaveNameServers(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Release Domain - * - * @param array $params - * @return array $return - */ -function RadWebHosting_ReleaseDomain($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - "transfertag" => $params["transfertag"] - ]; - - try - { - $call = new Calls\ReleaseDomain(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Get EPP Code - * - * @param array $params - * @return array $return - */ -function RadWebHosting_GetEPPCode($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - ]; - - try - { - $call = new Calls\GetEppCode(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Get Contact Details - * - * @param array $params - * @return array $return - */ -function RadWebHosting_GetContactDetails($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - ]; - try - { - $call = new Calls\GetContactDetails(Configuration::create($params), $postfields); - $result = $call->process(); - $new = []; - foreach ($result as $key => $value) - { - $new[$key] = []; - foreach ($value as $detail => $info) - { - $new[$key][str_replace('_', ' ', $detail)] = $info; - } - } - return $new; - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Save Contact Details - * - * @param array $params - * @return array $return - */ -function RadWebHosting_SaveContactDetails($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - "contactdetails" => $params["contactdetails"] - ]; - - try - { - $call = new Calls\SaveContactDetails(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Get Lock Status - * - * @param array $params - * @return array $return - */ -function RadWebHosting_GetRegistrarLock($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - ]; - - try - { - $call = new Calls\GetRegistrarLock(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Update Lock Status - * - * @param array $params - * @return array $return - */ -function RadWebHosting_SaveRegistrarLock($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - "lockstatus" => $params["lockenabled"] - ]; - - try - { - $call = new Calls\SaveRegistrarLock(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Get DNS Records - * - * @param array $params - * @return array $return - */ -function RadWebHosting_GetDNS($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - ]; - - try - { - $call = new Calls\GetDns(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Save DNS Records - * - * @param array $params - * @return array $return - */ -function RadWebHosting_SaveDNS($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - "dnsrecords" => $params["dnsrecords"] - ]; - - try - { - $call = new Calls\SaveDns(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Register Name Server - * - * @param array $params - * @return array $return - */ -function RadWebHosting_RegisterNameserver($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - - "nameserver" => $params["nameserver"], - "ipaddress" => $params["ipaddress"], - ]; - - try - { - $call = new Calls\RegisterNameServer(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Update Name Server - * - * @param array $params - * @return array $return - */ -function RadWebHosting_ModifyNameserver($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - - "nameserver" => $params["nameserver"], - "currentipaddress" => $params["currentipaddress"], - "newipaddress" => $params["newipaddress"], - ]; - - try - { - $call = new Calls\ModifyNameServer(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Delete Name Server - * - * @param array $params - * @return array $return - */ -function RadWebHosting_DeleteNameserver($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - "nameserver" => $params["nameserver"], - ]; - - try - { - $call = new Calls\DeleteNameServer(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Delete Domain - * - * @param array $params - * @return array $return - */ -function RadWebHosting_RequestDelete($params) -{ - $postfields = - [ - "domain" => $params["domainname"] - ]; - - try - { - $call = new Calls\RequestDelete(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Synchronize transfer domain - * - * @param array $params - * @return array $return - */ -function RadWebHosting_TransferSync($params) -{ - $postfields = - [ - "domain" => "{$params["sld"]}.{$params["tld"]}" - ]; - - try - { - $call = new Calls\TransferSync(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Synchronize Registered Domains - * - * @param array $params - * @return array $return - */ -function RadWebHosting_Sync($params) -{ - $postfields = - [ - "domain" => "{$params["sld"]}.{$params["tld"]}" - ]; - - try - { - $call = new Calls\Sync(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Get list of emails aliases - * - * @param array $params - * @return array $return - */ -function RadWebHosting_GetEmailForwarding($params) -{ - $postfields = - [ - "domain" => $params["domainname"] - ]; - - try - { - $call = new Calls\GetEmailForwarding(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * Save list of emails aliases - * - * @param array $params - * @return array $return - */ -function RadWebHosting_SaveEmailForwarding($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - "prefix" => $params["prefix"], - "forwardto" => $params["forwardto"] - ]; - - try - { - $call = new Calls\SaveEmailForwarding(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * This function is called when the ID Protection setting is toggled on or off - * - * @param array $params - * @return array $return - */ -function RadWebHosting_IDProtectionToggle($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - "status" => $params["protectenable"] - ]; - - try - { - $call = new Calls\ToggleIdProtect(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} - -/** - * This function is called when the ID Protection setting is toggled on or off - * - * @param $params - * @return array - */ -function RadWebHosting_IDProtectToggle($params) -{ - return RadWebHosting_IDProtectionToggle($params); -} - - -/** - * Send domain lookup request - * - * @param $params - * @return array|bool|mixed|stdClass|string - */ -function RadWebHosting_CheckAvailability($params) -{ - $postfields = - [ - "searchTerm" => $params["searchTerm"], - "punyCodeSearchTerm" => $params["punyCodeSearchTerm"], - "tldsToInclude" => $params["tldsToInclude"], - "isIdnDomain" => $params['isIdnDomain'], - "premiumEnabled" => $params['premiumEnabled'], - "isWhmcs" => 1 - ]; - - try - { - $call = new Calls\CheckAvailability(Configuration::create($params), $postfields); - $result = $call->process(); - return ResultsListFactory::createResultsList($result); - } - catch (\Exception $e) - { - \logModuleCall( - 'RadWebHosting', - 'DomainLookup', - $postfields, - ['error' => $e->getMessage()] - ); - return ResultsListFactory::createResultsList([]); } -} diff --git a/RadWebHosting/modules/registrars/RadWebHosting/whmcs.json b/RadWebHosting/modules/registrars/RadWebHosting/whmcs.json deleted file mode 100644 index a62b1e0..0000000 --- a/RadWebHosting/modules/registrars/RadWebHosting/whmcs.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "schema": "1.0", - "type": "whmcs-addons", - "name": "RadWebHosting", - "license": "proprietary", - "category": "domains", - "description": { - "name": "RadWebHosting", - "tagline": "", - "long": "Don't have a Rad Web Hosting Account yet? Get one here: https://radwebhosting.com/domains-reseller " - } -} diff --git a/RadWebHosting/whmcs.json b/RadWebHosting/whmcs.json deleted file mode 100644 index 260d5eb..0000000 --- a/RadWebHosting/whmcs.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "schema": "1.0", - "type": "whmcs-addons", - "name": "RadWebHosting", - "license": "proprietary", - "category": "domains", - "description": { - "name": "RadWebHosting", - "tagline": "Industry-leading domain registrar with over 500+ TLDs available.", - "long": "Rad Web Hosting powers the world\u2019s largest cloud platform. With thousands of websites hosted and thousands of domain names under management, Rad Web Hosting is the registrar of choice for more WHMCS resellers.\n\nNow with the Rad Web Hosting module for WHMCS, you can resell domains using the Rad Web Hosting domain reseller platform. To get started, download the module from the WHMCS Marketplace using the link to the right.\n\nSignup for a Rad Web Hosting account @ [https:\/\/radwebhosting.com\/domain-reseller](https:\/\/radwebhosting.com\/domain-reseller)\n\n## Reasons to Choose Rad Web Hosting\n* Trusted partner and champion of our customers.\n* Large, high growth business with attractive unit economics.\n* Industry-leading products built on a single cloud platform & distinctive customer care.\n* Proven growth strategy with team purpose built to execute.\n* Market Leading Wholesale Domain Pricing." - }, - "marketplace": { - "url": "https:\/\/marketplace.whmcs.com\/product\/3983" - }, - "logo": { - "filename": "logo.png" - }, - "support": { - "homepage": "https:\/\/radwebhosting.com\/", - "learn_more": "https:\/\/github.com\/Rad-Web-Hosting", - "docs_url": "https:\/\/docs.radwebhosting.com\/domains-reseller" - }, - "authors": [ - { - "name": "Rad Web Hosting", - "homepage": "https:\/\/radwebhosting.com\/" - } - ] -} \ No newline at end of file diff --git a/RadWebHosting/Calls/CheckAvailability.php b/RadWebPro/modules/registrars/RadWebPro/Calls/CheckAvailability.php similarity index 57% rename from RadWebHosting/Calls/CheckAvailability.php rename to RadWebPro/modules/registrars/RadWebPro/Calls/CheckAvailability.php index 1e6e53e..67ed3e9 100644 --- a/RadWebHosting/Calls/CheckAvailability.php +++ b/RadWebPro/modules/registrars/RadWebPro/Calls/CheckAvailability.php @@ -1,6 +1,6 @@ rootdir, $className) . '.php'; + $file = str_replace("ModulesGarden".DIRECTORY_SEPARATOR."DomainsReseller".DIRECTORY_SEPARATOR."Registrar".DIRECTORY_SEPARATOR."RadWebPro", $this->rootdir, $className) . '.php'; if (file_exists($file)) { diff --git a/RadWebHosting/Helpers/ResultsListFactory.php b/RadWebPro/modules/registrars/RadWebPro/Helpers/ResultsListFactory.php similarity index 90% rename from RadWebHosting/Helpers/ResultsListFactory.php rename to RadWebPro/modules/registrars/RadWebPro/Helpers/ResultsListFactory.php index 8039294..2e4949d 100644 --- a/RadWebHosting/Helpers/ResultsListFactory.php +++ b/RadWebPro/modules/registrars/RadWebPro/Helpers/ResultsListFactory.php @@ -1,5 +1,5 @@ [ "Type" => "System", - "Value" => "RadWebHosting" + "Value" => "RadWebPro" ], "Description" => [ "Type" => "System", - "Value" => "Rad Web Hosting's official maintained white-label Registrar Module." + "Value" => "Offer domain registration, transfer, and renewal services for over 500 TLDs including the ngTLDs as well as ccTLDs from around the globe." ], "Username" => [ "FriendlyName" => "API Username", @@ -54,7 +58,7 @@ function RadWebHosting_getConfigArray() * @param array $params * @return array $return */ -function RadWebHosting_RegisterDomain($params) +function RadWebPro_RegisterDomain($params) { $postfields = [ @@ -69,11 +73,11 @@ function RadWebHosting_RegisterDomain($params) ], "nameservers" => [ - $params["ns1"], - $params["ns2"], - $params["ns3"], - $params["ns4"], - $params["ns5"], + 'ns1' => $params["ns1"], + 'ns2' => $params["ns2"], + 'ns3' => $params["ns3"], + 'ns4' => $params["ns4"], + 'ns5' => $params["ns5"], ], "contacts" => [ @@ -111,7 +115,7 @@ function RadWebHosting_RegisterDomain($params) * @param array $params * @return array $return */ -function RadWebHosting_TransferDomain($params) +function RadWebPro_TransferDomain($params) { $postfields = [ @@ -170,7 +174,7 @@ function RadWebHosting_TransferDomain($params) * @param array $params * @return array $return */ -function RadWebHosting_RenewDomain($params) +function RadWebPro_RenewDomain($params) { $postfields = [ @@ -201,28 +205,29 @@ function RadWebHosting_RenewDomain($params) * @param array $params * @return array $return */ -function RadWebHosting_GetNameservers($params) -{ - $postfields = - [ - "domain" => $params["domainname"] - ]; - - try - { - $call = new Calls\GetNameServers(Configuration::create($params), $postfields); - - $result = $call->process(); - unset($result['success']); - unset($result['message']); - - return $result; - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} +//function RadWebPro_GetNameservers($params) +//{ +// $postfields = +// [ +// "domain" => $params["domainname"] +// ]; +// +// try +// { +// $call = new Calls\GetNameServers(Configuration::create($params), $postfields); +// +// $result = $call->process(); +// unset($result['success']); +// unset($result['message']); +// unset($result['status']); +// +// return $result; +// } +// catch (\Exception $e) +// { +// return ['error' => $e->getMessage()]; +// } +//} /** * Save nameservers @@ -230,7 +235,7 @@ function RadWebHosting_GetNameservers($params) * @param array $params * @return array $return */ -function RadWebHosting_SaveNameservers($params) +function RadWebPro_SaveNameservers($params) { $postfields = [ @@ -260,7 +265,7 @@ function RadWebHosting_SaveNameservers($params) * @param array $params * @return array $return */ -function RadWebHosting_ReleaseDomain($params) +function RadWebPro_ReleaseDomain($params) { $postfields = [ @@ -285,7 +290,7 @@ function RadWebHosting_ReleaseDomain($params) * @param array $params * @return array $return */ -function RadWebHosting_GetEPPCode($params) +function RadWebPro_GetEPPCode($params) { $postfields = [ @@ -309,7 +314,7 @@ function RadWebHosting_GetEPPCode($params) * @param array $params * @return array $return */ -function RadWebHosting_GetContactDetails($params) +function RadWebPro_GetContactDetails($params) { $postfields = [ @@ -342,7 +347,7 @@ function RadWebHosting_GetContactDetails($params) * @param array $params * @return array $return */ -function RadWebHosting_SaveContactDetails($params) +function RadWebPro_SaveContactDetails($params) { $postfields = [ @@ -367,23 +372,23 @@ function RadWebHosting_SaveContactDetails($params) * @param array $params * @return array $return */ -function RadWebHosting_GetRegistrarLock($params) -{ - $postfields = - [ - "domain" => $params["domainname"], - ]; - - try - { - $call = new Calls\GetRegistrarLock(Configuration::create($params), $postfields); - return $call->process(); - } - catch (\Exception $e) - { - return ['error' => $e->getMessage()]; - } -} +//function RadWebPro_GetRegistrarLock($params) +//{ +// $postfields = +// [ +// "domain" => $params["domainname"], +// ]; +// +// try +// { +// $call = new Calls\GetRegistrarLock(Configuration::create($params), $postfields); +// return $call->process(); +// } +// catch (\Exception $e) +// { +// return ['error' => $e->getMessage()]; +// } +//} /** * Update Lock Status @@ -391,7 +396,7 @@ function RadWebHosting_GetRegistrarLock($params) * @param array $params * @return array $return */ -function RadWebHosting_SaveRegistrarLock($params) +function RadWebPro_SaveRegistrarLock($params) { $postfields = [ @@ -416,7 +421,7 @@ function RadWebHosting_SaveRegistrarLock($params) * @param array $params * @return array $return */ -function RadWebHosting_GetDNS($params) +function RadWebPro_GetDNS($params) { $postfields = [ @@ -440,7 +445,7 @@ function RadWebHosting_GetDNS($params) * @param array $params * @return array $return */ -function RadWebHosting_SaveDNS($params) +function RadWebPro_SaveDNS($params) { $postfields = [ @@ -465,7 +470,7 @@ function RadWebHosting_SaveDNS($params) * @param array $params * @return array $return */ -function RadWebHosting_RegisterNameserver($params) +function RadWebPro_RegisterNameserver($params) { $postfields = [ @@ -492,7 +497,7 @@ function RadWebHosting_RegisterNameserver($params) * @param array $params * @return array $return */ -function RadWebHosting_ModifyNameserver($params) +function RadWebPro_ModifyNameserver($params) { $postfields = [ @@ -520,7 +525,7 @@ function RadWebHosting_ModifyNameserver($params) * @param array $params * @return array $return */ -function RadWebHosting_DeleteNameserver($params) +function RadWebPro_DeleteNameserver($params) { $postfields = [ @@ -545,7 +550,7 @@ function RadWebHosting_DeleteNameserver($params) * @param array $params * @return array $return */ -function RadWebHosting_RequestDelete($params) +function RadWebPro_RequestDelete($params) { $postfields = [ @@ -569,7 +574,7 @@ function RadWebHosting_RequestDelete($params) * @param array $params * @return array $return */ -function RadWebHosting_TransferSync($params) +function RadWebPro_TransferSync($params) { $postfields = [ @@ -593,7 +598,7 @@ function RadWebHosting_TransferSync($params) * @param array $params * @return array $return */ -function RadWebHosting_Sync($params) +function RadWebPro_Sync($params) { $postfields = [ @@ -617,7 +622,7 @@ function RadWebHosting_Sync($params) * @param array $params * @return array $return */ -function RadWebHosting_GetEmailForwarding($params) +function RadWebPro_GetEmailForwarding($params) { $postfields = [ @@ -641,7 +646,7 @@ function RadWebHosting_GetEmailForwarding($params) * @param array $params * @return array $return */ -function RadWebHosting_SaveEmailForwarding($params) +function RadWebPro_SaveEmailForwarding($params) { $postfields = [ @@ -667,7 +672,7 @@ function RadWebHosting_SaveEmailForwarding($params) * @param array $params * @return array $return */ -function RadWebHosting_IDProtectionToggle($params) +function RadWebPro_IDProtectionToggle($params) { $postfields = [ @@ -692,9 +697,9 @@ function RadWebHosting_IDProtectionToggle($params) * @param $params * @return array */ -function RadWebHosting_IDProtectToggle($params) +function RadWebPro_IDProtectToggle($params) { - return RadWebHosting_IDProtectionToggle($params); + return RadWebPro_IDProtectionToggle($params); } @@ -704,7 +709,7 @@ function RadWebHosting_IDProtectToggle($params) * @param $params * @return array|bool|mixed|stdClass|string */ -function RadWebHosting_CheckAvailability($params) +function RadWebPro_CheckAvailability($params) { $postfields = [ @@ -725,10 +730,117 @@ function RadWebHosting_CheckAvailability($params) catch (\Exception $e) { \logModuleCall( - 'RadWebHosting', + 'RadWebPro', 'DomainLookup', $postfields, ['error' => $e->getMessage()] ); return ResultsListFactory::createResultsList([]); } } + +function RadWebPro_GetDomainSuggestions($params) +{ + $postfields = [ + 'searchTerm' => $params['searchTerm'], + 'punyCodeSearchTerm' => $params['punyCodeSearchTerm'], + 'tldsToInclude' => $params['tldsToInclude'] ?? [], + 'isIdnDomain' => (bool) $params['isIdnDomain'], + 'premiumEnabled' => (bool) $params['premiumEnabled'], + 'suggestionSettings' => $params['suggestionSettings'] ?? [] + ]; + + try + { + $call = new Calls\GetDomainSuggestions(Configuration::create($params), $postfields); + $result = $call->process(); + return ResultsListFactory::createResultsList($result); + } + catch (\Exception $e) + { + \logModuleCall( + 'RadWebPro', + 'DomainLookup', + $postfields, + ['error' => $e->getMessage()] + ); + } +} + +function RadWebPro_GetTldPricing($params) +{ + try + { + $call = new Calls\GetTldPricing(Configuration::create($params)); + $result = $call->process(); + + $results = new ResultsList(); + + foreach ($result as $extension) + { + $item = (new ImportItem) + ->setExtension((string) $extension['tld']) + ->setRegisterPrice((float) $extension['registrationPrice']) + ->setRenewPrice((float) $extension['renewalPrice']) + ->setTransferPrice((float) $extension['transferPrice']) + ->setGraceFeeDays((int) $extension['graceDays']) + ->setGraceFeePrice((float) $extension['graceFee']) + ->setRedemptionFeeDays((int) $extension['redemptionDays']) + ->setRedemptionFeePrice((float) $extension['redemptionFee']) + ->setCurrency((string) $extension['currencyCode']) + ->setYears($extension['years']); + + $results[] = $item; + } + + return $results; + } + catch (\Exception $e) + { + \logModuleCall( + 'RadWebPro', + 'GetTldPricing', + [], + ['error' => $e->getMessage()] + ); + } +} + +function RadWebPro_GetDomainInformation($params) +{ + $call = new Calls\GetDomainInformation(Configuration::create($params), ['domain' => $params['domainname']]); + $response = $call->process(); + + if (array_key_exists('error', $response)) + { + throw new Exception($response['error']); + } + + $domain = new Domain(); + + $domain->setDomain($response['domain']) + ->setNameservers($response['nameservers']) + ->setTransferLock($response['transferLock']); + + if ($response['expiryDate']) + { + $domain->setRegistrationStatus($response['status']) + ->setTransferLockExpiryDate(Carbon::createFromFormat('Y-m-d', Carbon::parse($response['transferLockExpiryDate'])->format('Y-m-d'))) + ->setExpiryDate(Carbon::createFromFormat('Y-m-d', Carbon::parse($response['expiryDate'])->format('Y-m-d'))) + ->setRestorable($response['restorable']) + ->setIdProtectionStatus($response['idProtectionStatus']) + ->setDnsManagementStatus($response['dnsManagementStatus']) + ->setEmailForwardingStatus($response['emailForwardingStatus']) + ->setIsIrtpEnabled($response['isIrtpEnabled']) + ->setIrtpOptOutStatus($response['irtpOptOutStatus']) + ->setIrtpTransferLock($response['irtpTransferLock']) + ->setIrtpTransferLockExpiryDate(Carbon::createFromFormat('Y-m-d', Carbon::parse($response['irtpTransferLockExpiryDate'])->format('Y-m-d'))) + ->setDomainContactChangePending($response['domainContactChangePending']) + ->setPendingSuspension($response['willDomainSuspend']) + ->setDomainContactChangeExpiryDate(Carbon::createFromFormat('Y-m-d', Carbon::parse($response['domainContactChangeExpiryDate'])->format('Y-m-d'))) + ->setRegistrantEmailAddress($response['registrantEmailAddress']) + ->setRenewBeforeExpiration($response['renewBeforeExpiration']) + ->setIrtpVerificationTriggerFields($response['irtpVerificationTriggerFields']); + } + + return $domain; +} diff --git a/RadWebHosting/logo.png b/RadWebPro/modules/registrars/RadWebPro/logo.png similarity index 100% rename from RadWebHosting/logo.png rename to RadWebPro/modules/registrars/RadWebPro/logo.png diff --git a/RadWebPro/modules/registrars/RadWebPro/whmcs.json b/RadWebPro/modules/registrars/RadWebPro/whmcs.json new file mode 100644 index 0000000..b323d98 --- /dev/null +++ b/RadWebPro/modules/registrars/RadWebPro/whmcs.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "type": "whmcs-registrars", + "name": "radwebpro", + "license": "proprietary", + "category": "registrar", + "description": { + "name": "RadWebPro", + "tagline": "Leading domain registrar module for WHMCS.", + "long": "RadWebPro registrar module enables seamless synchronization of reselling over 500 TLDs and provides convenient and robust domain management experience within client area account.\n[Click here to create an account](https://radwebhosting.com/domain-reseller)", + "features": [ + "500+ TLDs to Resell to Your Customers", + "Fully White-Labeled Reselling Options", + "Top-rated WHMCS registrar module in the Marketplace" + ] + }, + "logo": { + "filename": "logo.png" + }, + "support": { + "homepage": "https:\/\/radwebhosting.com\/", + "learn_more": "https:\/\radwebhosting.com\/domain-reseller", + "email": "support@radwebhosting.com", + "support_url": "https:\/\/radwebhosting.com\/support", + "docs_url": "https:\/\/radwebhosting.com\/client_area\/knowledgebase\/21\/Domains-API" + }, + "authors": [ + { + "name": "Rad Web Hosting", + "homepage": "https:\/\/radwebhosting.com\/" + } + ] +} \ No newline at end of file