question

Alex Girgis avatar image
Alex Girgis asked

IAP Guides,Game IAP guides

,

Hi Guys,

I'm having trouble finding any detailed guides or code explaining how to setup IAP with virtual currency within unity, and also how to setup real money purchasing of of virtual currency within unity.

Basically I just want players to be able to unlock characters by paying with virtual currency. And Obviously I want players to be able to purchase virtual currency with real money (processed through apple play store). Can anyone point me to guides that show the actual code setup in unity for both of these things?

I have used this but but I'm not sure how to actually setup the code for GetCatalogItems mentioned here:https://docs.microsoft.com/en-us/gaming/playfab/features/commerce/economy/quickstart

Thanks!

10 |1200

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

Rick Chen avatar image
Rick Chen answered

This document Getting started with PlayFab, Unity IAP, and Android describes setting up the Unity IAP with Android. Currently there is no document in PlayFab that describing setting up IAP with apple App store. You could mimic most of the code from the Android example in the document and call the relevant PlayFab APIs. You could search for how to set up the app store and then use the ValidateIOSReceipt API to process the purchase with PlayFab. You could also find the GetCatalogItems code in the Android example code.

10 |1200

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

Alex Girgis avatar image
Alex Girgis answered

Thanks I think I got it. I didn't realise playfab wasn't really involved in the payment processing at all until after the purcahse was successful.

1 comment
10 |1200

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

Rick Chen avatar image Rick Chen ♦ commented ·

I am glad that helps.

0 Likes 0 ·

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.