DennisHermannsen Posted July 16, 2019 Share Posted July 16, 2019 Hello. I have a few questions about transfer sync: https://developers.whmcs.com/domain-registrars/domain-syncing/ I see that there's an option to set 'failed' => true, but what does this mean? return array( 'completed' => true, // Return as true upon successful completion of the transfer 'expirydate' => '2017-10-15', // The expiry date of the domain 'failed' => false, // Return as true when transfer fails permenantly 'reason' => 'Reason message can go here', // Reason for the transfer failure if available 'error' => 'Error message goes here', // If the check fails, an error message string can be provided here ); What does 'permanently' mean? Will it only fail after X number of tries? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted July 16, 2019 Share Posted July 16, 2019 (edited) I know this doesn't help, but "permenantly" in their code has a typo. Should be "permanantly", with an "a". 😉 The failed is for when the registrar can't complete the transfer and gives up. Domain locked, didn't get the auth from the owner and so on. Edited July 16, 2019 by bear 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted July 16, 2019 Author Share Posted July 16, 2019 23 minutes ago, bear said: The failed is for when the registrar can't complete the transfer and gives up. Domain locked, didn't get the auth from the owner and so on. Darn. For .dk domains, you don't transfer the domain - you just change the name servers. There's no API for this, and the transfer will never fail. I might just instead do some custom code to check if the order data is older than 4 days, and fail if it is. 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted July 16, 2019 Author Share Posted July 16, 2019 Was actually not that difficult: $registrationDate = Capsule::table('tbldomains') ->select('registrationdate') ->where('id', '=', $params['domainid']) ->first(); $date = new DateTime($registrationDate->registrationdate); $now = new \DateTime(); if *code that checks if transfer is successful*{ return array( 'completed' => true, ); } // Cancel the domain transfer if name servers aren't updated within 4 days elseif($date->diff($now)->days > 4){ return array( 'failed' => true, 'reason' => 'Client did not accept change of nameservers within 4 days', ); } // If the nameservers for the domain hasn't been updated, but the transfer was initiated less than 4 days ago, show this error in the Transfer Sync email else{ return array( 'error' => "Nameservers not updated", ); } 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.