Skip to content

Commit 8bc2945

Browse files
authored
Merge pull request #99 from SynergyWholesale/feature/SW-2888-update-handling-error-message-from-domain-info-request-for-whmcs-domain-module
feature/SW-2888-update-handling-error-message-from-domain-info-request-for-whmcs-domain-module
2 parents 5004104 + 841a149 commit 8bc2945

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/registrars/synergywholesaledomains/synergywholesaledomains.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ function synergywholesaledomains_Sync(array $params)
960960
->first();
961961
// If the domain used to exist in this whmcs installation it's safe to say if we get these errors then
962962
// it has been transferred away to another reseller
963-
if ('Domain Info Failed - Unable to retrieve domain id' === $response['error']) {
963+
if (in_array($response['error'], ['Domain Info Failed - Unable to retrieve domain id', 'Domain Info Failed - Domain Does Not Exist'])) {
964964
// If now is after the domains expiry date mark it as cancelled
965965
if (time() >= strtotime($selectInfo->expirydate)) {
966966
$note = 'Domain has been marked as cancelled due to not being in your account and, the current date is past the expiry date';
@@ -1075,7 +1075,7 @@ function synergywholesaledomains_TransferSync(array $params)
10751075
try {
10761076
$response = synergywholesaledomains_apiRequest('domainInfo', $params);
10771077
} catch (\Exception $e) {
1078-
if ($e->getMessage() == 'Domain Info Failed - Unable to retrieve domain id') {
1078+
if (in_array($e->getMessage(), ['Domain Info Failed - Unable to retrieve domain id', 'Domain Info Failed - Domain Does Not Exist'])) {
10791079
return [
10801080
'completed' => false,
10811081
'failed' => true,

0 commit comments

Comments
 (0)