Jump to content
Francisco

how to upgrade client package?

Recommended Posts

The package should be upgraded automatically after the client pays. Check Utilities > Activity Log at the time of the order to see if there are any errors.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines