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

Redirect or Extend UserUpgradeProcessor

Snog

Well-known member
#1
I have a need to redirect or extend UserUpgradeProcessor/PayPal.php to a different processor.

I know I discussed this with someone about a year ago and the conclusion was it couldn't be done. Not that I don't believe them, but perhaps someone has a way it can be done.

The situation is I'm using a different payment_callback.php file for new transactions, but there are existing recurring transactions being sent to the standard payment_callback.php file. I need those recurring transactions to process through my new UserUpgradeProcessor/PayPal.php.
 

Chris D

XenForo developer
Staff member
#2
Unfortunately the only place it is instantiated is inside the standard payment_callback.php file.

So there's nothing in the XF framework that can extend that code, unfortunately.
 

Snog

Well-known member
#3
Thanks Chris.

That was the conclusion reached a while back. I was hoping beyond hope that maybe there was something overlooked.

It seems the only solution would be to replace the stock payment_callback file and change the owner so it can't be overwritten when there's an XF update.
 

Chris D

XenForo developer
Staff member
#4
What about 301 redirecting the stock payment_callback file to your own and handling it that way? I'm guessing that could be done in .htaccess easily enough. You wouldn't need to affect the default file then.
 

Snog

Well-known member
#5
That's an idea, but I'm not sure how PayPal would react to that. You know PayPal, one little hiccup and they panic.
 

Snog

Well-known member
#8
Yes, I've run a few tests and it works when using the sandbox. So I would think it would work with the live IPN.

Thanks for the help everyone. :)