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

Redirect or Extend UserUpgradeProcessor

Discussion in 'XenForo Development Discussions' started by Snog, Apr 29, 2014.

  1. Snog

    Snog Well-Known Member

    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.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
  3. Snog

    Snog Well-Known Member

    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.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
  5. Snog

    Snog Well-Known Member

    That's an idea, but I'm not sure how PayPal would react to that. You know PayPal, one little hiccup and they panic.
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    Yes, true. They may be looking specifically for a 200 HTTP code which is where that might fail.
     
  7. digitalpoint

    digitalpoint Well-Known Member

    PayPal IPN notices will follow redirects (at least it used to about 2 years ago).
     
  8. Snog

    Snog Well-Known Member

    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. :)
     
    Chris D likes this.

Share This Page