AeroGameFramework is a Roblox game framework that makes development easy and fun. The framework is designed to simplify the communication between modules and seamlessly bridge the gap between the server and client.
Do not return PurchaseGranted if the product could not be granted.
AeroGameFramework does not allow this with the current implementation. There are many use cases for not returning PurchaseGranted. One use case is for starter packs with a timer on them. You need to be able to return NotProcessedYet if the starter pack was already purchased or if the starter pack expires. Another use case if for round based games where players can purchase boosts before the round begins. You need to be able to return NotProcessedYet if the round starts before the player purchases it.
I think something like StoreService:RegisterProductCallback(productId: number, callbackFunction: (player, receiptInfo) => Enum.ProductPurchaseDecision) would solve this. The current StoreService.PromptPurchaseFinished event would still fire even if a product callback is registered for the product to allow for analytics, such as sending the data to GameAnalytics or Google Analytics.
On the Roblox Developer Hub, it says
AeroGameFramework does not allow this with the current implementation. There are many use cases for not returning PurchaseGranted. One use case is for starter packs with a timer on them. You need to be able to return NotProcessedYet if the starter pack was already purchased or if the starter pack expires. Another use case if for round based games where players can purchase boosts before the round begins. You need to be able to return NotProcessedYet if the round starts before the player purchases it.
I think something like
StoreService:RegisterProductCallback(productId: number, callbackFunction: (player, receiptInfo) => Enum.ProductPurchaseDecision)
would solve this. The currentStoreService.PromptPurchaseFinished
event would still fire even if a product callback is registered for the product to allow for analytics, such as sending the data to GameAnalytics or Google Analytics.