From ca809ba105c1104f891f6a244582c2ecde28f441 Mon Sep 17 00:00:00 2001 From: Kai Schwarz Date: Wed, 17 Apr 2024 23:10:29 +0200 Subject: [PATCH] fix(internet.bs registrar): review function isDomaincanBeTransferred (#2241) --- src/library/Registrar/Adapter/Internetbs.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/library/Registrar/Adapter/Internetbs.php b/src/library/Registrar/Adapter/Internetbs.php index fa10fc500..4b3797182 100644 --- a/src/library/Registrar/Adapter/Internetbs.php +++ b/src/library/Registrar/Adapter/Internetbs.php @@ -71,9 +71,18 @@ class Registrar_Adapter_Internetbs extends Registrar_AdapterAbstract return $result['status'] == 'AVAILABLE'; } - public function isDomaincanBeTransferred(Registrar_Domain $domain): never + public function isDomaincanBeTransferred(Registrar_Domain $domain) { - throw new Registrar_Exception(':type: does not support :action:', [':type:' => 'Internet.bs', ':action:' => __trans('checking domain transferability')]); + $params = [ + 'domain' => $domain->getName(), + ]; + + $result = $this->_process('/Domain/Check', $params); + + //return true if status is UNAVAILABLE + //For not supported TLDs, the status will be 'FAILURE' + return $result['status'] == 'UNAVAILABLE'; + } public function modifyNs(Registrar_Domain $domain)