IAPs - receiving receipts on my own dev account test purchases

Good evening/morning. Firstly, I'm sorry if this has been asked already. I've done some searches but not found anything.

I'm just submitting a game now. When testing the single IAP I have (an entitlement that just upgrades to all levels unlocked) I've had success processing a test payment for the SKU. However I also have a "Restore previous purchases" button which gets a list of receipts and in the complete handler for that does this:

public void OuyaGetReceiptsOnSuccess(List<OuyaSDK.Receipt> receipts)

 {

        m_receipts.Clear();

        foreach (OuyaSDK.Receipt receipt in receipts)

        {

            m_receipts.Add(receipt);

if (receipt.getIdentifier() == m_products[0].getIdentifier())

{

// Only 1 product so we're unlocked

//... code to unlock full game goes here.

purchaseStatus = PURCHASE_COMPLETE;

}

        }

if (purchaseStatus != PURCHASE_COMPLETE)

{

if (m_receipts.Count == 0)

{

myErrorString = "No receipts in array";

}

else

{

myErrorString = m_receipts[0].getIdentifier() + ", " + m_products[0].getIdentifier();

}

purchaseStatus = ERROR;

}

    }




As you can see it's based on the IAP example from the ouya package. However, even when this function is called indicating a success, there are never any receipts in the list, even if I have already purchased the upgrade,

I was wondering if this is because the purchases are test purchases on my own account so won't generate receipts on the system? If this is the case then how should we test such restore functionality? I've submitted the game based on the above assumption, will hold back from publishing and fix if that's not the case.

Secondly, if someone tries to buy an entitlement a second time, will the Ouya system charge them again, or does it pick up that you've already bought this item (as with the Apple IAP system) and refuse to charge you again? 

Many thanks for your help.


Tim


Comments

Sign In or Register to comment.