question

ejr avatar image
ejr asked

GetUserInventory not working

Steps:

1.Player is authenticated

2. I start purchase via PayPal and finalize it. Before finalizing I close my game

3. I restart game again.

4. I call GetUserInventor, it returns OK (200) code, but 0 items in the inventory.

I can see that player has already an item (with "Initialized") status.

What Initialized means? Why it never succeed?

Title: 660E, Player id: 5D083B9C589B8674 or D55009DD0793B993 (the same problem)

Is it any Paypal error?

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

Apologies, but I've had to remove the previous answer as it was incorrect and I didn't want to have any confusion on this. This tutorial is the best source of information on our non-receipt validation purchasing integrations, including PayPal:

https://docs.microsoft.com/en-us/gaming/playfab/features/commerce/economy/non-receipt-payment-processing

What's happened in your case is that the app hasn't completed the purchasing process with PayPal. Specifically, it still needs to call ConfirmPurchase, for the player to get the items automatically (and securely) added to their inventory. So a best practice is to store the Order ID locally during the purchase process, so that if you need to you can finalize it the next time the app starts.

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.