locked
Help with consumable In App Purchases for Windows Metro Store RRS feed

  • Question

  • Hi guys...

    I am trying to set up the consumable in app purchases for my app, but I cant figure it out, so I may need some help / guidance, here, please...

    I started by putting the LicenseInformation licenseInformation = CurrentAppSimulator.LicenseInformation; at the beggining of the game... so I have the proxy.xml...

    Now, trying to follow the example on the page, I copied and pasted the 

    PurchaseResults purchaseResults = await CurrentAppSimulator.RequestProductPurchaseAsync("5GoldCoin");
                        switch (purchaseResults.Status)
                        {
                            case ProductPurchaseStatus.Succeeded:
                                product1TempTransactionId = purchaseResults.TransactionId;
    
                                // Grant the user their purchase here, and then pass the product ID and transaction ID to currentAppSimulator.reportConsumableFulfillment
                                // To indicate local fulfillment to the Windows Store.
                                break;
    
                            case ProductPurchaseStatus.NotFulfilled:
                                product1TempTransactionId = purchaseResults.TransactionId;
    
                                // First check for unfulfilled purchases and grant any unfulfilled purchases from an earlier transaction.
                                // Once products are fulfilled pass the product ID and transaction ID to currentAppSimulator.reportConsumableFulfillment
                                // To indicate local fulfillment to the Windows Store.
                                break;
                        }

    And that already marks erros in "await" and product1TempTransactionId

    So... can anyone help me out setting this up, please!!!!

    Thanks!

    Wednesday, September 3, 2014 5:09 AM

All replies

  • What errors are you getting? Is the function this is in marked async? Have you defined product1TempTransactionId?

    If you can upload a minimal sample demonstrating the problem to your OneDrive we may be able to provide more help.

    Thursday, September 4, 2014 12:16 AM
    Moderator