question

Andrea avatar image
Andrea asked

Start Purchase Array solution

I have a problem with Ue4, I'm developing payment from store with real Money, what should I put in Array in start purchase? It always gives me error, is it possible to see an example or solution ? thank you and sorry for my english

immagine.jpg (419.0 KiB)
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.

Andrea avatar image Andrea commented ·
0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

If you hover the mouse on the node, you may find that the type of variables that you are handling with is PlayFab JSON object, even the array is an array of PlayFab JSON object. The question is how to construct a PlayFab JSON object, which is provided in our SDK.You are able to craft all of them in the same Graph, but my suggestion is to create a function for certain JSON object.

For example, in the request of UpdatePlayerStatistics, a list of StatisticUpdate[] is required. Meanwhile in UE4, it should be an array of StatisticUpdate Json Object and according to the API documentation:StatisticUpdate contains 2 required properties, which are

StatisticName and Value. Hence you can create a PlayFab JSON object Variable and write a set function:

Then in the Graph you will be able to input required Statistics and Value:


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.

Seth Du avatar image Seth Du ♦ commented ·

I also craft a function for ItemPurchaseRequest that you may refer to:

In the Graph:

The most important thing is to check the API documentation, if there is structured property, like lists, you need to use this method.

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.