- Posts: 2
- Thank you received: 1
Please make a tutorial
13 years 10 months ago #74274
by immersiva
Please make a tutorial was created by immersiva
Hi,
I'm trying to create a plugin for HikaSerial, so that I can finish this workflow:
Objective: A store for digital products
a) with only one (for now) dowloadable digital product
b) configure simple checkout process with paypal payment and a digital product (file) download
c) when the game is bought an email is sent to the user with a custom serial number. For instance, the serial number can be something like: md5(<user email>+'somerandomstring' + reissues_counter)
d) serials can be re-generated for a specific user (thus the reissues_counter thing)
e) when the user starts to play the game:
e.1 - s/he enters his/her login and serial number
e.2 - the game client sends the data to the server invoking an HTTP URL (php script)
e.3 - the game site/server validates the information and sends the client a response
I installed hikashop and hikaserial, but how to I get started creating this plugin.
A basic tutorial would be great, instead of searching bits of information here and there on this forum.
For instance, which files do I need to create and where do I put them?
How do I consume a serial in step e.2?
TIA,
Rod
I'm trying to create a plugin for HikaSerial, so that I can finish this workflow:
Objective: A store for digital products
a) with only one (for now) dowloadable digital product
b) configure simple checkout process with paypal payment and a digital product (file) download
c) when the game is bought an email is sent to the user with a custom serial number. For instance, the serial number can be something like: md5(<user email>+'somerandomstring' + reissues_counter)
d) serials can be re-generated for a specific user (thus the reissues_counter thing)
e) when the user starts to play the game:
e.1 - s/he enters his/her login and serial number
e.2 - the game client sends the data to the server invoking an HTTP URL (php script)
e.3 - the game site/server validates the information and sends the client a response
I installed hikashop and hikaserial, but how to I get started creating this plugin.
A basic tutorial would be great, instead of searching bits of information here and there on this forum.
For instance, which files do I need to create and where do I put them?
How do I consume a serial in step e.2?
TIA,
Rod
Please Log in or Create an account to join the conversation.
13 years 10 months ago #74283
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Re: Please make a tutorial
Hi,
Did you look at the developer documentation ?
www.hikashop.com/en/hikashop/125-hikaserial-developer.html
Some documentation about the "consume" is missing but we will work on documentation this week.
I will include some information about HikaSerial webservices too.
The consume html page is:
Using webservices, in the front end, to check a serial, you can call an url like this :
It would result something like this:
You can use XML, JSON and HTML formats.
After that, there is the "consume" feature.
You can consume a serial which is "assigned".
For example, I can call the URL
And I received:
The webservice is compatible with html POST request.
So you can make a post request to the url
And give the rest of the parameters by POST ( hikaserial[serial_data] / hikaserial[format] / hikaserial[serial_extra_data][] )
Regards,
Did you look at the developer documentation ?
www.hikashop.com/en/hikashop/125-hikaserial-developer.html
Some documentation about the "consume" is missing but we will work on documentation this week.
I will include some information about HikaSerial webservices too.
The consume html page is:
Code:
index.php?option=com_hikaserial&ctrl=serial&task=consume
Using webservices, in the front end, to check a serial, you can call an url like this :
Code:
index.php?option=com_hikaserial&ctrl=serial&task=check&hikaserial[serial]=YOUR_SERIAL_DATA&hikaserial[format]=xml
It would result something like this:
Code:
<hikaserial>
<serials>
<serial status="unassigned" date="1333535893">
<data><![CDATA[YOUR_SERIAL_DATA]]></data>
<extradata>
<computer_name><![CDATA[the computer name]]></computer_name>
</extradata>
</serial>
</serials>
</hikaserial>
After that, there is the "consume" feature.
You can consume a serial which is "assigned".
For example, I can call the URL
Code:
/index.php?option=com_hikaserial&ctrl=serial&task=consume&hikaserial[serial_data]=YOUR_SERIAL_DATA&hikaserial[serial_extra_data][myUser]=Jerome&hikaserial[format]=json
And I received:
Code:
{"consume":{"status":"assigned","date":"0","data":"YOUR_SERIAL_DATA","extradata":{"myUser":"Jerome"}}}
The webservice is compatible with html POST request.
So you can make a post request to the url
Code:
/index.php?option=com_hikaserial&ctrl=serial&task=consume
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
13 years 10 months ago #74308
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Re: Please make a tutorial
Hi,
The documentation has been updated.
There is now a dedicated page to the consume feature: www.hikashop.com/en/hikashop/138-hikaserial-consume.html
Regards,
The documentation has been updated.
There is now a dedicated page to the consume feature: www.hikashop.com/en/hikashop/138-hikaserial-consume.html
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
13 years 10 months ago #74539
by immersiva
Replied by immersiva on topic Re: Please make a tutorial
Hi Jerome,
Thanks for your promptly reply.
I think it's useful to document that the developer should look in /plugin/hikaserial/ for examples. Since I came from a different programming background I don't know upfront where joomla things are located.
Thanks again,
R.
Thanks for your promptly reply.
I think it's useful to document that the developer should look in /plugin/hikaserial/ for examples. Since I came from a different programming background I don't know upfront where joomla things are located.
Thanks again,
R.
The following user(s) said Thank You: Jerome
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.250 seconds