×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    33

    Misunderstanding of the meaning of "Restorable Products"

    Based on what I have read so far in the entire documentation related to IAP about product restoration.

    A restorable product is technically any IAP product that has been purchased by a user is flagged as "restorable".

    Am I correct about this?

    Unfortunatly, at the current implementation of Nokia IAP system, this limits how I want to approach my business model of free to play single player games.

    I want to be able to have products that technically can be re-purchased to be replenished, such as game lives, just like in the arcades, or similar in-app currency mechanisms.

  2. #2
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Misunderstanding of the meaning of "Restorable Products"

    Hi foo_mark

    To flexibility in product handling you need to follow IAP non-DRM product protection model. Essential to that is having to implement your own product resource server. That is not big deal and BuyAndDownload example application you can find in the IAP SDK . That example consists of mobile client and server side . You, as the server owner, can control how long user can use bought product before he will have to buy it again. In that case Nokia provides you in-application purchase flow functionality and Purchase Ticket verification API .

    In contrary to non-DRM protection model , Nokia DRM model provides more functionality as ability to restore previously bought product automatically but you cannot control restoration because DRM protected resources are get accessible with using of license delivered on device after purchasing is done.

    So you are not correct saying :
    A restorable product is technically any IAP product that has been purchased by a user is flagged as "restorable".
    there is no any mark of it . There are two different models. Nokia store recognizes IAP application model during publishing process -- if you follow application directory structure convention
    \private\<appUID>\drm\data\resourceid_XXXXXX\<protected_resources>
    That is DRM protection model

  3. #3
    Registered User
    Join Date
    Dec 2011
    Posts
    33

    Re: Misunderstanding of the meaning of "Restorable Products"

    Hi izinin,

    I actually got my answer from some earlier response to a post on this forum about my problem.

    One of the problems, for the business model I am trying to attempt to do is that one of the IAP products technically can be repurchased, though in one of the threads, you mentioned that there is a behaviour for the system on the test server (set to "normal") will always yield a RESTORABLE status after attempting to make a 2nd or more purchase on the same item, regardless of the force restoration flag I set. Hence, why I had to ask the question about the definition.

    Originally, I thought this was part of Nokia's business model to only be able to have one product purchased available and unlimited number of restorations.

    I understand now that this might be a bug or intended behaviour of the system, since passing NO_FORCED_RESTORATION in the forceRestorationFlag doesn't force the system to re-purchase the IAP product in the test I am conducting in the emulator.

  4. #4
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Misunderstanding of the meaning of "Restorable Products"

    Hi

    You mentioned emulator so i conclude your question is related to S40 since Qt IAP does not support emulator.

    In my understanding NO_FORCED_RESTORATION flag value means that purchase call will not automatically transformed to restoreProduct call. PurchaseProduct call will return "restorable" status and then you can explicitly restore it by RestoreProduct call. Anyway DRM protected model will not allow you to implement multiple purchase of the same product , for that you need to follow non-DRM model. You can avoid using third-party resource server if you application logic is simple as forcing user to buy the same product all the time and you don't care about product protection -- i.e. there is nothing to extract from your application installation package for hacker.
    Please check design rules for user interaction flow

  5. #5
    Registered User
    Join Date
    Dec 2011
    Posts
    33

    Re: Misunderstanding of the meaning of "Restorable Products"

    Hi

    Just following up about the subject on Restoration,

    If it so happens that I attempt to purchase the product, and the "purchaseCompleted" callback status returns a RESTORABLE flag.
    Should I assume that the person has already made a valid purchase of the product and handover whatever the product that is, whether an item or map?
    OR should I call the "restoreProduct" method from "IAPClientPaymentManager" to attempt to restore the product inside of the "purchaseCompleted" callback?

    Thanks.

  6. #6
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Misunderstanding of the meaning of "Restorable Products"

    Hi

    There are two options either you can sequentially call "restoreProduct" from "purchaseCompleted" callback
    or
    make "purchaseProduct" call with IAPClientPaymentManager.FORCED_AUTOMATIC_RESTORATION the second parameter value

    FORCED_AUTOMATIC_RESTORATION results with the purchase request is automatically transformed to a restoration if item restoration is available.

  7. #7
    Registered User
    Join Date
    Dec 2011
    Posts
    33

    Re: Misunderstanding of the meaning of "Restorable Products"

    Okay, so in order to be a valid and legitimate restore, it definitely has to pass through the "restorationCompleted" callback with a status of "OK" (value: 1)?

    I tried the first scenario you described with the "restoreProduct(PRODUCT_ID, IAPClientPaymentManager
    .ONLY_IN_SILENT_AUTHENTICATION)" being called in the "purchaseCompleted" callback and I received a status code in the "restorationCompleted" callback with a status of "SERVER_ERROR" (value: -5).
    What exactly does that mean and what should I tell the user about?

    Also, I am assuming that if you do a purchaseProduct(PRODUCT_ID, IAPClientPaymentManager.FORCED_AUTOMATIC_RESTORATION), that the "restorationCompleted" callback would be called? Am I correct to assume this? Currently the behaviour of the system seems to always call "purchaseCompleted" callback.

    Thanks!

  8. #8
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Misunderstanding of the meaning of "Restorable Products"

    Hi

    Also, I am assuming that if you do a purchaseProduct(PRODUCT_ID, IAPClientPaymentManager.FORCED_AUTOMATIC_RESTORATION), that the "restorationCompleted" callback would be called?
    ... your assumption is incorrect : "restorationCompleted" callback will not be called, however if the item has been previously bought, the In-App Purchase API removes the DRM protection automatically and does not cause user money account charge. purchaseComplete callback will be invoked with status RESTORABLE (not OK!) .. so that status value shall be considered as success in you application logic

    As for calling sequentially "restoreProduct" from "purchaseCompleted" callback , i meant NO_FORCED_RESTORATION flag is used in initial call 'purchaseProduct' -- that approach should work but may you need that scenario to display a confirmation dialog in the middle to user whether he wants to download the item right now -- maybe downloading some big-sized items is more practical via WLAN or by some other reasons user wants to postpone the operation.

    In general, restoration is implemented as separate call to give developer ability to re-create previously paid items silently on the application start. Take for example items restoration after device factory reset. User shall not be forced to buy them or even select them to restore unless they are so big in size to download them via GPRS . Such use cases you can implement with restoration.

    Please note restoration does not work for non-DRM product protection model because it is related to product handling policy and with non-DRM developers can implement for example multiple purchasing of the same product or make restoration is time dependent --i.e. product subscription
    Last edited by izinin; 2012-06-08 at 09:45.

  9. #9
    Registered User
    Join Date
    Dec 2011
    Posts
    33

    Re: Misunderstanding of the meaning of "Restorable Products"

    Okay, considering that I want to have a few of my products restorable, but I find my game works perfectly without any requirement of a back-end server to manage the status.

    Could I simply use an unused DRM folder with absolutely nothing in it with IAP ID as the way to acquire restorable status on some of my products?

    Thanks.

  10. #10
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Misunderstanding of the meaning of "Restorable Products"

    Hi

    That will work , to ensure DRM model will be recognized by OVI correctly and there is a subject for licensing , you can put a text file to DRM folder. Reading that DRM encrypted file without error is the checking whether your product has been bought or not

  11. #11
    Registered User
    Join Date
    Dec 2011
    Posts
    33

    Re: Misunderstanding of the meaning of "Restorable Products"

    Alright, for extra clarification, considering that the failed scenario of accessing a DRM resource isn't documented in the JavaDoc I have been reading concerning the method .

    I would like to know what kind of error it would produce, so that my system can handle it.

    Like, if the DRM resource is being denied from access, should I expect it to throw out an exception? or is it just returning "null"?

    Thanks

  12. #12
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Misunderstanding of the meaning of "Restorable Products"

    Hi

    This method is used to read DRM protected file.
    Code:
    public java.io.InputStream IAPClientPaymentManager.getDRMResourceAsStream(java.lang.String name)
    It does not throw exception instead it returns 'null' in case of error or requested resource is not found -- i.e. does not produce any errors.

    Code:
    public void purchaseCompleted(int status, String purchaseTicket) {
        // Protected resource file
        String resourceFile = "/res/drm/data/resourceid_123456/resource.img";
        if (status == IAPClientPaymentListener.OK) {
            InputStream input = manager.getDRMResourceAsStream(resourceFile);
            if(input != null){
                    // Make the purchased content available to the user in the application UI
            }
        }
    }

  13. #13
    Registered User
    Join Date
    Sep 2012
    Posts
    16

    Re: Misunderstanding of the meaning of "Restorable Products"

    Hi
    how to set nokia in-app item not restorable? or

    Is there a way to set nokia in-app purchasble item as not restorable using nokia drm model in live mode? or I wanted to buy same item again and again using nokia drm model?


    And one more query: I'm testing my application in test mode set to purchase option shown as below:
    [testserver]
    testMode=purchase

    And my nokia account has master card details registered . But when i try to buy in-app item it just shows me operator billing and not other payment option. So could you help me with this? Why m not getting other payment option?

    Thanks
    Last edited by sandhyac; 2012-09-28 at 14:12.

  14. #14
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Misunderstanding of the meaning of "Restorable Products"

    Is there a way to set nokia in-app purchasble item as not restorable using nokia drm model in live mode? or I wanted to buy same item again and again using nokia drm model?
    You cannot implement multiple purchase with Nokia DRM model -- even if you set automatic restoration flag to false -- user will not be charged next time and you will get purchase status "RESTORABLE"

    Use non-DRM protection model to implement reccurrent purchases of the same product -- i.e. product subscription model implementation

    -----------------
    When you setup test mode such way :
    [testserver]
    testMode=purchase
    IAP pops up purchase dialog with only one dummy operator billing and not other payment option --- that is correct behaviour with IAP in test mode

  15. #15
    Registered User
    Join Date
    Sep 2012
    Posts
    16

    Re: Misunderstanding of the meaning of "Restorable Products"

    Okay.

    non-drm model means drm/data/ResourceId_xxxxxx directory should be missing from project folder. Right??

    Currently my project does not include drm/data directory. But than too if i try to hit "paymentManager.purchaseProduct(purchase_id,
    IAPClientPaymentManager.DEFAULT_AUTHENTICATION);" for any in-app item for second time. it gives callback that this is already purchased.




    so please help if m going wrong anywhere.

Similar Threads

  1. What's the meaning for the "diaglog" flags?
    By useryy in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-09-29, 10:37
  2. Replies: 1
    Last Post: 2009-05-14, 05:30
  3. Replies: 0
    Last Post: 2008-03-04, 08:39
  4. specific meaning of "Phonebook field type"
    By Atl antis in forum Symbian
    Replies: 0
    Last Post: 2007-04-23, 10:22
  5. What's the meaning of "AknIcon 3" panic
    By vacheldai in forum Symbian
    Replies: 1
    Last Post: 2007-02-04, 20:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×