question

lu.zhang@sectionstudios.com avatar image
lu.zhang@sectionstudios.com asked

What function should I call to buy real money items through IOS Platform?

I saw the post that mentioned to use "StartPurchase", "PayForPurchase" and "ConfirmPurchase" to perform a regular cart-payment-delivery purchasing process. However, if I just want to let player buy some item directly through IOS platform, what functions shall I call? The purchasing process doesn't require the cart and will use iTunes. 

10 |1200

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

1 Answer

·
brendan avatar image
brendan answered

All in-app purchasing (IAP) for iOS devices must be through Apple's store (iTunes) directly. What the store provides your client with in return is a receipt which must be validated before the digital goods are delivered to the user. In PlayFab, you would do this via the ValidateIOSReceipt method. When validating a receipt, PlayFab takes care of confirming with Apple that the receipt is valid, checking that it has not been used already and that it is for the game in question, and then adds the item to the player's inventory. That last step is done by matching the Product ID in the receipt to the Item ID in the game's catalog, so it's important to make sure that they match. This process ensures that players cannot cheat the game with receipts from other games, replaying used receipts, etc.

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.