- Affected version
- 2.2.13
XenForo actively expires user upgrades which haven't been extended by the payment handlers. This design originates from paypal IPN and the older paypal API which makes cancelling subscriptions via that API "challenging".
However, stripe behaves differently. Some times a retry occurs and the documented events for the stripe webhook are not sufficient to cover this situation.
I've had a case where a user had a recurring subscription with Stripe failed to charge the credit card, and XenForo timed out the user upgrade. The user then re-subscribed. However; Stripe successfully charged the card 7 days later and informed XenForo.
It looks like
However, stripe behaves differently. Some times a retry occurs and the documented events for the stripe webhook are not sufficient to cover this situation.
I've had a case where a user had a recurring subscription with Stripe failed to charge the credit card, and XenForo timed out the user upgrade. The user then re-subscribed. However; Stripe successfully charged the card 7 days later and informed XenForo.
It looks like
XF\Repository\UserUpgrade::downgradeExpiredUpgrades
which calls \XF\Service\User\Downgrade::downgrade
doesn't attempt to call the payment handler to cancel any pending charges which XenForo thinks has failed but may still be retried later.