Please make a tutorial

  • Posts: 2
  • Thank you received: 1
12 years 1 month ago #74274

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

Please Log in or Create an account to join the conversation.

  • Posts: 26162
  • Thank you received: 4029
  • MODERATOR
12 years 1 month ago #74283

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:

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 :
index.php?option=com_hikaserial&ctrl=serial&task=check&hikaserial[serial]=YOUR_SERIAL_DATA&hikaserial[format]=xml

It would result something like this:
<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>
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
/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:
{"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
/index.php?option=com_hikaserial&ctrl=serial&task=consume
And give the rest of the parameters by POST ( hikaserial[serial_data] / hikaserial[format] / hikaserial[serial_extra_data][] )

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.

  • Posts: 26162
  • Thank you received: 4029
  • MODERATOR
12 years 1 month ago #74308

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,


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.

  • Posts: 2
  • Thank you received: 1
12 years 4 weeks ago #74539

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.

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.057 seconds
Powered by Kunena Forum