Jump to content
  • 0

How To Make A Reseller Api To Allow Resellers To Resell Licenses From The Blesta License Manager Plugin?


timnboys

Question

How to make a reseller api to allow resellers to resell licenses from the blesta license manager plugin?

I don't know exactly how to tie into blesta's license manager plugin to make it allow a module to work much like the blesta license reseller module for my own licenses made by my blesta license manager plugin instance on my blesta.

does someone have any ideas on how to do this? some sample code maybe to get me started?

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

you need to create a plugin that will be a intermediate between your licence manager and the resell module offered to your resellers .

okay could I ask then could you give me some sample code to get started as this is what I tried to do yesterday to start with I copied the validate.php and changed it to api.php and made the index function go through a switch to see the posted action that is requested and do what action is posted, though I am having a little bit of trouble understanding how to make that server side api.php tie into the license_manager & blesta to add services,suspend services,etc to make it do what it is supposed to do so that is why I am asking for sample code to get me started on building the server side api that I would have on my blesta.

Link to comment
Share on other sites

  • 0

I think if you search on google / github you could found a reseller API for blesta (maybe an old version you could use it as starting base), I think it's was from germany or a german man.

I would if I could find that on github https://github.com/search?utf8=%E2%9C%93&q=blesta+reseller+api

I couldn't find it do you have a link to it then?

Link to comment
Share on other sites

  • 0

ok, there is nothing more than you found, all I said was from memory only, the one I said is for resell blesta license, not that you want.

 

An other way could be to add a new company at blesta, & give credential to your reseller, but this is maybe not what your aspirant reseller want it or also you do have an addon company cost from Blesta.

 

If not affilation is an other way, I did hack in Blesta checkout file for https://www.postaffiliatepro.com tracking.

 

Just curious in your former idea, your reseller will be selling from what shopping cart type: woocommerce, magento, blesta, other?

Link to comment
Share on other sites

  • 0

I think ge need to give the resselers option to resell licences of thier modules/plugins .

As activa say . You need to create a plgin to make it like a API SERVICE for your clients and the olugin send the command to the module .

okay but how do I actually do this? would you be able to at least get me started with some sample code?

as I agree that is how it works but unable to figure out how to actually make the plugin send the command to the module though.

Link to comment
Share on other sites

  • 0

To check how the plugin send the command to the module , check the cron.php it has a good road to begin with it .

For other side the plugin should have a controller that lisen to command like

Plugins/licence_api/api/(add/cancel/reissue)

Licence_ami = plugin directory

api = api.php inside controller

(Add cancel reissue) = function inside api file

Now you have the logic , you can use your way of coding .

Link to comment
Share on other sites

  • 0

ok, there is nothing more than you found, all I said was from memory only, the one I said is for resell blesta license, not that you want.

 

An other way could be to add a new company at blesta, & give credential to your reseller, but this is maybe not what your aspirant reseller want it or also you do have an addon company cost from Blesta.

 

If not affilation is an other way, I did hack in Blesta checkout file for https://www.postaffiliatepro.com tracking.

 

Just curious in your former idea, your reseller will be selling from what shopping cart type: woocommerce, magento, blesta, other?

they would be selling from blesta as well.

Link to comment
Share on other sites

  • 0

To check how the plugin send the command to the module , check the cron.php it has a good road to begin with it .

For other side the plugin should have a controller that lisen to command like

Plugins/licence_api/api/(add/cancel/reissue)

Licence_ami = plugin directory

api = api.php inside controller

(Add cancel reissue) = function inside api file

Now you have the logic , you can use your way of coding .

is there anyway you could provide sample code to do it as I admit I need help getting some code started but once I get the base going I can continue on there myself just need some code to build the base to get started(I got some rough code I tried to write myself but have been unable to understand how to talk to the blesta license module to tell it to provision the licenses directly from the plugins code.)

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
Answer this question...

×   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.

Loading...
×
×
  • Create New...