Fix improper usage of stale data object.

This commit is contained in:
Alex Hart
2025-03-04 14:05:58 -04:00
parent b8a10afef5
commit 36b99637b2

View File

@@ -173,9 +173,9 @@ class InAppPaymentRecurringContextJob private constructor(
inAppPayment
}
if (hasEntitlementAlready(inAppPayment, subscription.endOfCurrentPeriod)) {
if (hasEntitlementAlready(updatedInAppPayment, subscription.endOfCurrentPeriod)) {
info("Already have entitlement for this badge. Marking complete.")
markInAppPaymentCompleted(inAppPayment)
markInAppPaymentCompleted(updatedInAppPayment)
} else {
submitAndValidateCredentials(updatedInAppPayment, subscription, requestContext)
}