Reputation: 33
I use PlayFabEconomyAPI.RedeemGooglePlayInventoryItems to redeem android in-app purchase in PlayFab Economy v2. Everything is working great for iOS version, but I have issues with Google Play. Product id is "1000_diamonds" - I am sure it's the same in Google Play and in PlayFab "marketplace mapping" (for "GooglePlay" key name) for the bundle I'm trying to purchase. Google Play shows the purchase window and I receive the receipt to my email, but the problem is I can't redeem it on PlayFab side, the error I get:
Inventory/RedeemGooglePlayInventoryItems: Marketplace API 'PurchasesProductsGet" in environment "Production" returned HTTP status code 400, error code 400 and error message "Invalid Value" for AlternateId "1000_diamonds".
the request:
RedeemGooglePlayInventoryItemsRequest request = new()
{
Purchases = new List<GooglePlayProductPurchase> {
new GooglePlayProductPurchase() {
ProductId = purchasePayload.PayloadData?.JsonData?.productId,
Token = purchasePayload.PayloadData?.signature
}
}
I see in logs purchasePayload.PayloadData?.JsonData?.productId
is "1000_diamonds" and the token is not empty.
In Google Cloud Platform account I see ProductPurchasesService.Get
has requests with 100% errors. Do you have an idea what can be wrong? I created OAuth client (web application/android) and service account and set it in Playfab settings, I granted rights and added to Google Play users, I even turned on Google Play Services and I see the "login" window in the game for that service. Thank you!
I tried to re-create and re-setup almost everything, tried to include "entity" into the redeem request. I expect redeem function to work and grant player the item he is trying to purchase.
Upvotes: 1
Views: 310