locked
In-app purchasing problem RRS feed

  • Question

  • Hi

    I’ve been using the InAppPurchaseHelper helper class posted by Jerry Nixon (http://codepaste.net/rqwtcy) to implement an in-app purchase, and I was wondering if anyone could advise on a problem I’m having.

    I tested the in-app purchase exhaustively in simulate mode before submission and everything worked. It was accepted into the store, but when I downloaded the app from the store (onto a clean machine using a different live id) to test it, the in-app purchase wasn’t working. 
     
    When the user requests the purchase, before making the call to InAppPurchaseHelper.Purchase(), I display a message box showing the price (Using FormattedPrice), and this field was empty. This all I’ve got to go on at the moment, but my hunch is that it may not be finding any product licenses in InAppPurchaseHelper.Setup(). I’m sure that I’m using the same product id in my code that I submitted in the app submission, so I’m not sure if the problem is on my side, or if the product id possibly hasn’t been set up on the store side.
     
    I was at a bit of a loss as to how to verify that it actually wasn’t finding the product license, since if I use my development version, that’s the one that’s installed rather than the Windows Store one, so I wasn’t sure if the license picked up would be the right one. The only other thing I could think to do would be to increase the amount of diagnostic information displayed when
    the in-app purchase fails, and resubmit the app.
     
    That’s where I am at the moment, and I’m waiting for the resubmitted app to be accepted. One of my problems is that I’m not sure who to approach at Microsoft to try and get a resolution to this. I’ve tried contacting app submission/certification support, but they seem to see it as a technical problem outside their scope. Does anyone know who I would contact to verify if
    the in-app purchase license (i.e. the product id) has been set up properly on the Windows Store side?
    Friday, November 29, 2013 11:39 AM

Answers

All replies

  • Hi RobertHF,

    I think you did not modify the "simulate = false" before you submitting the app, am I right?

    CurrentAppSimulator is only for test purpose, while uploading to the store, you have to change it back to CurrentApp, which you should set simulate as false in the code.

    BTW, ask the code owner might be better than ask here, because we do not officially support third party code.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, December 2, 2013 5:30 AM
    Moderator
  • Hi,

    Although I didn't mention it explicitly in my post, I am sure that that I set "simulate" to false before submitting the app.

    With regard to it being third party code, Jerry Nixon, who posted it, is a Microsoft employee who says here:

    http://stackoverflow.com/questions/15009624/can-i-test-real-in-app-purchases-before-submitting-to-the-store

    that the code has been validated with the IAP product team. I'm saying this just to mention that the code has some pedigree, not to claim that I expect it to work as a product.

    Even though I'm using this helper class, maybe I complicated things by mentioning it at all. I mentioned it to demonstrate that I'm taking a tried and structured approach to in-app purchasing, but it seems to have had the opposite effect.

    The helper class is a very thin wrapper around the in-app purchasing APIs, similar to something that anyone would have written to wrap the api calls.  I'm not seeking support for the helper class, but the underlying API calls. So when I said that I thought it wasn't finding product licenses in InAppPurchaseHelper.Setup(), I should have said that my suspicion was that CurrentApp.LicenseInformation.ProductLicences list had a count of 0.

    I still have this problem. Any further advice would be much appreciated.

     

    Monday, December 2, 2013 11:34 AM
  • Hi,

    Just an update to this issue, I think I may have found the problem.

    According to this:

    http://social.msdn.microsoft.com/Forums/windowsapps/en-US/51847a57-297e-40ea-b2b6-4212315c524d/licenseinformationproductlicenses-documentation-wrong

    there was a problem with the documentation for CurrentApp.LicenseInformation.ProductLicenses, in that it doesn't actually contain a list of the products that can be purchased. The InAppPurchaseHelper class I'm using is assuming that it does. Before the purchase goes ahead, it checks ProductLicenses and fails if it doesn't find the product id in ProductLicenses.

    I've removed this check and resubmitted the app. I'm hopeful it will work now.

    • Proposed as answer by Jamles HezModerator Monday, December 9, 2013 5:12 AM
    • Marked as answer by RobertHF Monday, December 9, 2013 5:07 PM
    Thursday, December 5, 2013 1:04 PM
  • Hi RobertHF,

    Ok, great! Thanks for sharing that with us, let's see if you can succeed with the result, or I will try to involve some experts to look it for you.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, December 6, 2013 7:02 AM
    Moderator
  • Hi,

    The in-app purchase in the resubmitted app is working now.

    Monday, December 9, 2013 5:06 PM