XF 2.0 Instant Payment Notification (IPN)

Nirjonadda

Well-known member
Please let me know that how to set Instant Payment Notification (IPN) in paypal? What URL link need add in paypal Notification URL ?
 

batpool52!

Well-known member
That was an example. You have to replace https://xenforo.com/community/ with your forum url. So for example, if my forum url was https://ilovesalad.io then callback url for me would be https://ilovesalad.io/payment_callback.php?_xfProvider=paypal
 

Nirjonadda

Well-known member
That was an example. You have to replace https://xenforo.com/community/ with your forum url. So for example, if my forum url was https://ilovesalad.io then callback url for me would be https://ilovesalad.io/payment_callback.php?_xfProvider=paypal
Oh ! So IPN URL is https://mysite.com/payment_callback.php?
 

clackey

Member
"You shouldn’t need one, we pass it to them automatically. "

So, does that mean you send paypal the IPN on the initial purchase then it uses that to call back on recurring charges?

This is important as I plan to have multiple xenforo sites with premium options but paypal only allows a single IPN entry.

If xenforo isn't sending the IPN for paypal to callback then I might be able to use something like this wordpress plugin to forward it to the correct site, assuming there is site-identifying info in the IPN.
 

clackey

Member
Also found this thread that claims the notify URL is in the IPN but still unclear whether I need to enable the IPN in paypal, which requires a single URL. Guess I'll test it and see if I can figure it out.
 

Mike

XenForo developer
Staff member
You need to enable IPNs in PayPal. Historically at least, you can't do that without entering a URL there. We do recommend the "correct" URL, but when we send a purchase to PayPal, we specifically tell it the expected IPN URL and any callbacks will go to that URL, so what is entered in your PayPal account doesn't really matter in terms of XF -- the only things that will go to the URL in PayPal are actions that don't have an "overriding" URL (so generally, stuff outside of an XF install).

This should allow multiple XF IPN configurations per PayPal account.
 

tourmeister

Active member
You need to enable IPNs in PayPal. Historically at least, you can't do that without entering a URL there. We do recommend the "correct" URL, but when we send a purchase to PayPal, we specifically tell it the expected IPN URL and any callbacks will go to that URL, so what is entered in your PayPal account doesn't really matter in terms of XF -- the only things that will go to the URL in PayPal are actions that don't have an "overriding" URL (so generally, stuff outside of an XF install).

This should allow multiple XF IPN configurations per PayPal account.
So does that mean we can put the url from the email in the field where it asks for a URL on th ePal Pal site when you go to enable IPNs?
 

tourmeister

Active member
So what seems to be happening for me is that my user's payments ARE being processed by PayPal, however their XF accounts are NOT being upgraded automatically. Based on what I read above, I went to PayPal and entered the following for the IPN info,

195256

I have about 8-9 accounts that I need to upgrade since they have paid, but I cannot figure out how to manually add an upgrade to a user account.

I checked the IPN history on PayPal,

195257

That first fail near the bottom is a few hours after I upgraded from XF 2.012 to XF 2.1. Going back through the history, there were no failures prior to the upgrade. However, prior to the upgrade, I did not have IPNs enabled at all on PayPal.
 

tourmeister

Active member
It's all good now I think. I've received several successful payments since fixing the IPN link and the XF accounts were upgraded as they should be.

I went back through the transactions on the list above and checked the corresponding XF accounts, manually upgrading those where it did not do it automatically.
 

tourmeister

Active member
So I have to revisit this issue...

I still have users with PayPal payment subscriptions that were started back when I had vBulletin prior to Jan 2018. Their recurring subscriptions are using the old vB notification URL,

Code:
http://www.twtex.com/forums/payment_gateway.php?method=paypal
After upgrading to XF2, I added the XF notification address to my PayPal settings to replace the above vB address,

https://www.twtex.com/forums/payment_callback.php?_xfProvider=paypal

I also have the notifications set to ON.

At first, everything was great. But then I started getting annoying emails from PayPal about a bad notification URL telling me they would turn off notifications if I didn't get it fixed. Shortly after that is when I started getting issues with user accounts not being properly upgraded after payments were made.

What I think is happening is that when recurring subscriptions that still have the old vB URL try to process, they kick back and I get the annoying emails from PayPal telling me I need to change the URL. BUT, I think the user accounts are still correctly updated based on the payment... Also, any NEW subscriptions created that use the XF notification URL work correctly as well. However, If I ignore those emails from PayPal about the bad vB URL, PayPal eventually shuts down the notification process completely and this disrupts even the new subscriptions when they try to renew.

I have gone in and turned notifications back on a few times and then it gets turned off again. So this is an on again off again problem :cautious:

From all I can find via searching online, PayPal doesn't appear to have ANY means for me to manually update the old vB subscriptions to change their notification URL to the new XF URL. So other than hounding my users to cancel old subscriptions and creating new ones until there are NONE left to cause problems, I am out of luck. There are a lot of these users, so getting ALL of them to create new subscriptions is not likely to happen.

I was wondering if there might be a way to introduce some kind of redirect on my end that catches incoming transactions using the old vB URL and somehow forces them to use the correct XF URL? I know NOTHING about doing redirects or how this might work, I just got the idea from a comment I read while doing searches on this stuff, but they didn't explain how to do it. If it is possible, I basically need someone to provide me the exact script, line for line, letter for letter.

This is a BIG deal for my site. I am totally donation supported and this is costing me supporters when they get annoyed because their accounts aren't getting upgraded and they stop donating. It is impossible for me to stay on top of trying to constantly manually upgrade their accounts every month.
 

MagicSec

Member
So I have to revisit this issue...

I still have users with PayPal payment subscriptions that were started back when I had vBulletin prior to Jan 2018. Their recurring subscriptions are using the old vB notification URL,

Code:
http://www.twtex.com/forums/payment_gateway.php?method=paypal
After upgrading to XF2, I added the XF notification address to my PayPal settings to replace the above vB address,

https://www.twtex.com/forums/payment_callback.php?_xfProvider=paypal

I also have the notifications set to ON.

At first, everything was great. But then I started getting annoying emails from PayPal about a bad notification URL telling me they would turn off notifications if I didn't get it fixed. Shortly after that is when I started getting issues with user accounts not being properly upgraded after payments were made.

What I think is happening is that when recurring subscriptions that still have the old vB URL try to process, they kick back and I get the annoying emails from PayPal telling me I need to change the URL. BUT, I think the user accounts are still correctly updated based on the payment... Also, any NEW subscriptions created that use the XF notification URL work correctly as well. However, If I ignore those emails from PayPal about the bad vB URL, PayPal eventually shuts down the notification process completely and this disrupts even the new subscriptions when they try to renew.

I have gone in and turned notifications back on a few times and then it gets turned off again. So this is an on again off again problem :cautious:

From all I can find via searching online, PayPal doesn't appear to have ANY means for me to manually update the old vB subscriptions to change their notification URL to the new XF URL. So other than hounding my users to cancel old subscriptions and creating new ones until there are NONE left to cause problems, I am out of luck. There are a lot of these users, so getting ALL of them to create new subscriptions is not likely to happen.

I was wondering if there might be a way to introduce some kind of redirect on my end that catches incoming transactions using the old vB URL and somehow forces them to use the correct XF URL? I know NOTHING about doing redirects or how this might work, I just got the idea from a comment I read while doing searches on this stuff, but they didn't explain how to do it. If it is possible, I basically need someone to provide me the exact script, line for line, letter for letter.

This is a BIG deal for my site. I am totally donation supported and this is costing me supporters when they get annoyed because their accounts aren't getting upgraded and they stop donating. It is impossible for me to stay on top of trying to constantly manually upgrade their accounts every month.
You could set the page to redirect, or use a PHP script to "proxy" the page you actually want. That may possibly resolve things.
 
Top