stelian Posted June 21, 2018 Share Posted June 21, 2018 Hello, I built a custom registrar module for ROTLD.ro (romanian domain names) and most functions works as expected but apparently I'm missing something for the Sync function. My rotld_Sync() function returns an array like in WHMCS Sample Registrar Module but our domains are not synced and the received mail has errors like: Sync Not Supported by Registrar Module Please, do you have any hint for what should I do next or what causes that error? 0 Quote Link to comment Share on other sites More sharing options...
Logicmaker Softwares Posted June 23, 2018 Share Posted June 23, 2018 On 6/21/2018 at 7:24 PM, stelian said: Hello, I built a custom registrar module for ROTLD.ro (romanian domain names) and most functions works as expected but apparently I'm missing something for the Sync function. My rotld_Sync() function returns an array like in WHMCS Sample Registrar Module but our domains are not synced and the received mail has errors like: Sync Not Supported by Registrar Module Please, do you have any hint for what should I do next or what causes that error? Hello, Can you please confirm what logic actually you wrote to sync domains from registrar to your whmcs database? Logicmaker 0 Quote Link to comment Share on other sites More sharing options...
stelian Posted June 24, 2018 Author Share Posted June 24, 2018 function rotld_Sync($params) { try { $ac = new ApiClient($params); $ac->set_param('command', 'domain-info'); $ac->set_param('domain', $params['domain']); $response = $ac->commit(); $response_array = json_decode($response); if ($response_array->result_code === '00200') { $return_array = [ 'active' => true, 'expired' => false, 'transferredAway' => false, ]; $return_array['expirydate'] = substr($response_array->data->expiration_date, 0, 10); $statuses = $response_array->data->statuses; if (in_array('OK', $statuses)) { $return_array['active'] = true; } return $return_array; } } catch (\Exception $e) { return array( 'error' => $e->getMessage(), ); } } @Logicmaker Thank you very much for your time! Have I done something wrong? 0 Quote Link to comment Share on other sites More sharing options...
cosmin Posted June 25, 2018 Share Posted June 25, 2018 Hi! Did you solve the problem? I have exactly the same. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
Logicmaker Softwares Posted June 26, 2018 Share Posted June 26, 2018 Hello all, If you still looking for help, can contact us at : support@logicmaker.in Thanks, Logicmaker 0 Quote Link to comment Share on other sites More sharing options...
Logicmaker Softwares Posted June 26, 2018 Share Posted June 26, 2018 On 6/24/2018 at 4:51 PM, stelian said: function rotld_Sync($params) { try { $ac = new ApiClient($params); $ac->set_param('command', 'domain-info'); $ac->set_param('domain', $params['domain']); $response = $ac->commit(); $response_array = json_decode($response); if ($response_array->result_code === '00200') { $return_array = [ 'active' => true, 'expired' => false, 'transferredAway' => false, ]; $return_array['expirydate'] = substr($response_array->data->expiration_date, 0, 10); $statuses = $response_array->data->statuses; if (in_array('OK', $statuses)) { $return_array['active'] = true; } return $return_array; } } catch (\Exception $e) { return array( 'error' => $e->getMessage(), ); } } @Logicmaker Thank you very much for your time! Have I done something wrong? Hello, Can you please confirm, you are passing following all required config parameters to ApiClient() class : $config = array( 'regid'=>'XXXX', 'password'=>'XXXX', 'apiurl'=>'https://rest2-test.rotld.ro:6080', 'registrar_domain'=>'rotest.ro', 'lang'=>'en', 'format'=>'xml' ); Also, according to sample registrar module given by WHMCS at below url shows that how to pass domain name to api call : https://github.com/WHMCS/sample-registrar-module/blob/master/modules/registrars/registrarmodule/registrarmodule.php // domain parameters $sld = $params['sld']; $tld = $params['tld']; // Build post data $postfields = array( 'username' => $userIdentifier, 'password' => $apiKey, 'testmode' => $testMo 'domain' => $sld . '.' . $tld, ); Also, try to change following condition : if ($response_array->result_code === '00200') { to following : if ($response_array->result_code == '00200') { If you still not getting the issue solve, we need to debug module code at your WHMCS setup. Let me know if any further help needed. Thanks Logicmaker 0 Quote Link to comment Share on other sites More sharing options...
stelian Posted June 26, 2018 Author Share Posted June 26, 2018 @Logicmaker Softwares I figure it out what the problem was. The code was almost OK. Thank you so much for trying to help me! @cosmin The *.ro domains listed with Sync Not Supported by Registrar Module had other record set to Registrar (other than ROTLD) and I wrongly assumed it is ROTLD. You can check the Registrar by going to Clients > Domain Registration > and select a domain with Sync Not Supported by Registrar Module. Most probably ROTLD is not selected (at least that was my case). Best regards! 0 Quote Link to comment Share on other sites More sharing options...
romedchim Posted July 2, 2018 Share Posted July 2, 2018 Is it for sale? I would be interested. Best regards. 0 Quote Link to comment Share on other sites More sharing options...
Logicmaker Softwares Posted July 3, 2018 Share Posted July 3, 2018 On 26/06/2018 at 5:45 PM, stelian said: @Logicmaker Softwares I figure it out what the problem was. The code was almost OK. Thank you so much for trying to help me! @cosmin The *.ro domains listed with Sync Not Supported by Registrar Module had other record set to Registrar (other than ROTLD) and I wrongly assumed it is ROTLD. You can check the Registrar by going to Clients > Domain Registration > and select a domain with Sync Not Supported by Registrar Module. Most probably ROTLD is not selected (at least that was my case). Best regards! Can you share the module files, so we can see what exactly you done it for ROTLD ? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
stelian Posted July 3, 2018 Author Share Posted July 3, 2018 Sorry, my client does not allow me to share the source code. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.