locked
In app purchasing not working - completes transaction, but doesn't enable purchased items RRS feed

  • Question

  • Same variables but why are they different? 2 variables are referring the same

    My in-app purchasing experience is not working. I have set 2 variables but after a customer purchases a book, the transaction is processed but the bought items is not “lit up.” It worked when I had set the CurrentAppSimulator.LicenseInformation in my dev environment, but now that’s live and I removed the “Simulator” it doesn’t work. Any clues? Thank you.

    Store:

               //execute buy:

                if (!BookBuy.pandabuy.ProductLicenses[featuretobuy].IsActive)

                {

                    try

                    {

                        // The customer doesn't own this feature, so

                        // show the purchase dialog.

                       

                        await CurrentApp.RequestProductPurchaseAsync(featuretobuy, false);

                 //       var messageDialog = new MessageDialog("Yippie!! You just got " + booktitle +"!");

                       

                 //       messageDialog.Commands.Add(new UICommand(

                 //           "Close", (command)=> {}

                 //           ));

                 //       await messageDialog.ShowAsync();

                        // the in-app purchase was successful

                        //need to check if feature actually purchased

                    }

                    catch (Exception)

                    {

                        // The in-app purchase was not completed because

                        // an error occurred.

                        var result = new MessageDialog("There was an issue with your purchase. Please try again later");

                    }

                }

                else

                {

                    // The customer already owns this feature.

                }

            }

    In my data source I set:

           public SampleDataSource()

            {

                String ITEM_CONTENT = "";

                //Store local data of books

                Windows.Storage.ApplicationDataCompositeValue Believe = new Windows.Storage.ApplicationDataCompositeValue();

                if (BookBuy.pandabuy.ProductLicenses["Believe"].IsActive)

                {

                    Believe["notBought"] = "false";

                }

                else

                {

                    Believe["notBought"] = "true";

                }

                Believe["timesread"] = 1;


    Sela Gu

    Friday, August 9, 2013 8:00 AM

Answers

  • This is hard to debug without actually being able to debug it.  Does it work fine in development, just not in the Store?  You may want to open a support case so we can test this out properly.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, August 9, 2013 6:26 PM
    Moderator

All replies

  • This is hard to debug without actually being able to debug it.  Does it work fine in development, just not in the Store?  You may want to open a support case so we can test this out properly.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, August 9, 2013 6:26 PM
    Moderator
  • Thanks Matt. I'll email it to you (I'm at MS as well).

    Sela Gu

    Friday, August 9, 2013 8:17 PM