Page MenuHomekolab.org

Per-plan trial period
ClosedPublic

Authored by machniak on Tue, Sep 13, 11:22 AM.

Details

Reviewers
mollekopf
Group Reviewers
Restricted Project
Commits
rK385cdbd81e81: Per-plan trial period
Summary

Per-plan lite period
Don't send end-of-trial notifications if free_months != 1

Test Plan

./phpunit

Diff Detail

Repository
rK kolab
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

machniak requested review of this revision.Tue, Sep 13, 11:22 AM
machniak created this revision.

Looks good to me.

src/app/Observers/EntitlementObserver.php
130

Why are we doing this? A comment would be helpful.

src/app/Wallet.php
105

This does not seem problematic to me, we're just bumping updated_at to the first point in time where we have to check it again, no?
Also, $apply is the dry run, so we're not bumping it then?

machniak added inline comments.Tue, Sep 13, 2:47 PM
src/app/Observers/EntitlementObserver.php
130

Below we calculate the price using updated_at timestamp.

src/app/Wallet.php
105

$apply=false is dry-run.
My idea regarding the comment was to never have updated_at in the future. This way it would be more in sync with life. It's "updated at" not "valid until". It is not really a problem right now, though.

mollekopf accepted this revision.Wed, Sep 14, 3:42 PM
This revision is now accepted and ready to land.Wed, Sep 14, 3:42 PM
This revision was automatically updated to reflect the committed changes.