storePayReplaySuccess should also considre PayingReplay

This commit is contained in:
Sebastian 2022-10-21 11:06:31 -03:00
parent 4dac65e557
commit 5da924a760
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1

View File

@ -736,7 +736,10 @@ async function storePayReplaySuccess(
if (isFirst) {
throw Error("invalid payment state");
}
if (purchase.purchaseStatus === PurchaseStatus.Paying) {
if (
purchase.purchaseStatus === PurchaseStatus.Paying ||
purchase.purchaseStatus === PurchaseStatus.PayingReplay
) {
purchase.purchaseStatus = PurchaseStatus.Paid;
}
purchase.lastSessionId = sessionId;