question

Hibnu Hishath avatar image
Hibnu Hishath asked

Player purchased an item bundle but the contents weren't given to the player

In a project that I'm working on I was doing a test purchase for $1 using PayPal. It was a bundle that should grant players 100 virtual currency and the bundle consumes after 3 seconds.

According to the test-player event history, the purchase was made at 5:45, and in the purchases tab, the payment was confirmed at 5:45. Then I looked at the inventory where I saw that a bundle was created at 5:45 and expired at 5:45 (assuming its the 3 seconds).

The issue is that the contents of the bundle (100 virtual currency) weren't granted to the player. The event history doesn't show that a bundle was added, nor does it show a change in virtual currency.

Later at 7:00, I tried to grant the player this bundle using the game manager. This bundle was registered in the event history as being added, and a change in virtual currency by 100 was indicated. I later pressed revoke on this bundle to test/understand what it did.

Another important detail is that, as of writing this post, I wasn't charged any money from my personal Paypal account nor do I see any amount in my business Paypal account. If that's the case why the item wasn't added to the inventory, why does a successful purchase is shown at 5:45 in the purchase tab?

I don't understand this behavior and any form of help is really appreciated.

Screenshots to help:

Purchase Tab

Event History

apisIn-Game EconomyPartner Add-onsPlayer Inventorysupport
purchase.png (36.3 KiB)
event-history.png (203.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.

Hibnu Hishath avatar image Hibnu Hishath commented ·

Inventory

Item bundle in question

0 Likes 0 ·
inventory.png (82.6 KiB)
item-bundle.png (118.7 KiB)

1 Answer

·
brendan avatar image
brendan answered

Because the player didn't actually pay for the purchase. If they had, there would be a player_realmoney_purchcase event (https://docs.microsoft.com/en-us/gaming/playfab/api-references/events/player-realmoney-purchase). The non-receipt purchase flow has three API calls - StartPurchase, PayForPurchase, and ConfirmPurchase (https://docs.microsoft.com/en-us/gaming/playfab/features/commerce/economy/non-receipt-payment-processing). The player_paid_for_purchase event can be somewhat confusing, since it is fired by the PayForPurchase step in the flow. If you review the non-receipt payment processing guide above, you'll see that depending on the payment processor, the actual payment may or may not be made at that point. In the case of PayPal, all we're doing at that point is completing the setup of the payment in their service so that you can send the player to the page to finalize their purchase. Only once they've done so will ConfirmPurchase result in the player_realmoney_purchase event - which is the only one you should rely upon to decide whether a player has paid for an item (if it's a purchase that requires a real money payment).

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.

Hibnu Hishath avatar image Hibnu Hishath commented ·

Hey Brendan, just a quick follow up / making things clear. What does "succeeded" in the purchase tab mean? Does it just mean that the transaction loop was completed, and it doesn't indicate whether the real-money purchase was successful or not?

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.