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

Trial is not working #46

Closed
ArielMorningstar opened this issue Mar 6, 2019 · 1 comment
Closed

Trial is not working #46

ArielMorningstar opened this issue Mar 6, 2019 · 1 comment

Comments

@ArielMorningstar
Copy link

Hi! I'm having an issue with this package. I have succesfully registered 3 plans, each one with a 15 days trial period, but when I register a user with a plan, it doesn't take in count the trial days. For example, I have a user who have a plan that starts at 2019-03-06, the trial ends at 2019-03-21, but it ends at 2019-04-06.

The method I use for register a new subscription is $user->newSubscription($request->plan_name, $plan)->create();

How can I set the trial period succesfully?
Thank you for your help!

@gerardojbaez
Copy link
Owner

You most likely managed to solve the issue by now, but for those having a similar issue, make sure to use $subscription->isActive() to determine if a subscription is within a valid period (ends_at is in the future) or subscription is within a trial period. Using $subscription->isEnded() alone is not enough to determine whether a user can use their subscription as this method only takes into consideration the ends_at attribute.

Feel free to open a new issue if you are using the isActive() method and still experiencing this behavior.

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

2 participants