We now had to implement some CRON jobs which runs every day: every day
we make a list of passes which are supposed to expire, and we ask
Apple if the original receipt is still valid: the magic thing is that
in their answer, there is a field latest-receipt which embeds the
latest receipt. If it is not the same as the one we have, we
understand that the subscription has been renewed automatically, we
store the latest receipt for the next cron check, and we update the
user account to extend the expiration date.
stackoverflow
we make a list of passes which are supposed to expire, and we ask
Apple if the original receipt is still valid: the magic thing is that
in their answer, there is a field latest-receipt which embeds the
latest receipt. If it is not the same as the one we have, we
understand that the subscription has been renewed automatically, we
store the latest receipt for the next cron check, and we update the
user account to extend the expiration date.
stackoverflow
Comments
Post a Comment