• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Implemented Add a grace period to user upgrade subscription expiry

Xon

Well-known member
#1
A recurring user upgrade subscription can expiry, and then be renewed due to delays from upstream payment provider's providing a notification. This gives a highly confusing user experience which can be very misleading.

The user upgrade expiry task runs hourly, but I've seen Paypal take upto 6 hours to notify the website that the payment has been processed.

IMO, for recurring user upgrades the expiry should only be processed a (configurable) number of hours after the actual expiry time, to permit payment processing to have sufficient time to process the payment.
 

Chris D

XenForo developer
Staff member
#2
We already apply a grace period of exactly 6 hours in both XF1 and XF2:
PHP:
if ($upgrade->recurring)
{
   // For recurring payments give a 6 hour grace period
   if ($active->end_date + 6 * 3600 >= \XF::$time)
   {
      continue;
   }
}
We've so far found 6 hours to be sufficient. Are you experiencing delays longer than this? I don't think it's necessary for it to be configurable, but if it is seemingly still being delayed beyond that grace period then perhaps we could increase it, at least.
 

Xon

Well-known member
#3
My Expiring User Upgrade add-on can send email notifications on expiry and renewal actions, and I've had sporadic complaints that it sends both to some users. The only reason this would happen is if the paypal callback is really late.

And oops, missed that XF already implements grace period bits
 

NixFifty

Well-known member
#4
Extending the grace period would be extremely helpful. I've had rare cases where the callback comes 12 hours late.

@Freelancer just experienced something similar too, though in his case the user just went and brought another subscription in the interim:
The "expired" Email was sent at 0557 hrs and the "purchase" Email (which actually should be the "renewal" Email) was sent out on 1328 hrs same day. That makes a "grace" period of 7+ hours...!!! In the meantime the User purchased another upgrade at 0854 hrs, doubling the subscriptions with PayPal. So PayPal failed here big time.
 

Freelancer

Well-known member
#5
@NixFifty thanks for chiming in. I am almost tempted to say that a 24-hour grace period is a necessary thing for subscription based upgrades. It wouldn't be too bad to be as comfortable as it can be for the user. Otherwise the admin has a lot of mess to clean up and the user thinks the forum does not work properly (as it happened to me today). I never had this delay with STRIPE. PayPals technology (or better processing capacity) seems to be behind.
 

Sim

Well-known member
#8
Thanks @Chris D ... I have on occasions had PayPal take more than 6 hours to process the renewal, but never more than 24 hours - so this increased grace period should do the trick.