question

dividerdev avatar image
dividerdev asked

Google Addon and In App Purchases in Unreal Engine 5

Hello, i'd like some clarification regarding the purchase flow for IAPs via Google Play Console and the PlayFab.

I've set up the Google addon on my PlayFab account with the Google App Package ID and my Google App License Key. Inside Unreal Engine if i call the native Node "MakeinAppPurchase V2" and fill in the ItemID from my Google Play Console i get the popup to continue to the purchase, using a test card the transaction returns successful, but then what? I need this return to grant the item to the User on the PlayFab side of things. If i use PlayFab's MakePurchase node in Unreal Engine instead of the native node, i don't get the Google pop up about payment, nothing happens basically.

I've read the documentation for Unity and various other forum threads but i couldn't get a clear answer about the correct workflow, please give me some details / information regarding this. Also can you please explain what the point is of the Google Addon if i still need to use unrelated PlayFab nodes inside the Engine in order to facilitate the payment..

PS: One workaround i've found is that after the Test payment is confirmed by using the Unreal Engine's native nodes, i can just use "GrantUserItem" node and just give them item they were supposed to buy through Playfab, but this way i don't have a transaction history and i kinda need it. Please help out a little bit. Thanks!

apis
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

·
Xiao Zha avatar image
Xiao Zha answered

Which version of PlayFab Economy feature you are using?

If you want to use Google Play payment service in Economy V1, after purchase successfully, you may get the receipt from Google, then you may call ValidateGooglePlayPurchase API which will not only validate the receipt but will also grant player corresponding items. In this process, the Google Addon is used to integrate with the Google Billing API to validate the receipt. As for using unrelated PlayFab nodes in the purchase part to facilitate payment, as long as you can use the UE function to obtain the Google receipt which required for the ValidateGooglePlayPurchase API, there will be no problem. Also, you may refer to PlayMarket application for IAP - PlayFab | Microsoft Learn to set up your PlayMarket application for IAP and refer to Setting up a PlayFab title - PlayFab | Microsoft Learn to set up your PlayFab title.

In addition, PlayFab's MakePurchase nodes such as StartPurchase, PayForPurchase, ConfirmPurchse are used for non-receipt payment processing which different from Google Play Payment service.

For Economy V2 Validate Google Play Purchase, you may refer to How to setup Validate Google Play Purchase - Economy V2 - Playfab Community.

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.