Jump to content

Domain renewals on payment no longer working since v7.2


Recommended Posts

Since upgrading to WHMCS 7.2.1 from 7.1.2, I noticed that when marking an invoice as paid, any contained domain renewals are not processed. The invoice is marked as paid, the other products in the invoice are renewed, but domains retain the old due date and the renewal command is not sent out to the registry module.

So I need to manually renew the domains (clicking on the "Renew" in the admin area works) and manually send out the renewal confirmations.

Has anyone else experienced these problems? Up until WHMCS 7.1.2 all was working fine...

Link to comment
Share on other sites

It's third party, actually I coded it myself and did not modify it since upgrading.

Pressing on the Renew button works, meaning that the renew function is working fine.

Since the domain does not even get an updated due date I suspect the problem is even before trying to renew. Otherwise I would get an updated date and a module error in the log, if anything failed.

Link to comment
Share on other sites

It's third party, actually I coded it myself and did not modify it since upgrading.

blame the author! :)

 

Pressing on the Renew button works, meaning that the renew function is working fine.

Since the domain does not even get an updated due date I suspect the problem is even before trying to renew. Otherwise I would get an updated date and a module error in the log, if anything failed.

only thing I can suggest is to take a look at the v7.2 changelogs to see if any hooks/api that you are using have been modified.

Link to comment
Share on other sites

Got this error:

 

Error: Whoops\Exception\ErrorException: Undefined variable: error in /var/www/vhosts/foo.bar/httpdocs/includes/functions.php:0 Stack trace: #0 /var/www/vhosts/foo.bar/httpdocs/includes/functions.php(0): Whoops\Run->handleError(8, 'Undefined varia...', '/var/www/vhosts...', 0, Array) #1 /var/www/vhosts/foo.bar/httpdocs/includes/invoicefunctions.php(0): AffiliatePayment(NULL, 429) #2 /var/www/vhosts/foo.bar/httpdocs/includes/invoicefunctions.php(0): makeHostingPayment(429, 171002) #3 /var/www/vhosts/foo.bar/httpdocs/includes/invoicefunctions.php(0): processPaidInvoice(171002, '', '2017-05-23 06:5...') #4 /var/www/vhosts/foo.bar/httpdocs/backoffice/invoices.php(0): addInvoicePayment(171002, '', '105.00', '0.00', 'banktransfer', '', '23.05.2017') #5 {main}

 

or this one

 

Error: Whoops\Exception\ErrorException: Undefined index: na in /var/www/vhosts/foo.bar/httpdocs/includes/registrarfunctions.php:0 Stack trace: #0 /var/www/vhosts/foo.bar/httpdocs/includes/registrarfunctions.php(0): Whoops\Run->handleError(8, 'Undefined index...', '/var/www/vhosts...', 0, Array) #1 /var/www/vhosts/foo.bar/httpdocs/includes/invoicefunctions.php(0): RegRenewDomain(Array) #2 /var/www/vhosts/foo.bar/httpdocs/includes/invoicefunctions.php(0): makeDomainPayment(471, 'Domain') #3 /var/www/vhosts/foo.bar/httpdocs/includes/invoicefunctions.php(0): processPaidInvoice(171136, '', '2017-05-23 06:3...') #4 /var/www/vhosts/foo.bar/httpdocs/backoffice/invoices.php(0): addInvoicePayment(171136, '', '16.00', '0.00', 'banktransfer', '', '23.05.2017') #5 {main}

 

When adding a payment. Not sure about why sometimes it's one exception and sometimes the other.

But either way, it looks like this happens right before calling the actual registrar module, or even before that, so to me this looks like a WHMCS bug...

Or maybe my PHP suddenly became too strict in handling this kind of shitty code? Undefined variables and indexes used to be handled as warnings, if I recall correctly...

Edited by Hal9000
Link to comment
Share on other sites

I can recall seeing a few posts about the InvoicePaid hook not triggering - not sure if you're using it... I haven't tested it personally, so can't confirm either way... support might be able to advise better on that... or whether there were any changes between v7.1 and 2 that could cause this.

Link to comment
Share on other sites

So summing up, when adding a payment, WHMCS crashes when either trying to apply an affiliate payment, or when trying to renew a domain.

Now I even have another issue: when upgrading a hosting package via admin panel, the clientsupgrade.php?action=order produces an error:

 

Whoops\Exception\ErrorException: Undefined property: Illuminate\Database\Eloquent\Relations\BelongsTo::$stockControlEnabled in /var/www/vhosts/foo.bar/httpdocs/includes/upgradefunctions.php:0

Stack trace:

#0 /var/www/vhosts/foo.bar/httpdocs/includes/upgradefunctions.php(0): Whoops\Run->handleError(8, 'Undefined prope...', '/var/www/vhosts...', 0, Array)

#1 /var/www/vhosts/foo.bar/httpdocs/includes/upgradefunctions.php(0): doUpgrade(69)

#2 /var/www/vhosts/foo.bar/httpdocs/includes/invoicefunctions.php(0): processUpgradePayment(69, '', '', 'true')

#3 /var/www/vhosts/foo.bar/httpdocs/includes/processinvoices.php(0): processPaidInvoice(171283)

#4 /var/www/vhosts/foo.bar/httpdocs/includes/processinvoices.php(0): createInvoicesProcess(false, true, '')

#5 /var/www/vhosts/foo.bar/httpdocs/includes/upgradefunctions.php(0): createInvoices(323, true)

#6 /var/www/vhosts/foo.bar/httpdocs/backoffice/clientsupgrade.php(0): createUpgradeOrder(401, '', 'FREEUPGRADE', 'banktransfer')

#7 {main}

 

The emails get sent out and the package on the product is changed, but still this does not look good...

I am starting to think this is so screwed up I might just have a problem that some file was not updated properly... I will reupload everything tonight and see if it works better.

Link to comment
Share on other sites

My problems might all be related to this:

https://forum.whmcs.com/showthread.php?129078-CORE-11283-Cron-failing-with-error-undefined-index-SCRIPT_NAME

 

My error_reporting was set to "E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED" (PHP 7.0.19), and now I changed the value to "0" in php.ini, which really makes me feel bad about the quality of the application.

We'll see what happens next...

Link to comment
Share on other sites

Well, actually it did not. I still get errors on occasions.

The last one being this:

 

Whoops\Exception\ErrorException: Undefined index: transfersecret in /var/www/vhosts/foo.bar/httpdocs/includes/registrarfunctions.php:0

Stack trace:

#0 /var/www/vhosts/foo.bar/httpdocs/includes/registrarfunctions.php(0): Whoops\Run->handleError(8, 'Undefined index...', '/var/www/vhosts...', 0, Array)

#1 /var/www/vhosts/foo.bar/httpdocs/includes/invoicefunctions.php(0): RegTransferDomain(Array)

#2 /var/www/vhosts/foo.bar/httpdocs/includes/invoicefunctions.php(0): makeDomainPayment(648, 'DomainTransfer')

#3 /var/www/vhosts/foo.bar/httpdocs/includes/processinvoices.php(0): processPaidInvoice(171327)

#4 /var/www/vhosts/foo.bar/httpdocs/includes/processinvoices.php(0): createInvoicesProcess(false, true, '')

#5 /var/www/vhosts/foo.bar/httpdocs/includes/orderfunctions.php(0): createInvoices(72, true, '', Array)

#6 /var/www/vhosts/foo.bar/httpdocs/backoffice/ordersadd.php(0): calcCartTotals(true)

#7 {main}

 

This happened when adding an order with a domain transfer. After this error I opened the pending order, selected the registrar and accepted the order, and the transfer command worked fine. Go figure.

 

My error_reporting is definetly set to 0, so I am really wondering why WHMCS throws an ErrorException on a php notice...

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