Jump to content

Licensing module and hosting package


openmind

Recommended Posts

OK I have the licensing module working well and plan to charge a recurring annual fee for customers using our software however I also provide free hosting for the customers using the license.

 

Now I guess the easiest way to do this would be to create a hosting order after the license order has been placed and just set it as free but I'm not entirely sure how to do this. I guess using a hook would be the best way but does anyone have any example of doing this?

Link to comment
Share on other sites

I've run a few promotions like this. I just have it include a hosting package that's set as needing manual setup, and then go and activate it on a Free billing cycle. This stops fraudulent signups from getting free hosting.

 

As to the implementation, hooks is the way to go really, if you don't want the hosting package as part of the product

Link to comment
Share on other sites

I've run a few promotions like this. I just have it include a hosting package that's set as needing manual setup, and then go and activate it on a Free billing cycle. This stops fraudulent signups from getting free hosting.

 

As to the implementation, hooks is the way to go really, if you don't want the hosting package as part of the product

I'm trying to automate this as far as as possible mainly as the licenses will only work on our servers and the product attracts very little fraud...

Link to comment
Share on other sites

The "catch" with a bundle is that a fraudulent signup could use this to get free hosting until you deactivate it, unless you have a fraud prevention module to stamp out that kind of thing.

Fair point but if this were to happen then it would be caught in 24 hours or less....

Link to comment
Share on other sites

Yeh we already use MaxMind to great effect. To be honest though fraud is a non-issue with the license side of the business as the product doesn't attract it and we get very few orders that haven't had at least one pre-sales question. It's an ecommerce software package you see...

 

One other thing that springs to mind though. After the sale is made it would be handy to have the order details posted to our own systems for post-sale install tasks. This would involve a hook but we would only need the whmcs ID to pick it up from there.

 

Not done one of these before so any guidance?

 

Thanks for the responses so far :)

 

Edit: If we were doing 1000/mo on these plans I would die a happy man ;)

Link to comment
Share on other sites

Yup that's it exactly, I just need to post the order details to our own internal page so something like this:

 


<?php

function complete_installation($vars) {

   #Post all the vars

}

add_hook("ShoppingCartCheckoutCompletePage",1,"complete_installation");

?>


 

As I'm not a PHP programmer, I use ColdFusion, the bit I'm unsure of is how to post all the vars to my own page...

Link to comment
Share on other sites

Actually would this work to post the orderid to my page?

 

<?php
$url = 'http://mydomain.com/install.cfm'; 
function complete_installation($vars) {


$fields = array(
           'orderid'=>$vars['orderid']
       );

//open connection
$ch = curl_init();

//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);

//execute post
$result = curl_exec($ch);

//close connection
curl_close($ch);

}

add_hook("ShoppingCartCheckoutCompletePage",1,"complete_installation");

?>

Link to comment
Share on other sites

Well I can grab post vars from CF quite easily and access the whmcs DB referencing that orderid so I'm just going to have give it a blast...

 

Ref CF - I've been developing with it since 1998, fantastic language to work with ;)

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