.

Expertise

  • Web Application Development

Client:

The School Run

Industry

Education + Non-profit

Integrating TheSchoolRun with Zoho subscriptions

TheSchoolRun web site is built in Drupal and provides educational resources for students of ages through a subscription model. TSR became a Logic+Magic client through our Project Rescue service as we took over the management of an existing application.

.

The strategy

When originally built, the business logic which handled the subscriptions logic was crafted within Drupal itself.This was achieved by an entirely custom approach with a requirement to handle renewals when a subscription had expired. The client had indicated our inherited solution was unreliable and required a lot of manual administration and from an ongoing management perspective included a large amount of technical debt which would need to be managed in the future. Logic+Magic were tasked with designing alternative solutions.

.

.

The solution

Following an in-depth technical research phase, we concluded that abstracting the subscription logic from Drupal to a third-party would be the best solution. After auditing several different platforms, we identified that Zoho Subscription service would be the best fit for TheSchoolRun’s use case.

The implementation involves a site visitor following a link on TheSchoolRun website which takes them to a Zoho Subscription page. A number of these subscription pages exist, to cater for different subscription types, such as the period a subscription covers or if it is a new or renewing subscription. As part of the subscription sign up, a free trial is included for the first two weeks.Card details are entered and verified at the beginning of the subscription, but payment is only taken after the trial period ends.

When a subscription is confirmed as active by Zoho Subscriptions, a request is sent by a“webhook” on Zoho Subscriptions to TheSchoolRun website. This request tells the application which event has been triggered, and our custom logic either creates a new user account, or updates an existing one if an account with the same email address already exists, tying it to the subscription which has just been made. A role is assigned to the user, marking them as a subscriber and thus granting access to resources.

When a subscription expires or is canceled on Zoho, a further request is fired to the Drupal site and this also updates the users account, removing the subscriber role and revoking access to resources.

The impact

Following release of this feature, the paid membership logic within the website has proved to be more reliable and efficient. Rather than re-invent the wheel we took the opportunity to identify off the shelf services which are able to fulfil the required business logic and simplified the website, reducing overheads and improving maintainability.

Discover ideas, insights and news from our experts

Sign up to our newsletter