Make PromptGamePassPurchaseFinished work in Team Test

Reproduction Steps
Test purchases do not work when Team Testing in Roblox Studio.

MarketplaceService:PromptGamePassPurchaseFinished always returns false, despite actually simulating a purchase in the team test environment. It is helpful to test gamepasses in Team Tests as they can be tested in an environment with multiple developers.

For accurate behavior, running a game in Play Solo and purchasing a gamepass, and then another in Team Test and the issue becomes obvious. In Play Solo, mock purchases go through, and in Team Test, they do not.

Expected Behavior
In Team Test, mock purchases should have isPurchased argument set to true so that code can behave as if a purchase was done.

Actual Behavior
isPurchased returns false, regardless of purchase status.

Issue Area: Studio
Issue Type: Other
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2022-01-22 00:01:00 (-06:00)
Date Last Experienced: 2022-01-23 00:01:00 (-06:00)

6 Likes

Hello! Thanks for the report! I have filed an internal ticket.

3 Likes

Thank you. As a side note, the same occurs with DevProducts last I checked.

Bumping this as I just experienced this while testing gamepass purchase handling in my game.

In addition, wasPurchased seems to always return false on the server in Team Test, but returns its correct value on the client in the same Team Test session.

image
image

1 Like

I am still experiencing this issue.

Reproduction steps:

local MarketplaceService = game:GetService("MarketplaceService")

MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, gamePassId, wasPurchased)
	print(`player: {player}`)
	print(`gamePassId: {gamePassId}`)
	print(`wasPurchased: {wasPurchased}`)
end)

Upon purchasing a gamepass in a team test session, wasPurchased will return a “false” boolValue.
The expected behaviour is that it returns “true”, as the purchase was in fact completed.

The video below displays a normal, non team-test session.


You’re clearly able to see the “wasPurchased” variable returned true.

The video below displays a team-test session


In this example, you can clearly see the “wasPurchased” variable returned false, yet the purchase went through.

The behaviour of this event callback is not identical on all client types, which is quite frustrating considering some gamepass features such as gifting, need to be team tested.

I have made a copy of the recorded place. To reproduce the issue properly, please change the “gamepassId” variable to a valid GamePass Id, this variable is located in StarterGui → ScreenGui → TextButton → LocalScript.
Team Test - Gamepass Issue.rbxl (59.7 KB)

This behaviour seems persistent across Developer Products as well.

1 Like