Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renew Subscription Does Not Work as It Should #12

Open
Elshaden opened this issue Dec 17, 2020 · 0 comments
Open

Renew Subscription Does Not Work as It Should #12

Elshaden opened this issue Dec 17, 2020 · 0 comments

Comments

@Elshaden
Copy link

The Renew of any subscription does not work. it renews a period starting from starts at not ends at.
which is wrong, if you want to renew existing Subscription the new period added should start from ends at and adds the Interval.

in your code
'
protected function calculate()
{
$method = $this->getMethod();
$start = clone($this->start);
$this->end = $start->$method($this->interval_count);
}
``
this should be in renewal case
protected function calculate()
{
$method = $this->getMethod();
$start = clone($this->end);
$this->end = $start->$method($this->interval_count);
}

so the new period starts from where the last subscription ends.

Good day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant