In App Purchase working from my local build but not from the Windows Store ! RRS feed

  • Question

  • I just implemented an In App Purchase in one of my free apps. Using the simulator worked ok. After adding the IAP in the dashboard, and using the CurrentApp class, when I called CurrentApp::RequestProductPurchaseAsync it used to display a green dialog with "Checking price" and then saying the product is unavailable. I assume that's what it should happen anyway since the new release wasn't live yet.

    I now see my app passed certification pretty quickly ( ~12 hours ) which is definitely a good thing but my IAP doesn't work if I uninstall my release build, download the app from the store and try to purchase the IAP. Right at the CurrentApp::RequestProductPurchaseAsync nothing appears. No green dialog.

    Now I went back to run my local build on release (which would be identical to the app package from the Windows Store) and now I get a green dialog and it even tells me the product description and price and asks me to buy it, which I can if I click Buy.

    App Link : Relative Benchmark

    So what's going on here ? With local builds it works fine, but downloading it from the store feels different, what gives ? :/

    UPDATE : The problem is related to whether the debugger is attached or not. Without the attached debugger, I get the same "nothing happens" behavior. This happens when calling CurrentApp::RequestProductPurchaseAsync from a message dialog. I assume internally it creates another message dialog and because it doesn't know another message dialog is visible and Windows 8 doesn't want 2 visible dialog messages at the same time, it just pre-cancels the second one...

    SOLVED !

    I think I got it, the problem was that I was calling CurrentApp::RequestProductPurchaseAsync from a callback of a message dialog. I think CurrentApp::RequestProductPurchaseAsync only wants to be called from the main/UI thread. This should probably go to the documentation page...


    Friday, November 15, 2013 11:54 AM