That’s a weird approach, won’t it prompt each one of those, and have to manually be accepted? You should just do tiers of payments. Eg. 10 robux, 50, 100, 250, 500, 800, 1000, 2500, 5000, 10000
No inputed amount, just different tiers that the player can select. Exactly how much will prompt up 10 different payment boxes (correct me if this does not happen), confusing the player as it would look like he/she is making multiple payments.
Successfully handled products are not handled again.
As for your last question, what I meant by making the functions yield was that you do something like this:
local completed, cancelled
-- do something to retrieve the current value or update values with a remote event or something
repeat wait() until completed
if cancelled then
return NotProcessedYet -- shortened
else
return PurchaseGranted
end
What I do now is I have a list that fills up with receipts for the user.
The list is cleared when purchases fail or complete.
It checks the list to see if the product is part of the purchase sequence and if it was granted then it would grant the purchase
Yep, that’s fine, my issue is with returning NotProceessed yet. As I said, unless the server gets sent information by the client real quick, NotProcessedYet will be returned – but if it is the last purchase, then the callback will not update the state to PurchaseGranted (as even if the client makes the decision to go forward with the purchase, the server won’t get updated in time before the final ProcessReceipt callback runs).
Yes but what is the frequency of those calls? Because if it is low (if they aren’t called very often) the donator could leave the server (making it shutdown automatically) and as a result the purchases may not get processed within 3 days.
Imagine a car that beeps every five minutes while being driven. When the person gets out of the car, the beeping stops. The beeping has a fairly low frequency, as it happens once every 5 minutes. If it had a higher frequency, it might happen once every 5 seconds. The beeping is the ProcessReceipt callback being fired, and the car is the server. The callback can only be fired when the car (server) is running, but it needs meet a “quota” of beeps after the person stops driving (before the person gets out of the car, stopping the beeps entirely). Gtg but that’s the message I’m trying to get across.
Instead of giving users the freedom of picking random numbers and then making them but dev products until they hit that price, couldn’t you just make a list of all products, and let them buy as much as they’d like from that list so that this issue doesn’t exist.