locked
IAP does not work RRS feed

  • Question

  • I have durable IAP in the Store with ProductID == "AdFree", see the screenshot below:

    In my C++ code "AdFree" product works with CurrentAppSimulator, but when I install the app from the Store it does not work with CurrentApp.

    In the C++ code I check if the IAP is active:

    typedef Windows::ApplicationModel::Store::CurrentApp StoreApp;
    
    	auto license = StoreApp::LicenseInformation;
    
    	auto product = license->ProductLicenses->Lookup("AdFree");
    
    	if (product->IsActive) { //do something };

    And if it is not I show Purchase dialog with the following code:

    auto request_task = create_task(StoreApp::RequestProductPurchaseAsync("AdFree")).then([this](PurchaseResults ^ results)

    probably I missed something in my code, but I do not see Purchase dialog, instead I get the following message box:


    what should I take a look at?

    similar post: http://stackoverflow.com/questions/34402180/in-app-purchase-trouble-on-windows-10-uwp

    EDIT1:

    I published a new version of the app in the Store with a TextBlock that shows the string returned by the following function:

    typedef Windows::ApplicationModel::Store::CurrentApp StoreApp;

    Concurrency::task<std::wstring> LoadLicenseInfo() { return create_task(StoreApp::LoadListingInformationAsync()) .then([](Windows::ApplicationModel::Store::ListingInformation ^ listing) { std::wostringstream out; auto name = listing->Name; out << L"Name: " << name->Data() << L" "; out << L"IAPs: "; bool first = true; for (auto p : listing->ProductListings) { if (first) { first = false; } else { out << L", "; } std::wstring key = p->Key->Data(); out << key; } if (first) { out << L"N/A"; } return out.str(); }); }


    The result is "Name: <AppName> N/A", it means that ListingInformation::ProductListings is empty.

    But anyone can open the beta version of my app in the Store and see that app has "AdFree" product. To install the app you need to activate promotional code. The app is free, so you can install it and test.




    • Edited by ShamanSoft Saturday, August 6, 2016 7:50 AM
    • Moved by Barry Wang Monday, August 8, 2016 6:26 AM
    Friday, August 5, 2016 8:37 AM

Answers

  • Hi Shamansoft,

    Since your app works well with CurrentAppSimulator,I think the issue may be related with the Store.

    Please double-check if the license ,product ID and other infomation in your XML file are the same as what they are in your Dashboard.

    Also,you may try to recreate a new item referring to this document:

    https://msdn.microsoft.com/en-us/windows/uwp/publish/iap-submissions.

    Or you could make updating IAP and submit to the Store(Someone used to solve the problem in this way):

    1. Create an update for the IAP
    2. Under Distribution and Visibility set the IAP to Not available for purchase
    3. Submit the update
    4. Wait for update to publish
    5. Create a new update for IAP
    6. Set Distribution and Visibility back to Available for purchase
    7. Submit the update
    8. Once this update publishes, retest the IAP

    Afterthat,if you are still stucking with this problem,you could ask for assistance here:

    https://developer.microsoft.com/en-us/windows/support.

    Best regards!

    • Marked as answer by ShamanSoft Thursday, August 18, 2016 8:37 PM
    Monday, August 8, 2016 9:43 AM

All replies

  • Hi ShamaSoft,

    Since your app works well with CurrentAppSimulor but have issues after install from the store. So it is store relative, we helped you move the case to Pulishing Apps.

    Thanks for understanding.


    Best Regards, Sunteen Wu


    • Edited by Sunteen Wu Monday, August 8, 2016 6:29 AM
    Monday, August 8, 2016 6:28 AM
  • I am getting the same message box if I run the app locally without submitting it to the Store. But today I noticed that the message box looks a bit differently than couple days before (probably something was changed after Windows update):


    What this CV:XXXXX means?

    • Edited by ShamanSoft Monday, August 8, 2016 7:19 AM
    Monday, August 8, 2016 7:15 AM
  • Hi Shamansoft,

    Since your app works well with CurrentAppSimulator,I think the issue may be related with the Store.

    Please double-check if the license ,product ID and other infomation in your XML file are the same as what they are in your Dashboard.

    Also,you may try to recreate a new item referring to this document:

    https://msdn.microsoft.com/en-us/windows/uwp/publish/iap-submissions.

    Or you could make updating IAP and submit to the Store(Someone used to solve the problem in this way):

    1. Create an update for the IAP
    2. Under Distribution and Visibility set the IAP to Not available for purchase
    3. Submit the update
    4. Wait for update to publish
    5. Create a new update for IAP
    6. Set Distribution and Visibility back to Available for purchase
    7. Submit the update
    8. Once this update publishes, retest the IAP

    Afterthat,if you are still stucking with this problem,you could ask for assistance here:

    https://developer.microsoft.com/en-us/windows/support.

    Best regards!

    • Marked as answer by ShamanSoft Thursday, August 18, 2016 8:37 PM
    Monday, August 8, 2016 9:43 AM
  • I made all the steps but with no success. Then I made steps 1, 2, 3 again and the IAP status changed to "Unavailable in the Store", but the IAP is still listed with my app (there is "+Contains in-app purchases" under "Get the game" button"). If I click "Get the game" button I still can see the IAP in "top and new in-app purchases" section. Does it indicate some Store glitch or it can be explained somehow?



    • Edited by ShamanSoft Monday, August 8, 2016 9:06 PM
    Monday, August 8, 2016 9:05 PM
  • I do know why, but looks like it started to works somehow.
    Thursday, August 18, 2016 8:37 PM