7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
21st October 2011 (7 months ago)
#
Unfortunatley PayPal Express Checkout and Pro recurring payments do no support this. Sucks I know. The only way to get around this is to use a central IPN forwarder which redirects IPNs to the proper locations. Support for this is built into Pro Sites as we do this for our Incsub sites (WPMU DEV, BuddyDress, Edublogs, etc.).
Here are the relevant bits in the paypal gateway code:
/* This sets the default prefix to the paypal custom field,
* in case you use the same account for multiple IPN requiring scripts,
* and want to setup your own forwarding script somewhere to pass IPNs to
* the proper location. If that is the case you will also need to define
* PSTS_IPN_PASSWORD and post "inc_pass" along with the IPN string.
*/
if ( !defined('PSTS_PYPL_PREFIX') )
define('PSTS_PYPL_PREFIX', 'psts');
And
} else if ( defined('PSTS_IPN_PASSWORD') && $_POST['inc_pass'] != PSTS_IPN_PASSWORD ) {
header("HTTP/1.1 401 Authorization Required");
die('Error: Missing a valid IPN forwarding password. Identification is not possible.');
} else {
//if not using an IPN forwarder check the request
if ( !defined('PSTS_IPN_PASSWORD') ) {
So basically define PSTS_IPN_PASSWORD and PSTS_PYPL_PREFIX in the wp-config.php file, and make sure those match your IPN forwarder. I'm attaching an example IPN forwarder here:
Can someone explain how ipn forwarder works? How to configure it, what lines to changes, where to upload it, noob friendly?
I tried it but i can't make it work...
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
31st October 2011 (6 months ago)
#
Well put the forwarder somewhere web accessible. The URL to that is what you enter into your paypal account. Also make sure there's a /logs/ directory there and that it's writable.
Configure a password in the header of it, as well as your sites and the prefix to use for each.
On each pro sites install, define PSTS_IPN_PASSWORD and PSTS_PYPL_PREFIX in the wp-config.php file, and make sure those match your IPN forwarder settings.
We need to get IPN working for multiple domains ASAP too, and could use a bit more direction here. Does thorough documentation for this exist anywhere?
Configure a password in the header of it, as well as your sites and the prefix to use for each.
"It" being what, the forwarder file? By "in the header" do you mean the configuration section defining INC_PASS?
I also notice the forwarder posted above is a plugin? Should it reside in the Plugins folder? Aaron only says put it "somewhere web accessible".
On each pro sites install, define PSTS_IPN_PASSWORD and PSTS_PYPL_PREFIX in the wp-config.php file
What exact code needs to be added to wp_config and where?
I'm attaching an example IPN forwarder
Aside from defining the "INC_PASS" password, are edits required other than configuring the following array? Please see my related questions that follow.
Can we include any number of apps without making changes elsewhere? (i.e.; app1, app2, app3, app4) Only two are listed in the array.
The path points to ipn-handler.php, not ipn-forwarder.php. Where does such a file exist? Is this the path generated after installing Pro Sites? (i.e.; /wp-admin/admin-ajax.php?action=psts_pypl_ipn) If Membership and Pro Sites are both installed, I presume they would both need an app configured in the forwarder.
Thanks for the help. Looking forward to getting this figured out soon.
The pass is shared between all installs, the prefix should be short. It's just what the forwarder looks for to know what url to send the IPN to.
Then put your forwarder somewhere, say at http://mysite.com/ipns/ipn-forwarder.php. Note this is not a plugin, just a standalone php script. It's not even only for pro sites, could be used with any program you have that needs an IPNs forwarded. Edit the top of ipn-forwarder.php. You need to change the INC_PASS to "mypassword" and configure any pro sites installs there in the array. You can add 100 if you want, just add more to the array. The ones there are just an example. So for example to configure the first site:
OK, thanks. I have followed all the directions exactly, turned notifications back on, and am waiting to see if the forwarder is working. Just a couple more questions:
1. I presumed an app/site must be added to the array for the domain where the forwarder is installed, if that domain is to run Pro Sites, membership, etc. Correct?
2. Does the Pro Sites and/or Membership plugin have to be activated on a given site for the forwarder to work at that domain? We have not yet installed either plugin at one of the my sites in the forwarder array.
3. I guess I just don't understand how the IPN url works. The psts_pypl_ipn action is nowhere to be found in admin-ajax.php, but if I load the url in a browser, I do get a blank page with a single "0" at top left.
OK, sorry to bump this topic but I'm not getting any answers over here and need to confirm IPNs are working so I can complete one new project with Membership and move on with upgrading Supporter on various others.
You've been a big help Aaron, thanks again for your time.
I'm looking for a little clarity on the PSTS_IPN_PASSWORD and inc_pass.
Is it correct that this password is just a password that I make up to make sure that the ipn-forwarder.php is the one I configured to talk to my prosites installation and vice versa? It's not supposed to be my API password or anything like that right?
Hi JCNJR,
When I use the IPN Simulator tool in the sandbox, ipn-forwarder.php writes to the log file in the log directory I created. (At least it did after I got the permissions set up correctly on that directory.) It does not write to that log file when I am playing with sandbox accounts. Is it supposed to?
I was able to use sandbox accounts to create and cancel subscriptions and those messages seem to show up in the Pro Sites Management dashboard account history section as well as actually reflecting in the account durations of the sites I created. I assume that means PayPal and prosites are talking to each other.
I do get this message in Account History when using the sandbox accounts:
"User modifying subscription via PayPal Express: PayPal returned an error: The token is invalid"
It is unclear from your other thread whether this is expected or not when using sandbox accounts.
One other point for anyone else trying this, In the sample ipn-forwarder.php file Aaron provided above, there is a comma missing at the end of the last line of the second sample app array. I was getting some error messages until I figure that out.
When I use the IPN Simulator tool in the sandbox, ipn-forwarder.php writes to the log file... It does not write to that log file when I am playing with sandbox accounts. Is it supposed to?
This is the exact same issue I reported, that has me concerned about going live since it indicates IPNs are not being sent for actual transactions. I haven't yet been able to get a response as to why, or like you ask, whether Sandbox transactions get logged.
My next step is to test live transactions with two real PayPal accounts on our dev install. Guess that's the only way to find out for sure if the forwarder is working.
I also asked about the invalid token error here, but haven't received any feedback about that.
I don't think I had an opportunity to configure IPN for my sandbox account and I don't see anyplace to set it. Perhaps that's because I chose a quick "preconfigured" sandbox account. I guess, I will go through the process of creating a manual sandbox account and see if that gives me the appropriate options.
Okay. I figured out how to configure IPN on my sandbox account. (After setting up the sandbox accounts at developer.paypal.com, I had to log in with my test business account at sandbox.paypal.com and then go to My Account > Profile > More Options in the third column under Selling Preferences select Instant Payment Notification Preferences. Then I entered the URL for my ipn-forwarder.php
Now when I use the sand box buyer account to upgrade to a prosite, I am getting messages in my IPN logs. However, the messages aren't good. Have you seen this error before:
[2011-12-19 22:30:09] Could not contact neighborlymedia.com/wp-admin/admin-ajax.php?action=psts_pypl_ipn to send the IPN: HTTP/1.1 302 Moved Temporarily (this is followed by the transaction details.)
If I enter neighborlymedia.com/wp-admin/admin-ajax.php?action=psts_pypl_ipn directly in the browser I get:
Error: Missing POST variables. Identification is not possible.
[2011-12-22 18:19:14] Could not contact pinoyfitnesscoach.com/wp-admin/admin-ajax.php?action=psts_pypl_ipn to send the IPN: HTTP/1.1 302 Moved Temporarily
... any chance this problem has been fixed? Thanks!
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
23rd December 2011 (5 months ago)
#
Ok guys, I ran into it too. Turns out there is a nasty bug in the IPN handler that somehow no one caught on too. Testing my fix now, look for Pro Sites 3.0.5 this afternoon.
YES!!! Freaking YESS! I've been watching this thread because I have an estore that uses IPN forwarding and the same Paypal account will be used for Pro Sites as well.
So in summary, i would change the IPN url in Paypal to the location of this script. Then, if I have 2 places that use the IPN function, I would set them both as an array in the script?
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
24th December 2011 (5 months ago)
#
Kinda. Read through the instructions above, they are quite detailed. Note that the software you are forwarding to needs to be coded to work with the forwarder. If it's not pro sites then you will need to customize that.
Hey Aaron,
I've read through your post quite a few times, but I don't have multiple pro site installs. I have one installation of Pro Sites, and an e-store built on Wordpress that's setup with the IPN from Paypal.
However, Pro Sites needs the IPN as well, which is why i'm asking a question about the forwarder that I need to make things work properly.
Do I place this in the other installation of WP, the one running the estore (with changed values of course)?
define('PSTS_IPN_PASSWORD', 'mypassword');
define('PSTS_PYPL_PREFIX', 'site1');
Great that it's been fixed. However, I have tried installing Pro Sites on two different domains and checked the PayPal payment (real payment using a friends' PayPal acct) on both sites with IPN turned off and both sites seem to work fine. The user accounts are upgraded to Pro with all Pro features activated and I am able to receive payment even without IPN turned on.
I also tried unsubscribing via the Pro Site unsubscribe button, and that seems to work fine too.
So forgive me if this is a stupid question but what is the IPN for? I would like to know before I try to install the IPN forwarder again. Also, I am using PayPal for another invoicing tool so if this is going to present a problem with non-Pro Site sites, then I would rather leave things as they are now.
Wow for real? Can someone else confirm this? That would actually be really great to hear since I wouldn't have to fiddle with this. It's on my "come back to" list. lol
Well that settles that then. Thanks for your input Aaron. I'd definitely want it setup right from the start.
Hey Aaron, I had a question above. Those two lines, am I correct in placing those in the other Wordpress install in wp-config? I've read through your instructions and they do seem pretty straight forward but wanted to make sure, as I'm not dealing with 2 Pro Sites installs.
Thanks for your contributions man! And Merry Christmas Eve! I thought I was the only one crazy enough to be working today. ;)
Thanks for the Christmas present Aaron. Everything appears to be functioning properly via Sandbox now. Feeling much more confident about updating our live sites, hopefully there will be no need to report back!
But is there an easy 1,2,3 step to follow that consolidate what was discussed here? Maybe one of the members who got it to work for subscription based sites may be able to do this.
It seems str forward but the back and forth of any good discussion may seem to be confusing to a newbie like myself.
So I gave it a try
----------------------------------------------------------------------------------
1. I downloaded the ipn forwarded and uploaded it at mysite.com/ipn/ipn-forwarder.php and updated the following with my site information (4 arrays for 4 networks)
3. I then added the IPN forwarder URL to my Paypal profile
mysite.com/ipn/ipn-forwarder.php
End of steps. Was this set up correctly? Any steps missed?
-------------------------------------------------------------------------------------------------
When I go to the IPN URL on my site I get the following error:
Parse error: syntax error, unexpected T_ARRAY, expecting ')' in /home/infotech/public_html/ipn/ipn-forwarder.php on line 38
Is this normal or is the page suppose to be blank?
You're not going to see anything when visiting the forward url as it does all its work behind the scene, and only works properly when it receives the proper ipn parameters.
As for the unexpected T_ARRAY, Aaron or another developer would have to address that. Normally you would get an error more like, "Error: Missing POST variables. Identification is not possible." because no variables get sent when loading the forwarder in your browser.
Thanks Aaron and Jcnjr! I am now getting the 'Error: Missing POST variables. Identification is not possible.' message, which is suppose to be normal, correct?
I believe that is perfectly normal expected behavior for viewing the page in your browser. You can send IPNs from the PayPal Sandbox to confirm all is well, but this will require changing your settings for testing instead of live mode.
@jcnjr I always wondered about this sandbox mode. Is it suppose to simulate the hold process? in the pass, once i click on the pay option it does not do anything....
I was afraid of opening that can of worms... There are many steps required to test PayPal functions in Sandbox mode. If you do not already have a developer account set up, I might suggest you keep the fowarder in live mode and test IPNs using a real transaction. Otherwise, follow the links on the Pro Sites plugin admin page to learn about using Sandbox.
I know I edited the ipn-forwarder.php and the wp-config files for the WPMU sites but for this system, how do I get it to work with the same ipn fwd url.
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
20th February 2012 (3 months ago)
#
As it stands you would have to mod the WHMCS code to add a prefix the custom paypal field. You could probably fairly easily edit it though to forward a copy of every IPN notice to WHMCS though. Not something we can do for you though.
@becky We have the IPN forward functioning with current Pro Sites running on multiple domains. Aaron may be able to address the specific error code, but using Sandbox can be tricky. Be sure to use all PayPal settings from the Sandbox account, set the IPN URL in the sandbox, and set the site to test mode both via the Pro Sites settings and in the array. Hoe this helps...
@Aphrodite FYI: i was lost too, but now have the forwarder working as follows...
Upload the ipn-forwarder.php script to a new /ipn folder at the root of yourdomain.com. Be sure to create a /logs folder in that same directory (i.e.: /ipn/logs).
Point your PayPal IPN URL to yourdomain.com/ipn/ipn-forwarder.php
Update the forwarder script with your-password: define('INC_PASS', 'your-password');
/* For IPN Forwarding */
define('PSTS_IPN_PASSWORD', 'your-password');
define('PSTS_PYPL_PREFIX', 'site-prefix-from-ipn-app-array');
Hope this helps!
My question for Aaron is, does WPMU Dev plan to make this a plugin? I would like to write about this solution and offer the script for use, but I'd gladly wait and point people to the plugin here for download via an affiliate link.
I assume I must do that with the main site, the one registered in paypal ?
Where you put the forwarder has nothing to do with any sites in the array. But yes, mine does reside at the same domain as my main site. The IPN URL you enter in your PayPal notifications settings just has to match wherever you put the forwarder.
the path mentioned in the script confused me
I believe "/ipn-handler.php" is intended as place-holder since the handler may be different for some users. It confused me at first too but Aaron clarified that above.
Responses (66)
WPMU DEV Fanatic — 21st October 2011 (7 months ago) #
Hi Jose,
Sounds like a good idea, let me run this by the lead developer.
Thanks,
David
Lead Developer — 21st October 2011 (7 months ago) #
Unfortunatley PayPal Express Checkout and Pro recurring payments do no support this. Sucks I know. The only way to get around this is to use a central IPN forwarder which redirects IPNs to the proper locations. Support for this is built into Pro Sites as we do this for our Incsub sites (WPMU DEV, BuddyDress, Edublogs, etc.).
Here are the relevant bits in the paypal gateway code:
And
So basically define PSTS_IPN_PASSWORD and PSTS_PYPL_PREFIX in the wp-config.php file, and make sure those match your IPN forwarder. I'm attaching an example IPN forwarder here:
Member — 21st October 2011 (7 months ago) #
Ok, thanks a lot :)
Member — 31st October 2011 (6 months ago) #
Can someone explain how ipn forwarder works? How to configure it, what lines to changes, where to upload it, noob friendly?
I tried it but i can't make it work...
Lead Developer — 31st October 2011 (6 months ago) #
Well put the forwarder somewhere web accessible. The URL to that is what you enter into your paypal account. Also make sure there's a /logs/ directory there and that it's writable.
Configure a password in the header of it, as well as your sites and the prefix to use for each.
On each pro sites install, define PSTS_IPN_PASSWORD and PSTS_PYPL_PREFIX in the wp-config.php file, and make sure those match your IPN forwarder settings.
Member — 31st October 2011 (6 months ago) #
Thank you aaron, i will try this. :)
Member — 21st November 2011 (6 months ago) #
We need to get IPN working for multiple domains ASAP too, and could use a bit more direction here. Does thorough documentation for this exist anywhere?
"It" being what, the forwarder file? By "in the header" do you mean the configuration section defining INC_PASS?
I also notice the forwarder posted above is a plugin? Should it reside in the Plugins folder? Aaron only says put it "somewhere web accessible".
What exact code needs to be added to wp_config and where?
Aside from defining the "INC_PASS" password, are edits required other than configuring the following array? Please see my related questions that follow.
Can we include any number of apps without making changes elsewhere? (i.e.; app1, app2, app3, app4) Only two are listed in the array.
The path points to ipn-handler.php, not ipn-forwarder.php. Where does such a file exist? Is this the path generated after installing Pro Sites? (i.e.; /wp-admin/admin-ajax.php?action=psts_pypl_ipn) If Membership and Pro Sites are both installed, I presume they would both need an app configured in the forwarder.
Thanks for the help. Looking forward to getting this figured out soon.
Lead Developer — 21st November 2011 (6 months ago) #
So in each pro sites WP install, add these to the wp-config (w/customized values of course):
The pass is shared between all installs, the prefix should be short. It's just what the forwarder looks for to know what url to send the IPN to.
Then put your forwarder somewhere, say at http://mysite.com/ipns/ipn-forwarder.php. Note this is not a plugin, just a standalone php script. It's not even only for pro sites, could be used with any program you have that needs an IPNs forwarded. Edit the top of ipn-forwarder.php. You need to change the INC_PASS to "mypassword" and configure any pro sites installs there in the array. You can add 100 if you want, just add more to the array. The ones there are just an example. So for example to configure the first site:
Then maybe another site:
I hope that's clear enough?
Member — 21st November 2011 (6 months ago) #
Clear as mud! We'll give it a shot. Thanks for the clarification and prompt reply.
I only made the plugin comment since the "Plugin Name: IPN Forwarder" at the top of file was a bit misleading.
Member — 23rd November 2011 (6 months ago) #
OK, thanks. I have followed all the directions exactly, turned notifications back on, and am waiting to see if the forwarder is working. Just a couple more questions:
1. I presumed an app/site must be added to the array for the domain where the forwarder is installed, if that domain is to run Pro Sites, membership, etc. Correct?
2. Does the Pro Sites and/or Membership plugin have to be activated on a given site for the forwarder to work at that domain? We have not yet installed either plugin at one of the my sites in the forwarder array.
3. I guess I just don't understand how the IPN url works. The psts_pypl_ipn action is nowhere to be found in admin-ajax.php, but if I load the url in a browser, I do get a blank page with a single "0" at top left.
Thanks again for your help!
Lead Developer — 23rd November 2011 (6 months ago) #
1. Yes
2. No, it's a completely independent script. Just requires php 5.
3. Don't worry about it. If you really care: http://codex.wordpress.org/AJAX_in_Plugins
Member — 23rd November 2011 (6 months ago) #
Awesome. Thanks for the quick reply.
Member — 29th November 2011 (5 months ago) #
OK, sorry to bump this topic but I'm not getting any answers over here and need to confirm IPNs are working so I can complete one new project with Membership and move on with upgrading Supporter on various others.
You've been a big help Aaron, thanks again for your time.
Member — 16th December 2011 (5 months ago) #
I'm looking for a little clarity on the PSTS_IPN_PASSWORD and inc_pass.
Is it correct that this password is just a password that I make up to make sure that the ipn-forwarder.php is the one I configured to talk to my prosites installation and vice versa? It's not supposed to be my API password or anything like that right?
Thanks.
Member — 16th December 2011 (5 months ago) #
Correct. Just make sure the password matches in the forwarder and wp-config files for all sites where pro sites is installed.
Looking forward to hearing if your IPNs get logged by the forwarder.
Member — 16th December 2011 (5 months ago) #
Hi JCNJR,
When I use the IPN Simulator tool in the sandbox, ipn-forwarder.php writes to the log file in the log directory I created. (At least it did after I got the permissions set up correctly on that directory.) It does not write to that log file when I am playing with sandbox accounts. Is it supposed to?
I was able to use sandbox accounts to create and cancel subscriptions and those messages seem to show up in the Pro Sites Management dashboard account history section as well as actually reflecting in the account durations of the sites I created. I assume that means PayPal and prosites are talking to each other.
I do get this message in Account History when using the sandbox accounts:
"User modifying subscription via PayPal Express: PayPal returned an error: The token is invalid"
It is unclear from your other thread whether this is expected or not when using sandbox accounts.
One other point for anyone else trying this, In the sample ipn-forwarder.php file Aaron provided above, there is a comma missing at the end of the last line of the second sample app array. I was getting some error messages until I figure that out.
Cheers!
Member — 16th December 2011 (5 months ago) #
This is the exact same issue I reported, that has me concerned about going live since it indicates IPNs are not being sent for actual transactions. I haven't yet been able to get a response as to why, or like you ask, whether Sandbox transactions get logged.
My next step is to test live transactions with two real PayPal accounts on our dev install. Guess that's the only way to find out for sure if the forwarder is working.
I also asked about the invalid token error here, but haven't received any feedback about that.
Lead Developer — 19th December 2011 (5 months ago) #
Sandbox IPNs should be getting logged in the log files, are you sure the IPN url was set in your sandbox account?
Note i'll be implementing this myself this week for edublogs, so we'll see how I go ;-)
Member — 19th December 2011 (5 months ago) #
Thanks Aaron.
I don't think I had an opportunity to configure IPN for my sandbox account and I don't see anyplace to set it. Perhaps that's because I chose a quick "preconfigured" sandbox account. I guess, I will go through the process of creating a manual sandbox account and see if that gives me the appropriate options.
Member — 19th December 2011 (5 months ago) #
Okay. I figured out how to configure IPN on my sandbox account. (After setting up the sandbox accounts at developer.paypal.com, I had to log in with my test business account at sandbox.paypal.com and then go to My Account > Profile > More Options in the third column under Selling Preferences select Instant Payment Notification Preferences. Then I entered the URL for my ipn-forwarder.php
Now when I use the sand box buyer account to upgrade to a prosite, I am getting messages in my IPN logs. However, the messages aren't good. Have you seen this error before:
[2011-12-19 22:30:09] Could not contact neighborlymedia.com/wp-admin/admin-ajax.php?action=psts_pypl_ipn to send the IPN: HTTP/1.1 302 Moved Temporarily (this is followed by the transaction details.)
If I enter neighborlymedia.com/wp-admin/admin-ajax.php?action=psts_pypl_ipn directly in the browser I get:
Error: Missing POST variables. Identification is not possible.
Any insight into where I should check next?
Thank you.
Member — 20th December 2011 (5 months ago) #
Hmmm... I'm looking forward to an answer about that too.
Member — 22nd December 2011 (5 months ago) #
I'm having the same problem:
[2011-12-22 18:19:14] Could not contact pinoyfitnesscoach.com/wp-admin/admin-ajax.php?action=psts_pypl_ipn to send the IPN: HTTP/1.1 302 Moved Temporarily
... any chance this problem has been fixed? Thanks!
Lead Developer — 23rd December 2011 (5 months ago) #
Ok guys, I ran into it too. Turns out there is a nasty bug in the IPN handler that somehow no one caught on too. Testing my fix now, look for Pro Sites 3.0.5 this afternoon.
Member — 23rd December 2011 (5 months ago) #
Awesome. Sounds like a great Christmas present!
Member — 23rd December 2011 (5 months ago) #
YES!!! Freaking YESS! I've been watching this thread because I have an estore that uses IPN forwarding and the same Paypal account will be used for Pro Sites as well.
Are the above instructions still accurate then?
Member — 23rd December 2011 (5 months ago) #
Thanks Aaron and Happy Holidays!
Lead Developer — 23rd December 2011 (5 months ago) #
Ok, finally fixed. Weird stuff going on there.
Make sure you update to Pro Sites 3.0.5, and the latest attached version of the IPN forwarder:
Member — 24th December 2011 (5 months ago) #
So in summary, i would change the IPN url in Paypal to the location of this script. Then, if I have 2 places that use the IPN function, I would set them both as an array in the script?
Lead Developer — 24th December 2011 (5 months ago) #
Kinda. Read through the instructions above, they are quite detailed. Note that the software you are forwarding to needs to be coded to work with the forwarder. If it's not pro sites then you will need to customize that.
Member — 24th December 2011 (5 months ago) #
Hey Aaron,
I've read through your post quite a few times, but I don't have multiple pro site installs. I have one installation of Pro Sites, and an e-store built on Wordpress that's setup with the IPN from Paypal.
However, Pro Sites needs the IPN as well, which is why i'm asking a question about the forwarder that I need to make things work properly.
Do I place this in the other installation of WP, the one running the estore (with changed values of course)?
define('PSTS_IPN_PASSWORD', 'mypassword');
define('PSTS_PYPL_PREFIX', 'site1');
Nick
Member — 24th December 2011 (5 months ago) #
Great that it's been fixed. However, I have tried installing Pro Sites on two different domains and checked the PayPal payment (real payment using a friends' PayPal acct) on both sites with IPN turned off and both sites seem to work fine. The user accounts are upgraded to Pro with all Pro features activated and I am able to receive payment even without IPN turned on.
I also tried unsubscribing via the Pro Site unsubscribe button, and that seems to work fine too.
So forgive me if this is a stupid question but what is the IPN for? I would like to know before I try to install the IPN forwarder again. Also, I am using PayPal for another invoicing tool so if this is going to present a problem with non-Pro Site sites, then I would rather leave things as they are now.
Member — 24th December 2011 (5 months ago) #
Wow for real? Can someone else confirm this? That would actually be really great to hear since I wouldn't have to fiddle with this. It's on my "come back to" list. lol
Lead Developer — 24th December 2011 (5 months ago) #
You will be sorry when there next scheduled payment comes through. Or if they cancel via PayPal, or give you a chargeback.
IPNs are very important! I wish you didn't have to set it, but paypals subscription API has that fatal flaw...
Member — 24th December 2011 (5 months ago) #
Well that settles that then. Thanks for your input Aaron. I'd definitely want it setup right from the start.
Hey Aaron, I had a question above. Those two lines, am I correct in placing those in the other Wordpress install in wp-config? I've read through your instructions and they do seem pretty straight forward but wanted to make sure, as I'm not dealing with 2 Pro Sites installs.
Thanks for your contributions man! And Merry Christmas Eve! I thought I was the only one crazy enough to be working today. ;)
Nick
Member — 24th December 2011 (5 months ago) #
Can this be a plugin so I can keep track of the updates?
Member — 25th December 2011 (5 months ago) #
I'm not sure why I'm doing this on Christmas day, but I wanted to let you know that the new IPN Forwarder is working for me now.
[2011-12-25 17:11:17] Successfuly sent to neighborlymedia.com/wp-admin/admin-ajax.php?action=psts_pypl_ipn:
Thank you for your efforts.
Merry Christmas.
Member — 26th December 2011 (4 months ago) #
Thanks for the Christmas present Aaron. Everything appears to be functioning properly via Sandbox now. Feeling much more confident about updating our live sites, hopefully there will be no need to report back!
Lead Developer — 28th December 2011 (4 months ago) #
Cool guys, sorry for the trouble!
Member — 29th December 2011 (4 months ago) #
Guys, this is exactly what I needed.
But is there an easy 1,2,3 step to follow that consolidate what was discussed here? Maybe one of the members who got it to work for subscription based sites may be able to do this.
It seems str forward but the back and forth of any good discussion may seem to be confusing to a newbie like myself.
Thanks in advanced.
Member — 29th December 2011 (4 months ago) #
@infotechd, thats a great idea! Either as a blog post or a stickie
Member — 29th December 2011 (4 months ago) #
agreed ;)
Member — 9th January 2012 (4 months ago) #
So I gave it a try
----------------------------------------------------------------------------------
1. I downloaded the ipn forwarded and uploaded it at mysite.com/ipn/ipn-forwarder.php and updated the following with my site information (4 arrays for 4 networks)
define('INC_PASS', 'mypassword');etc
2. I updated the wpconfig file for each of the four networks like below with my site info
`
etc
3. I then added the IPN forwarder URL to my Paypal profile
mysite.com/ipn/ipn-forwarder.php
End of steps. Was this set up correctly? Any steps missed?
-------------------------------------------------------------------------------------------------
When I go to the IPN URL on my site I get the following error:
Parse error: syntax error, unexpected T_ARRAY, expecting ')' in /home/infotech/public_html/ipn/ipn-forwarder.php on line 38
Is this normal or is the page suppose to be blank?
Member — 9th January 2012 (4 months ago) #
You're not going to see anything when visiting the forward url as it does all its work behind the scene, and only works properly when it receives the proper ipn parameters.
As for the unexpected T_ARRAY, Aaron or another developer would have to address that. Normally you would get an error more like, "Error: Missing POST variables. Identification is not possible." because no variables get sent when loading the forwarder in your browser.
Lead Developer — 9th January 2012 (4 months ago) #
It sounds like you messed up your sites array. Can you paste the whole thing here?
Member — 9th January 2012 (4 months ago) #
Thanks so much for your quick reply! The entire array set is attached. Thank you for any help you can offer!
Lead Developer — 9th January 2012 (4 months ago) #
Forgot to paste?
Member — 9th January 2012 (4 months ago) #
Sorry about that...I updated the post
Lead Developer — 9th January 2012 (4 months ago) #
Ok, you're missing comas after the 2nd and 3rd arrays.
Member — 9th January 2012 (4 months ago) #
Thanks Aaron and Jcnjr! I am now getting the 'Error: Missing POST variables. Identification is not possible.' message, which is suppose to be normal, correct?
Member — 9th January 2012 (4 months ago) #
I believe that is perfectly normal expected behavior for viewing the page in your browser. You can send IPNs from the PayPal Sandbox to confirm all is well, but this will require changing your settings for testing instead of live mode.
Lead Developer — 9th January 2012 (4 months ago) #
Yes, that would be normal.
Member — 9th January 2012 (4 months ago) #
@jcnjr I always wondered about this sandbox mode. Is it suppose to simulate the hold process? in the pass, once i click on the pay option it does not do anything....
thoughts?
Member — 9th January 2012 (4 months ago) #
I was afraid of opening that can of worms... There are many steps required to test PayPal functions in Sandbox mode. If you do not already have a developer account set up, I might suggest you keep the fowarder in live mode and test IPNs using a real transaction. Otherwise, follow the links on the Pro Sites plugin admin page to learn about using Sandbox.
More info available at https://developer.paypal.com/
Member — 20th February 2012 (3 months ago) #
Hello Guys,
So I believe the developer once said that we can use this for even other transactions outside of prosites and WPMU setups.
I have a billing software setup (WHMCS) and they are telling me the following:
(You must enable IPN inside your PayPal account and set the URL to http://www.mysite.com/billing)However, I already have the set IPN forwarder url entered in paypal.
http://mysite.com/ipn/ipn-forwarder.phpI know I edited the ipn-forwarder.php and the wp-config files for the WPMU sites but for this system, how do I get it to work with the same ipn fwd url.
Any suggestions?
Lead Developer — 20th February 2012 (3 months ago) #
As it stands you would have to mod the WHMCS code to add a prefix the custom paypal field. You could probably fairly easily edit it though to forward a copy of every IPN notice to WHMCS though. Not something we can do for you though.
Member — 19th March 2012 (2 months ago) #
Hi, just want to check if this is working with the latest version of pro-sites.
I keep getting this when testing in sandbox
IPN delivery failed. HTTP error code 401: Unauthorized
Member — 19th March 2012 (2 months ago) #
@becky We have the IPN forward functioning with current Pro Sites running on multiple domains. Aaron may be able to address the specific error code, but using Sandbox can be tricky. Be sure to use all PayPal settings from the Sandbox account, set the IPN URL in the sandbox, and set the site to test mode both via the Pro Sites settings and in the array. Hoe this helps...
Member — 20th March 2012 (2 months ago) #
Hi jcnjr,
I managed to get it to work finally. Thanks.
Lifetime member! — 25th April 2012 (4 weeks ago) #
sorry a clarification about path.
in the script we have
'path' => '/ipn-handler.php',
here we are said to set 'path' => '/wp-admin/admin-ajax.php?action=psts_pypl_ipn',
And in that case, where the H.... the script must be uploaded ?
And finally which ipn url must i setup in paypal ?
i am a little lost.
Which one should i setup ?
thanks !
And big thanks by the way for that solution !
Lead Developer — 25th April 2012 (4 weeks ago) #
The path for pro sites will always be 'path' => '/wp-admin/admin-ajax.php?action=psts_pypl_ipn'
In paypal IPN you need to set the url for your IPN forwarder script, wherever you put it.
Member — 25th April 2012 (4 weeks ago) #
@Aphrodite FYI: i was lost too, but now have the forwarder working as follows...
Upload the ipn-forwarder.php script to a new /ipn folder at the root of yourdomain.com. Be sure to create a /logs folder in that same directory (i.e.: /ipn/logs).
Point your PayPal IPN URL to yourdomain.com/ipn/ipn-forwarder.php
Update the forwarder script with your-password:
define('INC_PASS', 'your-password');And modify the array for your sites, i.e.:
Update wp-config for each domain with:
Hope this helps!
My question for Aaron is, does WPMU Dev plan to make this a plugin? I would like to write about this solution and offer the script for use, but I'd gladly wait and point people to the plugin here for download via an affiliate link.
Lifetime member! — 25th April 2012 (4 weeks ago) #
I assume I must do that with the main site, the one registered in paypal ?
Thanks that was veryy clear, but the path mentioned in the script confused me :)
Member — 25th April 2012 (4 weeks ago) #
Where you put the forwarder has nothing to do with any sites in the array. But yes, mine does reside at the same domain as my main site. The IPN URL you enter in your PayPal notifications settings just has to match wherever you put the forwarder.
I believe "/ipn-handler.php" is intended as place-holder since the handler may be different for some users. It confused me at first too but Aaron clarified that above.
Lifetime member! — 25th April 2012 (4 weeks ago) #
ok
perfectly clear now...
Lets play around ;)
Member — 25th April 2012 (4 weeks ago) #
Oui.
Thanks for the rep points! I spend most my time playing around with these... http://agreda.com/sites
Member — 22nd May 2012 (1 day ago) #
so this is why my websites are quiet !
Become a member