Skip to content

Commit 402eb5c

Browse files
authored
fix: provide .uk transfers with contact set as well
2 parents db500f6 + 59bccb1 commit 402eb5c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

modules/registrars/synergywholesaledomains/synergywholesaledomains.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,11 @@ function synergywholesaledomains_RegisterDomain(array $params)
632632
*/
633633
function synergywholesaledomains_TransferDomain(array $params)
634634
{
635+
// This is a lazy way of getting the contact data in the format we need.
636+
$contact = synergywholesaledomains_helper_getContacts($params, ['' => '']);
637+
635638
if (preg_match('/\.uk$/', $params['tld'])) {
636-
return synergywholesaledomains_apiRequest('transferDomain', $params);
639+
return synergywholesaledomains_apiRequest('transferDomain', $params, $contact, false);
637640
}
638641

639642
$request = [
@@ -645,22 +648,21 @@ function synergywholesaledomains_TransferDomain(array $params)
645648
$canRenew = synergywholesaledomains_apiRequest('domainRenewRequired', $params, $request, false);
646649
$request['doRenewal'] = (int) ('on' === $params['doRenewal'] && 'OK_RENEWAL' === $canRenew['status']);
647650
}
648-
651+
649652
/**
650653
* We don't want to send the idProtect flag with the "can renew"
651654
* check. So let's append it to the request here.
652655
*/
653656
$request['idProtect'] = $params['idprotection'];
654-
655-
// This is a lazy way of getting the contact data in the format we need.
656-
$contact = synergywholesaledomains_helper_getContacts($params, ['' => '']);
657+
658+
// Merge contact data into request
657659
$request = array_merge($request, $contact);
658660

659661
if (isset($params['premiumEnabled']) && $params['premiumEnabled'] && !empty($params['premiumCost'])) {
660662
$request['costPrice'] = $params['premiumCost'];
661663
$request['premium'] = true;
662664
}
663-
665+
664666
return synergywholesaledomains_apiRequest('transferDomain', $params, $request, false);
665667
}
666668

0 commit comments

Comments
 (0)