Jump to content

how to upgrade client package?


Francisco

Recommended Posts

Hi John,

 

That's what I would have thought.

 

Nothing in the log other than approving the order. Payment was set to BACS and it's a customer we know will pay i.e. no money received and marked in as a payment yet - is that the problem?

 

Normal setting up of accounts don't require payment, so I'm guessing not ... we needed it setup so I had to manually change the package

 

Thanks for your help

Link to comment
Share on other sites

  • 1 month later...
  • 8 years later...

I've got to bump this.. I use the License Addon, and I offer Monthly and Owned licenses. For one i'm building.. it's a school closing software, and I'll likely do this with my radio software I'm building.. but I have three tiers. If they purchase and owned copy, and they decide to upgrade, would there be a way to charge only the difference of the license, and not charge the whole new license price for the next level?

 

Thanks!

Link to comment
Share on other sites

First off create the Product/Service of your software and configure Module tab to use Licensing module of WHMCS. Then move to Setup > Products/Services > Product Addons and create your three tiers. Make sure to select the main product from Applicable Products tab. Now when your customers order the software they will see something like follows.

stuff.png.99811f9573727580959b0498fd5cfbf8.png

Now I can't remember if the licensing script already transmits information about Addons assigned to the main Product/Service. Just in case use the LicensingAddonVerify action hook.

<?php

use WHMCS\Database\Capsule;

function prefix_LicensingAddonVerify($vars)
{
    // Retreive the ID of the Addon purchased by customer (if Active)
    $AddonID = Capsule::table('tblhostingaddons')->where(['hostingid', '=', $vars['serviceid']], ['status', '=', 'Active'])->first(['addonid'])->addonid;

    // On every check_license() the value of AddonID will be transmitted to licensing script. Use it to lock/unlock features of your software
    return [
        'AddonID' => $AddonID
    ];
}

add_hook("LicensingAddonVerify", 1, "prefix_LicensingAddonVerify");

When the remote software of your customer requests a license check to your server, it will provide all the usual details (valid IP, directory, domain...) plus the ID of the purchased Addon (if Active). Now you can implement it in your software to do things like add/remove "Powered by" footer, lock/unlock additional features and stuff like that. Obviously this value (the ID of the purchased Addon) needs to be stored locally somewhere on the server of your customers and hashed so that no one can freely cheat you by manually changing values. You could store it directly in the localkey.

Please keep in mind that mine is just an example. You can use an unlimited number of options. For example you could check the weather in Rome and if it's raining customers can't use your software software unless they purchase Premium features.

 

Edited by Kian
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated