Jump to content

the difference between the renewal and unsuspend module actions?


JuniYadi

Recommended Posts

I tried to make the server module automatically.

docs: https://developers.whmcs.com/provisioning-modules/supported-functions/


what I want to ask here, is when the unsuspend module works, will it call the renew action too?
because from the results I tested here, the renew action is not performed after the unsuspend action

or is there other info on how this works?

Do I have to call the renew function on unsuspend?

Thanks,

Selection-20200611-004.png

Link to comment
Share on other sites

3 hours ago, Kian said:

Renew moves next to date to nex billing cycle. Unsuspend re-enable the service but WHMCS will suspend it again on next cron (if automatic suspension is in use) because it is still due. 

Yes.

But in my current problem, the customer is making a payment and the module is doing an 'unsuspend' action but the 'renew' action is not.

is it possible to take action together with 'unsuspend' then 'renew' or how?

Link to comment
Share on other sites

If the service is suspended due to being overdue on payment, when the client pays the due invoice this should trigger the renewal process moving the next due date forward and unsuspend the service to activate it again now it's paid.

As mentioned, the unsuspend button will only issue the unsuspend command to your server, it does not cause any billing actions to be performed.

Link to comment
Share on other sites

Thanks @Kian and @WHMCS Dan

After several test and debug. the renew function is indeed executed. it's just that the data on $params is different.

for example when the customer transfer and renew function are executed, in params there is no 'serverid' data array.

[packageid] => 8
[pid] => 8
[serverid] => 0
[status] => Active
[type] => other
[producttype] => other

but when the renew function is run manually from the admin area, in params there is an array of 'serverid' data.

[packageid] => 8
[pid] => 8
[serverid] => 34
[status] => Active
[type] => other
[producttype] => other

this is what makes the renew function fail to execute.

i called this function to make url request: $params['serverhostname']
but because the `serverid` does not exist, so there is no server data.

Link to comment
Share on other sites

  • 10 months later...
On 6/18/2020 at 5:59 AM, JuniYadi said:

Thanks @Kian and @WHMCS Dan

After several test and debug. the renew function is indeed executed. it's just that the data on $params is different.

for example when the customer transfer and renew function are executed, in params there is no 'serverid' data array.


[packageid] => 8
[pid] => 8
[serverid] => 0
[status] => Active
[type] => other
[producttype] => other

but when the renew function is run manually from the admin area, in params there is an array of 'serverid' data.


[packageid] => 8
[pid] => 8
[serverid] => 34
[status] => Active
[type] => other
[producttype] => other

this is what makes the renew function fail to execute.

i called this function to make url request: $params['serverhostname']
but because the `serverid` does not exist, so there is no server data.

Did you report it as a bug? Is it already fixed?

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
Reply to this topic...

×   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