NewPath-Consulting / warm

Pro Reports for Wild Apricot is a Google Data Studio connector that helps Wild Apricot administrators understand your organization’s membership engagement, renewal rates, and demographics. Trend your revenue and get expense analyses. Whatever your question, enjoy all the organized data you need at your fingertips to make the business decisions want.
https://newpathconsulting.com/warm
GNU General Public License v3.0
6 stars 4 forks source link

Create a system to license (and bill eventually) for using WARM #31

Open asirota opened 4 years ago

asirota commented 4 years ago

When premium features of WARM become available, say summarized metrics for faster analysis, we will need to be able to sell and licence the connector. When someone uses WARM (rather than just signs up on our website), we want to collect the user name, email, organization name and Wild Apricot website URL.

A few ideas on how to do this - supermetrics.com seems to be the leader in doing this. They allow you to register for free and have a trial, you authenticate to their service with your Supermetrics password. Once the trial is over the plugin ceases to function until you go to their website and add payment details. Nothing is added to the plugin (no license key or some such). Everything is handled in a backend billing system that enables a plugin to operate. This is a decent idea and easy to manage since customers can access their own account, renew and buy various plans which open up features in the connector(s) they sell.

asirota commented 3 years ago

On further thought, using our built in licensing scheme available on waxm.newpathconsulting.com, we have generated a scenario in Integromat that creates license keys and checks them against an internal database via webhook.s

WARM needs to be changed to allow free use of the Account and Contact endpoints. Access to all other endpoints needs to be restricted only with the use of a valid license key.

The code needs to be changed to ensure a valid license key is checked either during data source configuration or when other endpoints are accessed. Invalid access key should throw up an error with details on how to obtain a valid key.

Key licensing validation help text should be available on the data source configuration screen as well

"To access all reporting objects, please purchase a license key for Pro Reports for Wild Apricot at https://newpathconsulting.com/warm.

asirota commented 3 years ago

@1cookspe this scenario checks the license key with a webhook https://www.integromat.com/scenario/1767415/edit

I'll give you access.

asirota commented 3 years ago

This webhook address expects data for checking a license:

https://hook.integromat.com/mauo1z5yn88d94lfvc3wd4qulaqy1tko

send in search arg of key to validate key

https://hook.integromat.com/mauo1z5yn88d94lfvc3wd4qulaqy1tko?key=LICENSEKEY

Response if valid key found is HTTP status 200 with these headers:

image

else if key not found the headers are

image

Validation key algorithm:

Sample keys

image