Hello everyone.
So i tried adding in-app purchases into my android game, but it is not working.
I had it first implemented it with the code posted here, and following the steps:
then i published the game in alpha and tried it(not with my developer account).
I then created a brand new project, following the same steps, still not working.
i tried implementing in the new project with the unity codeless solution, still nothing.
As far as i can tell
void BuyProductID(string productId)
{
// If Purchasing has been initialized ...
if (IsInitialized())
{
// ... look up the Product reference with the general product identifier and the Purchasing
// system's products collection.
Product product = m_StoreController.products.WithID(productId);
// If the look up found a product for this device's store and that product is ready to be sold ...
if (product != null && product.availableToPurchase)
{
Debug.Log(string.Format("Purchasing product asychronously: '{0}'", product.definition.id));
// ... buy the product. Expect a response either through ProcessPurchase or OnPurchaseFailed
// asynchronously.
m_StoreController.InitiatePurchase(product);
}
// Otherwise ...
else
{
// ... report the product look-up failure situation
Debug.Log("BuyProductID: FAIL. Not purchasing product, either is not found or is not available for purchase");
}
}
when this is called by the botton the " if (product != null && product.availableToPurchase)" returns true, and then nothing happens. I suspect the ProcessPurchase(PurchaseEventArgs args) is not being called at all.
Your help would be really appreciated, and thanks in advance.