question

Lars Krakhecke avatar image
Lars Krakhecke asked

InApp Purchases and Validation

Hello there,

I'm heavily confused at the moment, I'm developing my first game using playfab as backend and I'm stuck at purchases & validation.

I'm using OpenIAB to make the purchase and want to send the receipt to playfab for validation. When using ValidateGooglePlayPurchaseRequest and ValidateIOSReceiptRequest I want to/have to pass the currency code and the actual purchase price to those requests, but I have no idea where to get them. Do I somehow get them from google/apple when making the purchase? Because I can't find any of this information in the purchase object I receive after purchasing with OpenIAB.

Also after successfully validating the receipt, I have to consume the item in my inventory in the callback method if selling one-time consumables, is that correct?

Hope you can clarify that for me.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

In the case of OpenIAB, the prices are in the SkuDetails. You'll need to keep that info around, so that you can pass it to us with the receipt, as the receipt doesn't contain that info.

Once you have purchased the item, you shouldn't need to consume anything. If you're creating a bundle that delivers virtual currency to the player, you can just set it to expire after a couple of seconds (Usage Period).

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lars Krakhecke avatar image
Lars Krakhecke answered

Am I correct that the SkuDetails are accessible after a purchase is completed by OpenIAB by querrying the inventory and then on the inventory item through the getskudetails(skuFromPurchaseObject) method and then passing the pricevalue and currencycode values over to you guys at playfab?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

That's really a question for the OpenIAB developers/community. My understanding is that that's correct, but they would be the best people to advise on this, as we don't own that product.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lars Krakhecke avatar image
Lars Krakhecke answered

Thanks brendanv, your help is appreciated :)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.