定制 code-soup/certify-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

code-soup/certify-client

Composer 安装命令:

composer require code-soup/certify-client

包简介

Certify Client streamlines license key verification in WordPress plugins, enabling developers to effortlessly authenticate licenses issued by their Certify Server. Simplify license management and protect your plugin's integrity with ease.

README 文档

README

A license management and verification solution for commercial WordPress plugins.

Description

The Certify Client is a composer package that provides a license activation and verification solution for custom WordPress plugins. In order to use Certify Client, you must have the Certify Server installed on your server.

Certify Server is a free WordPress plugin which enables you to manage licenses for your custom WordPress plugins and provides custom update repository to handle plugin updates.

Features

  • Verify license keys issued by the Certify Server
  • Integrate license verification into your plugin with ease, using our simple and intuitive API
  • Limit number of activations per license
  • Generate license for multiple plugins
  • Integrated with Paddle.com subscriptions

Requirements

Setup

  1. Install composer package
composer require code-soup/certify-client
  1. Initialise Certify Client class
$certify = \CodeSoup\CertifyClient\Init::get_instance();
$certify->init([
    'plugin_id'             => 'my-plugin-folder-name',
    'plugin_version'        => '0.0.1',
    'cache_allowed'         => true,
    'certify_server_origin' => 'https://my.website.com',
    'license_key'           => '12345-12345-12345-12345-12345'
]);

Configuration Options

The init method takes an array of configuration options, which are used to configure the plugin. The following options are available:

  • plugin_id: The folder name of your plugin (e.g., my-plugin-folder-name).
  • plugin_version: The version of your plugin (e.g., 0.0.1).
  • cache_allowed: A boolean indicating whether caching is allowed (default: true). This saves certify server response in transient which expires each day. This way only 1 request per day is made to your server
  • certify_server_origin: The origin URL of the Certify server (e.g., https://my.website.com).
  • license_key: The license key for your plugin (e.g., 12345-12345-12345-12345-12345).

Validate License Key

You can then simply validate license key against certify server:

$certify->validate();

Response:

{
	"valid": true,
	"expiry": 1748995200
}
  • valid: Days left to expire > 0 AND activations limit is not yet reached. This would also mean that user is allowed to install plugin update.
  • expiry: Timestamp when key is about to expire

In case of any error following is returned:

{
	"valid": false,
	"expiry": 0
}

Issues

Please use Github issues to submit any bugs you may find.

License

This project is licensed under the GPL license.

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2022-04-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固