Jump to content
  • 0

Custom Registrar Module domain sync


steph.hope

Question

I'm currently working on a custom registrar module based on the template provided on GitHub. I'm having a problem with the domain sync not working as I would expect.

As per the template, I'm returning an array:

$updated_info = array( 'expirydate' => $expiry_date, 'active' => $active, 'expired' => $expired, 'transferred' => false, );

For example, from logging the contents of this array for a domain which is no longer active:

    [expirydate] =>
    [active] =>
    [expired] => 1
    [transferred] =>

I would expect, based upon the function description

Quote
Domain syncing is intended to ensure domain status and expiry date changes made directly at the domain registrar are synced to WHMCS.

That if this array returns true for either expired or transferred, the domain status would be updated accordingly. The expiry date update is working properly.

Is there something different I need to be doing to get the status to be updated?

Edit: I did notice after posting that that I'd written 'transferred' rather than 'transferredAway', but given that I always return false for this value I hope that is irrelevant.
Edited by steph.hope
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Looks like setting "transferredAway" to true updates the status as I would expect. It's only "expired" that doesn't.

My real underlying issue is that the registry I'm working with only has the statuses "Active", "PendingRelease" and "Available" - so any domains which are expired, cancelled or whatever will return Available and my only option as far as this sync function is concerned seems to be to mark them as expired? Is there a hook or some other way to apply an alternative status at this point?

(This is currently being highlighted as I'm using the registrar's test environment during development, which refreshes every Friday so all domains I've registered become "Available" at the registrar, but continue to show as "Active" in WHMCS... )

Link to comment
Share on other sites

  • 0

I contacted WHMCS about this a long time ago. You can no longer set the domain to expired. Instead, changing the status to 'expired' is handled through WHMCS cron jobs. When the 'Expiry Date' is a date in the past, the domain will have the status set to 'expired'.

It's really a shame that we can't set expiry date directly. However, you could set it directly in the database if you wish.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated