How do I set up a prepaid token based system?
I am setting up a section of a website where employers can post job vacancies, but in order to do so, I want them to buy a token or number of tokens to activate the ability to post a vacancy. So if an employer has bought five tokens, and they post a vacancy, it will leave four remaining tokens for them to use.
Currently, I have a table for users (based on the double opt in tutorial), and I also have a table for vacancies listed.
I can't quite see how to implement this token system and need a bit of guidance on how to do so. Once I have an idea of how to go about implementing this, I should be OK with building it and the finer details, but I am at a loss of where to begin. So any advice you could give would be appreciated
My intention is to use databridge which I am well versed in, but this will be the first time I have used eCart. I'll use paypal as a payment gateway in order for them to buy the tokens. I get that you can use eCart to register products purchased, and by which user, but I just can't get my head around how to use a token system and recognise if a token for that user firstly exists, and secondly recognise that a token has just been used to post a job and there is now one less token.
What are you thoughts? How would you tackle this?
Thanks.