How to implement product subscription bussiness model with Nokia In-application Purchase API
This article explains how to ... 'Nokia In-application Purchase API SDK flexibility allows developer to create different business models to monetize applications. In-application Purchase SDK for Qt contains example application project BookStore that demonstrates use of third-party product resource server. This example application allows user to buy a product and use it forever. How with minimal efforts to turn the project to subscription business model when user rights to download product may expire and user have to re-new his subscription?
Article Metadata
Tested with
Compatibility
Platform Security
Article
Contents |
Introduction
Book store example application can be found in In-app Purchase for Qt by the path after installation \iap_qt_sdk_0.3.1_24.01.12\Examples\InApplicationPurchase\BuyAndDownloadExample This application project demonstrates how to implement In-application Purchase with your own access control to protected resources that are stored on third party server. Third party server can validate user requests for a product with OVI Store via Purchase Ticket Verification API. Book store example application functionality allows user to buy a product and use it forever. How with minimal efforts to implement subscription model on top of Book store example application?
Implementation approach
architecture
When user requests server for a product, server checks whether this product has already been bought by this user. To do this checking server implementation dbaseManager has functionpublic function getTicket($var_account, $var_prodid)
Before the ticket existence check we are going to introduce Subscription expiration check. Upon the Subscription expiration checking result existed ticked for the requested product belongs to this user may be deleted if it is found that this purchase expired. Then if the ticked record has been deleted in Subscription expiration check, dbaseManager.getTicket will return empty string indicating user has to buy that product.
The rest of Book store example application business logic will remain unchanged.
performance consideration
Subscription expiration check for a product will be performed only for user who request this product for performance reason -- i.e. we don't scan the whole purchase list for purchase expiration.
Implementation
- We need introduce expiration timer to the product catalog database implementation
- We need to check whether subscription is expired in the server code
Summary
Add categories below. Remove Category:Draft when the page is complete or near complete

