I'm trying to use EconomyV2 to create an in-game store with google play integration.
This is the item registered in the Play Console:
This is the item registered at Playfab (it's a bundle) which, when purchased, must apply diamonds to the player.
I'm implementing the IDtailedStoreListener interface and in the ProcessPurchase method I'm writing the following code, based on PlayFab's documentation.
GooglePurchase googleReceipt = GooglePurchase.FromJson(purchaseEvent.purchasedProduct.receipt);
I always get feedback that the purchase was successful, but the response has an error and the diamonds are not added to the inventory.
The game is published as an internal test only for testing purposes and the google addon is connected to playfab with all the data.
I would like to know if I'm doing something wrong and how I could debug the error that comes from the response since I can't see the log. I tried looking in PlayFab's data area, but no event fires.
RedeemGooglePlayInventoryItemsRequest request = new RedeemGooglePlayInventoryItemsRequest()
{
Purchases = new List<GooglePlayProductPurchase>
{
new GooglePlayProductPurchase
{
Token = googleReceipt.PayloadData.signature,
ProductId = googleReceipt.PayloadData.JsonData.productId
}
}
};
PlayFabResult<RedeemGooglePlayInventoryItemsResponse> response = await PlayFabEconomyAPI.RedeemGooglePlayInventoryItemsAsync(request);
if (response.Error != null)
{
Debug.Log(response.Error.ErrorMessage);
PopupPurchaseFailed.Instance.Open();
return;
}
PopupPurchaseSuccess.Instance.Open();
I always get feedback that the purchase was successful, but the response has an error and the diamonds are not added to the inventory.
The game is published as an internal test only for testing purposes and the google addon is connected to playfab with all the data.
I would like to know if I'm doing something wrong and how I could debug the error that comes from the response since I can't see the log. I tried looking in PlayFab's data area, but no event fires.