locked
In App Purchase

    Question

  • My app supports in-app purchases and all seem to being working until I made an update. Know the In-App items all seem to be un-locked. I've created several test accounts, download the app and all functions are available? The check I'm performing is CurrentApp.LicenseInformation.ProductLicenses["id"].IsActive and everyone one of my items is unlocked and I did not purchase any. Can someone please help?

    Here's the code snippet which perform the purchase, I perform a check to see if the item has already been purchased before proceeding and every time is indicates I already own the item:

    privateasyncvoidbuyProductUsingId( Stringid, Stringdesc, IAppPurchaseNotifyuser ) {

    #ifSIMULATOR

    LicenseInformationlicenseInformation = CurrentAppSimulator.LicenseInformation;

    #else

    LicenseInformation licenseInformation = CurrentApp.LicenseInformation;

    #endif

    if( !licenseInformation.ProductLicenses [id].IsActive ) {

    try{

    #ifSIMULATOR

    PurchaseResultspurchaseResults = awaitCurrentAppSimulator.RequestProductPurchaseAsync( id );

    #else

    PurchaseResults purchaseResults = await CurrentApp.RequestProductPurchaseAsync( id );

    #endif

    // if ( isProductPurchased( id ) ) {

    if( licenseInformation.ProductLicenses [id].IsActive ) {

    ApplicationData.Current.RoamingSettings.Values [id] = purchaseResults.ReceiptXml;

    user.notifyUser( "Congratulations on your purchase of "+ desc , id );

    } else{

    user.notifyUser( "Error, unable to purchase \""+ desc + "\"", id );

    }

    } catch( Exception) {

    user.notifyUser( "Error, unable to purchase \""+ desc + "\", please check your internet connection", id );

    }

    } else{

    user.notifyUser( "You already own "+ desc, id );

    }

    }

    Tuesday, January 6, 2015 4:58 PM

Answers

  • Hi,

    You codes seem to be right. Do you use another computer to download the app from windows store and install it? The development computer which performed some debugging(installing the debug version of your app) may affect the result. Also, before testing, you can try to sign with a different account to ensure that your developer account won't affect the behavior.

    Please update the result in the forum after you tested.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Thursday, January 8, 2015 5:42 AM

All replies

  • Hi,

    You codes seem to be right. Do you use another computer to download the app from windows store and install it? The development computer which performed some debugging(installing the debug version of your app) may affect the result. Also, before testing, you can try to sign with a different account to ensure that your developer account won't affect the behavior.

    Please update the result in the forum after you tested.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Thursday, January 8, 2015 5:42 AM
  • Hi,

    Would you use another computer to test the problem? Does the error be solved? Please update the result in the forum!

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Thursday, February 5, 2015 7:52 AM