Fix improper usage of stale data object.

This commit is contained in:
Alex Hart
2025-03-04 15:59:46 -04:00
parent b8a10afef5
commit 36b99637b2
@@ -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)
}