Can someone give me some hints how to achieve this? I want to sell a product which will give access to an external application. I also want to make sure that only the paid customer will be able to access it.
Unfortunately this is nearly impossible to give any definitive answer to without knowing more details about this "external application" and what sorts of APIs are available. More then likely some sort of API integration would be needed between this external application and Magento.
A few things that might at least get you moving in the right direction:
- OAuth could be used to log a Magento customer in from this external application, and then this external application could check to see if the authenticated user has _ option set on their account indicating they should have access to the application.
- You could extend the Magento API to allow the external application to make an API call to check if a given user should be allowed to use the external application (perhaps using an email address to act as a "key" between both systems?)
- When a customer completed an order from within Magento, you could "push" this information to the external application (of course whether this is possible, or even a good idea is something I have no idea about based on the limited information).