Jump to content
Blesta Addons

Critical, Service activated and renewed in the same time

Recommended Posts

if the service ordered in 20-6-2017, then paid in 30-6-2017, the service is activated, and in the same time is renewed !! this maybe has something related to https://dev.blesta.com/browse/CORE-912

in the same cron, blesta activate the service, and update the renew date i tink, then in the renew cron renew the service without updating the renew date !!  alist of the cron log

Provision Paid Pending Services Jun 30, 2017 1:40:03 PM Jun 30, 2017 1:40:12 PM
Output
Attempting to provision paid pending services. The pending service #14026 from client #4698 is now active. The paid pending services task has completed.

 

Process Service Renewals

Jun 30, 2017 1:40:12 PM Jun 30, 2017 1:40:16 PM
Output
Attempting to process renewing services. Renewed service #10949 for client 3411. Renewed service #14026 for client 4698. The process renewing services task has completed.

as shown in the cron log, the service was created and renewed in the same cron. this happen only for orders that are not paid the same day. this has caused us a lot of money lose by renewing domains thar are only paid for activation !!!

the service data shown the fallowing date in blesta

Date Created: Jun 21, 2017
Date Renews: Jun 30, 2018

THIS IS A CRITICAL BUG and it SHOULD FIXED AND PATCHED AS SOON AS POSSIBLE

 

Share this post


Link to post
Share on other sites

I think your case is related to the task you mentioned and it says it was fixed in 4.0. I've noticed other syncing issues too but I couldn't figure out if they were related to the specific module or system wide.

Share this post


Link to post
Share on other sites
12 minutes ago, evolvewh said:

I think your case is related to the task you mentioned and it says it was fixed in 4.0. I've noticed other syncing issues too but I couldn't figure out if they were related to the specific module or system wide.

we are using the latest version v4.0.1.

Share this post


Link to post
Share on other sites

Blesta know about this and it's been fixed in 4.1.x we also have the issue we just update the service when a client informs us or we remember when an order has been done. It's not the end of the world but it is a big bug.

Share this post


Link to post
Share on other sites
3 hours ago, Licensecart said:

Blesta know about this and it's been fixed in 4.1.x we also have the issue we just update the service when a client informs us or we remember when an order has been done. It's not the end of the world but it is a big bug.

when you have some services that is activated every day , it's a problem, as we know when we register a domain the action is reversible in 2 or 3 days, but for renewal is irreversible, and when we sell domain for 1$ of gain or less, in renewal we lose the entire amount, so to return the lose we need to sell 9 domains for one domain renewed in mistake . the past days we have not make attention to this issue as receive email notification with activation not for renewals . so you can imagine 2 or 3 domains activated daily with late payment, in 10 days how it should ?!!

some bug are less important, other are higher, and we can live without them, but there are some bugs are critical like security holes and cases like this one, need urgent fix and patch .

we have forced the manual review for all activation, but that has no sense when you announce instant activation !!!

Share this post


Link to post
Share on other sites

Working on a full solution for this.  https://dev.blesta.com/browse/CORE-912 was meant to give customers the full amount of time they paid for, but I've confirmed that the changes made there are causing this issue.  As a temporary solution for this you can comment out the changes made to the cron for this task on lines 2569-2575:

'date_renews' => ($service->period != 'onetime'
    ? date(
        'c',
        strtotime(date('c') . " +" . $service->term . " " . $service->period)
    )
    : null
)

 

Share this post


Link to post
Share on other sites
17 minutes ago, Jono said:

Working on a full solution for this.  https://dev.blesta.com/browse/CORE-912 was meant to give customers the full amount of time they paid for, but I've confirmed that the changes made there are causing this issue.  As a temporary solution for this you can comment out the changes made to the cron for this task on lines 2569-2575:


'date_renews' => ($service->period != 'onetime'
    ? date(
        'c',
        strtotime(date('c') . " +" . $service->term . " " . $service->period)
    )
    : null
)

 

Which file mate?

Share this post


Link to post
Share on other sites
20 hours ago, Blesta Addons said:

i have applied and we will see if still affected.

we have removed the manual review, and 2 domains has been renewed . this domain was already ordered.

another strange issue we have found, 1 of this two domains was ordered and activated same day (4-7-2017). then it was paid days after, and the domains was renewed after the invoice was paid !!!

i will put my two cent in this issue, why not just changing the date_added rather than date_renew? if we change the date_added blesta will considerate that the domain was only added now, and then it will affect a true renew date .

Share this post


Link to post
Share on other sites

even if the patch the services still activated and renewed !!

EDIT; add dates :

From Module logs table

Service ordered 2017-07-13 10:34:24
Service renewed 2017-07-13 14:10:07

From Service tables :

date_added 2017-07-12 14:15:44
date_renew 2018-07-13 10:34:15
date_last_renew 2017-07-13 10:34:15
 

Share this post


Link to post
Share on other sites
On 7/12/2017 at 2:36 AM, Blesta Addons said:

we have removed the manual review, and 2 domains has been renewed . this domain was already ordered.

another strange issue we have found, 1 of this two domains was ordered and activated same day (4-7-2017). then it was paid days after, and the domains was renewed after the invoice was paid !!!

i will put my two cent in this issue, why not just changing the date_added rather than date_renew? if we change the date_added blesta will considerate that the domain was only added now, and then it will affect a true renew date .

The solution I gave only resolved issues in the cron.  This error was caused by manual activation which caused the same problem.  We have a solution in 4.1.0-b1 to resolve both issues (CORE-2413).  The solution is fairly simple.  In Services::edit() (for me it is line 1158) change

            } else {
                $vars['date_last_renewed'] = $this->dateToUtc(strtotime($service->date_last_renewed . 'Z'), 'c');

to

            } elseif ($service->date_last_renewed) {
                $vars['date_last_renewed'] = $this->dateToUtc(strtotime($service->date_last_renewed . 'Z'), 'c');

Just to be clear this is in Services.php

Share this post


Link to post
Share on other sites
4 hours ago, Jono said:

The solution I gave only resolved issues in the cron.  This error was caused by manual activation which caused the same problem.  We have a solution in 4.1.0-b1 to resolve both issues (CORE-2413).  The solution is fairly simple.  In Services::edit() (for me it is line 1158) change


            } else {
                $vars['date_last_renewed'] = $this->dateToUtc(strtotime($service->date_last_renewed . 'Z'), 'c');

to


            } elseif ($service->date_last_renewed) {
                $vars['date_last_renewed'] = $this->dateToUtc(strtotime($service->date_last_renewed . 'Z'), 'c');

Just to be clear this is in Services.php

i have made the change and i will watch the result.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×