iotech / iotech-keygen-client
Keygen and Activate of iOTech Key Provider
v1.0.1
2018-07-19 03:57 UTC
Requires
- ext-curl: *
This package is auto-updated.
Last update: 2020-07-19 09:06:47 UTC
README
A library to communicate with IOTech Keygen Provider Service
This can do.
- Generate a keycode with conditions.
- Check if a key is valid or invalid
- Check key conditions
- List all key of your app.
Install
composer require iotech/iotech-keygen-client
Integrate with you code.
use KeygenClient\KeyService;
$key = new KeyService;
$key->appid = "<Provide your app id>";
$key->app_secret = "<Provide your app password>";
$key->length = 8; // set key length to 8 char
$key->client = 'Your App Name';
To generate 3 code without any condition
/**
* @return array
* {
* "KEY-CODE-1",
* "KEY-CODE-2",
* "KEY-CODE-3"
* }
*/
$key->generate(3);
To generate 3 code with condition cost equal 100
/**
* @return array
* {
* "KEY-CODE-1",
* "KEY-CODE-2",
* "KEY-CODE-3"
* }
*/
$key->generate(3, ['cost' => 100]); // not support in version 1.0.0
To validate your keycode
/**
* @return boolean or array
*/
$key->verify($code);
To List all key from your app
/**
* @return array
*/
$key->list();
Author
- Apinan Woratrakun apinan@iotech.co.th
LICENSE
GNU 3.0 it's free to use with any products and service but you must feedback to me if you have to edit.