• Hello license managers,
    Greetings from TheWebSolver. We have been developing an API where users can activate/deactivate/renew licenses using License Manager for WooCommerce and TheWebSolver License Manager (client/server).

    NOTE:

    1. Only manual renewal of existing license key is possible with parent/child order relation.
    2. Amazon PHP SDK is used for handling zip files saved on Amazon S3.

    For using on selling product: License Manager Client link

    For using on license server where this plugin is installed: License Manager Server Link

    We would like to share it with all our friends using this plugin.

    Thank you.

    • This topic was modified 3 years, 9 months ago by hsehszroc.
    • This topic was modified 3 years, 9 months ago by hsehszroc.
Viewing 15 replies - 1 through 15 (of 29 total)
  • @hsehszroc

    Great work! I’ll sticky this topic.

    Thread Starter hsehszroc

    (@hsehszroc)

    @drazenbebic
    Thank you.

    Amazing!
    Super thank you =)

    What file do I need to include in the “tws-license-manager-server” plugin?
    https://github.com/TheWebSolver/tws-license-manager-server

    I do not really understand how to install it =(

    Thread Starter hsehszroc

    (@hsehszroc)

    @yonifre
    Thanks for trying out the framework.

    I have updated the readme file on how to use it.

    Please try the steps given there and you should be able to install and activate it.

    Also, are you using the server along with the client or not? If not, it may not work as expected.

    • This reply was modified 3 years, 8 months ago by hsehszroc. Reason: review activate word

    Thank you very much!!

    There is a way to install the plugin without Composer?

    I didn’t install the client yet, I will do it after the server one =)

    Thread Starter hsehszroc

    (@hsehszroc)

    It is a lot of manual work but possible to use it without using a composer.

    If you want to use it without a composer, then you can:

    It is not tested in this scenario. But should work if everything is included properly.

    • This reply was modified 3 years, 8 months ago by hsehszroc. Reason: framework spelling
    • This reply was modified 3 years, 8 months ago by hsehszroc. Reason: mention of require PHP files

    @hsehszroc
    Thank you!!!!

    I did all the step, for now, the menu link brings me to 404 page at:
    domain.com/wp-admin/tws_setting

    Thread Starter hsehszroc

    (@hsehszroc)

    The plugin will not instantiate unless you have properly set crypto generated from License Manager for WooCommerce plugin.

    Did a notice display regarding cryptographic secrets when you activate the plugin?

    Make sure:

    Thank for the answer, I have both of themes already.
    I will clarify the problem:
    I see in the admin menu the “The Web Solver” menu.
    When I click in this menu I redirect to 404 page in this URL:
    domain.com/wp-admin/tws_setting

    I think I did everything as I needed, but maybe I did something wrong =)

    Thread Starter hsehszroc

    (@hsehszroc)

    If everything is included properly, it should work. I can’t debug the problem unless I see the codes how you included the files.

    Thread Starter hsehszroc

    (@hsehszroc)

    If done in the following way, it should work (tested). Hope it helps.

    • Create new folder inside WordPress plugins directory.
    • Download and extract setting and server framework from github, rename folders to setting & server inside above new folder.
    • Create main plugin file inside above new folder and require extracted framework files like so:
    <?php
    /**
     * Plugin Name:       License Server
     * Description:       License Server to manager license.
     * Version:           1.0
     * License:           GNU General Public License v3.0 (or later)
     * License URI:       https://www.gnu.org/licenses/gpl-3.0.txt
     *
     * @package           TheWebSolver\License_Manager\Server
     */
    
    use TheWebSolver\License_Manager\Server;
    
    // Setting files.
    require_once __DIR__ . '/setting/Includes/Plugin.php';
    require_once __DIR__ . '/setting/Includes/Component/Container.php';
    require_once __DIR__ . '/setting/Includes/Component/Options.php';
    require_once __DIR__ . '/setting/Includes/Component/Fields.php';
    
    // Server files.
    require_once __DIR__ . '/server/Includes/Single_Instance.php';
    require_once __DIR__ . '/server/Includes/Server.php';
    require_once __DIR__ . '/server/Includes/Options_Interface.php';
    require_once __DIR__ . '/server/Includes/Options_Handler.php';
    require_once __DIR__ . '/server/Includes/API/Manager.php';
    require_once __DIR__ . '/server/Includes/API/S3.php';
    require_once __DIR__ . '/server/Includes/Component/Checkout.php';
    require_once __DIR__ . '/server/Includes/Component/Order.php';
    require_once __DIR__ . '/server/Includes/Component/Product.php';
    
    // Amazon PHP SDK v3 files... ...add them by following the Amazon SDK guide.
    
    Server::load()->instance();

    It should create new menu The Web Solver and a submenu Server Setup within this menu.

    It will work even if Amazon PHP SDK files aren’t included.

    Thank you so much!!
    Now everything basically working, But in the client site, when I insert the license details(on debug mood), I receive a JSON error:
    [0] => JSON Error: Syntax error
    and then I see “301 Moved Permanently – Nginx” error in the body message

    But I see that if I open directly the URL of the JSON in the browser , the data looks good:

    {“success”:true,”data”:{“id”:4,”orderId”:55,”productId”:14,”userId”:1,”licenseKey”:”SMALL2Dxxxxx178X584HXF7″,”expiresAt”:”2022-06-30 13:59:42″,”validFor”:365,”source”:1,”status”:2,”timesActivated”:null,”timesActivatedMax”:10,”createdAt”:”2021-06-30 13:59:42″,”createdBy”:1,”updatedAt”:”2021-06-30 13:59:42″,”updatedBy”:1}}

    Thank you =)

    Thread Starter hsehszroc

    (@hsehszroc)

    JSON Error: Syntax error
    and then I see “301 Moved Permanently – Nginx” error in the body message

    This error occurred since it connected to the server but didn’t find the resource. Can you share more details how you setup the client?

    Thank you for your response and for your patient.

    The Client-side is inside a plugin, I require all the files in the “License Manager Client“.
    I followed all the steps there including in the “CLIENT.md” file and I turn on the Debug mood and I get in the admin screen the Json long respond with a JSON Error: Syntax error
    .

    when I turn off the Debug mood and including the code for the admin menu and all the other settings, I see that I have the client frontend form with 3 fields (Email Licence ID, Order ID ) But when I fill it out nothing happening

    *Both client and server sites are on Nginx server.

    Thanks again

Viewing 15 replies - 1 through 15 (of 29 total)
  • The topic ‘lmfwc API PHP for client and server’ is closed to new replies.