PHP code example of appcheap / license

1. Go to this page and download the library: Download appcheap/license library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

appcheap / license example snippets




$client = new Appcheap\Client([
    'identify' => 'app-builder',
    'base_uri' => 'https://verify.appcheap.io/api/v1',
    'plugin_file' => __FILE__,
]);

$plugin = new Appcheap\Plugin($client);
$plugin->run();

$verify = new Appcheap\Verify( $client );

$license_page = $verify->registerLicensePage(
	array(
		'parent_slug' => 'options-general.php',
		'page_title'  => 'License',
		'menu_title'  => 'License',
		'menu_slug'   => 'appcheap-license',
	)
);

$verify = new Appcheap\Verify( $client );

$verify->registerRestApi(
    array(
        'namespace' => 'appcheap/v1',
        'route'     => '/license',
    )
);