Not logged in - Login
< back

Use Case: Subscriptions Management

We want to implement a subscription management using ATrigger. Using the old fashion way, it's really a time waster. Handling dates and user credits, handling the time of plan renew for each user depended on purchase date, making scheduled task for each user using terrible methods, and many more problems.

Solution Using A Trigger

Using A Trigger, time is not a problem at all. forget everything about time and just write a few lines of code on a page to just reset the user credit and charge the credit card when it called.

Step 1: Renew Function

Make a renew function and make it accessible using a URL.

pseudo code of

EXTEND john_lennon PLAN FOR 31 days
CHARGE john_lennon $30